1 if test -x $DEBUGFS_EXE; then
5 if [ -f $test_dir/expect.gz ]; then
7 gunzip < $test_dir/expect.gz > $EXP1
14 cat > $TMPFILE.conf << ENDL
17 base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr,^has_journal,^extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,^64bit
23 MKE2FS_CONFIG=$TMPFILE.conf $MKE2FS -F -o Linux -b 1024 -O ^bigalloc -T ext4 $TMPFILE 65536 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT 2>&1
26 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
28 echo Exit status is $status >> $OUT.new
29 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
32 echo "debugfs write files" >> $OUT
35 # a: fallocate a 40k file
38 cat > $TMPFILE.cmd << ENDL
53 echo "stat /a" >> $TMPFILE.cmd2
54 echo "stat /b" >> $TMPFILE.cmd2
56 $DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
57 $DEBUGFS_EXE -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
58 sed -f $cmd_dir/filter.sed -e '/^.*time:.*$/d' < $OUT.new >> $OUT
59 rm -rf $OUT.new $TMPFILE.cmd $TMPFILE.cmd2
61 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
63 echo Exit status is $status >> $OUT.new
64 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
72 if [ "$status" = 0 ] ; then
73 echo "$test_name: $test_description: ok"
76 echo "$test_name: $test_description: failed"
77 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
81 unset IMAGE FSCK_OPT OUT EXP
83 else #if test -x $DEBUGFS_EXE; then
84 echo "$test_name: $test_description: skipped"