• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1FSCK_OPT=-fy
2OUT=$test_name.log
3if [ -f $test_dir/expect.gz ]; then
4	EXP=$test_name.tmp
5	gunzip < $test_dir/expect.gz > $EXP1
6else
7	EXP=$test_dir/expect
8fi
9
10gunzip < $test_dir/image.gz > $TMPFILE
11
12echo "e2fsck external journal" > $OUT.new
13$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
14status=$?
15echo Exit status is $status >> $OUT.new
16
17echo "dumpe2fs external journal" >> $OUT.new
18$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
19sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
20rm -f $TMPFILE $OUT.new
21
22cmp -s $OUT $EXP
23status=$?
24
25if [ "$status" = 0 ] ; then
26	echo "$test_name: $test_description: ok"
27	touch $test_name.ok
28else
29	echo "$test_name: $test_description: failed"
30	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
31	rm -f $test_name.tmp
32fi
33
34unset IMAGE FSCK_OPT OUT EXP
35