summaryrefslogtreecommitdiffstats
path: root/tests/d_corrupt_journal_nr_users/script
blob: 683cd48740a71bdf1cfbde7e8270c21fa384454e (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
if ! test -x $DEBUGFS_EXE; then
	echo "$test_name: $test_description: skipped (no debugfs)"
	return 0
fi

IMAGE=$test_dir/image.gz
EXP=$test_dir/expect
OUT=$test_name.log
gunzip < $IMAGE > $TMPFILE

$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
sed -f $cmd_dir/filter.sed $OUT.new > $OUT
rm -f $TMPFILE $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 $test_name.tmp
fi