1 if ! test -x $DEBUGFS_EXE; then
2 echo "$test_name: $test_description: skipped (no debugfs)"
8 if [ -f $test_dir/expect.gz ]; then
10 gunzip < $test_dir/expect.gz > $EXP1
17 cat > $TMPFILE.conf << ENDL
20 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
26 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
29 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
31 echo Exit status is $status >> $OUT.new
32 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
35 echo "debugfs write files" >> $OUT
38 # a: fallocate a 40k file
41 cat > $TMPFILE.cmd << ENDL
56 echo "stat /a" >> $TMPFILE.cmd2
57 echo "stat /b" >> $TMPFILE.cmd2
59 $DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
60 $DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
61 sed -f $cmd_dir/filter.sed -e '/^.*time:.*$/d' < $OUT.new >> $OUT
62 rm -rf $OUT.new $TMPFILE.cmd $TMPFILE.cmd2
64 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
66 echo Exit status is $status >> $OUT.new
67 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
75 if [ "$status" = 0 ] ; then
76 echo "$test_name: $test_description: ok"
79 echo "$test_name: $test_description: failed"
80 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
84 unset IMAGE FSCK_OPT OUT EXP