summaryrefslogtreecommitdiffstats
path: root/tests/f_orphquot/script
blob: e17bff0c16671a76be2e09d0e02dbe96550bcfcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
test_description="e2fsck with quota and orphan inodes"
OUT=$test_name.log
EXP=$test_dir/expect

bzip2 -dc < $test_dir/image.bz2 > $TMPFILE

rm -rf $OUT
$FSCK -f -y -N test_filesystem $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
$DEBUGFS -R 'lq user' $TMPFILE >> $OUT.new 2>&1
$DEBUGFS -R 'lq group' $TMPFILE >> $OUT.new 2>&1
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new

cmp -s $OUT $EXP
status=$?

if [ "$status" = 0 ] ; then
	echo "$test_name: $test_description: ok"
	touch $test_name.ok
else
	echo "$test_name: $test_description: failed"
	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
	rm -f tmp_expect
fi

unset IMAGE FSCK_OPT OUT EXP