1 if $FSCK -SV > /dev/null 2>&1 ; then
2 IMAGE=$test_dir/image.gz
9 gunzip < $IMAGE > $TMPFILE
11 echo "Swapfs test" > $OUT
13 echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
14 $FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
16 echo Exit status is $status >> $OUT.new
17 sed -e '2d' $OUT.new >> $OUT
19 echo e2fsck $SWAP_FSCK_OPT -N test_filesys > $OUT.new
20 $FSCK $SWAP_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
22 echo Exit status is $status >> $OUT.new
23 sed -e '2d' $OUT.new >> $OUT
25 echo Running debugfs.... >> $OUT
26 $DEBUGFS -f $test_dir/debugfs.cmd $TMPFILE > $OUT.new 2>&1
28 echo Exit status is $status >> $OUT.new
29 sed -e '1d' $OUT.new >> $OUT
31 echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
32 $FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
34 echo Exit status is $status >> $OUT.new
35 sed -e '2d' $OUT.new >> $OUT
37 echo e2fsck $NATIVE_FSCK_OPT -N test_filesys > $OUT.new
38 $FSCK $NATIVE_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
40 echo Exit status is $status >> $OUT.new
41 sed -e '2d' $OUT.new >> $OUT
43 echo Running debugfs.... >> $OUT
44 $DEBUGFS -f $test_dir/debugfs.cmd $TMPFILE > $OUT.new 2>&1
46 echo Exit status is $status >> $OUT.new
47 sed -e '1d' $OUT.new >> $OUT
49 echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
50 $FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
52 echo Exit status is $status >> $OUT.new
53 sed -e '2d' $OUT.new >> $OUT
62 rm -f $test_name.ok $test_name.failed
66 if [ "$status" = 0 ] ; then
71 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
74 unset IMAGE VERIFY_FSCK_OPT SWAP_FSCK_OPT NATIVE_FSCK_OPT OUT EXP
77 rm -f $test_name.ok $test_name.failed