Whamcloud - gitweb
tests: Expand test checking quota and orphan processing interaction
[tools/e2fsprogs.git] / tests / f_orphquot / script
1 test_description="e2fsck with quota and orphan inodes"
2 OUT=$test_name.log
3 EXP=$test_dir/expect
4
5 bzip2 -dc < $test_dir/image.bz2 > $TMPFILE
6
7 rm -rf $OUT
8 $FSCK -f -y -N test_filesystem $TMPFILE > $OUT.new 2>&1
9 status=$?
10 echo Exit status is $status >> $OUT.new
11 $DEBUGFS -R 'lq user' $TMPFILE >> $OUT.new 2>&1
12 $DEBUGFS -R 'lq group' $TMPFILE >> $OUT.new 2>&1
13 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
14 rm -f $OUT.new
15
16 cmp -s $OUT $EXP
17 status=$?
18
19 if [ "$status" = 0 ] ; then
20         echo "$test_name: $test_description: ok"
21         touch $test_name.ok
22 else
23         echo "$test_name: $test_description: failed"
24         diff $DIFF_OPTS $EXP $OUT > $test_name.failed
25         rm -f tmp_expect
26 fi
27
28 unset IMAGE FSCK_OPT OUT EXP