Home | History | Annotate | Download | only in f_badcluster
      1 if test -x $DEBUGFS_EXE; then
      2 	IMAGE=$test_dir/../f_badcluster/image.gz
      3 	OUT=$test_name.log
      4 	EXP=$test_dir/expect
      5 	gzip -d < $IMAGE > $TMPFILE
      6 	$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $OUT
      7 	$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
      8 	$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
      9 	for i in a b c d e f g; do echo "stat /$i"; done > $TMPFILE.tmp
     10 	echo "quit" >> $TMPFILE.tmp
     11 	$DEBUGFS_EXE -f $TMPFILE.tmp $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
     12 	rm -f $TMPFILE.tmp
     13 
     14 	cmp -s $OUT $EXP
     15 	status=$?
     16 
     17 	if [ "$status" = 0 ]; then
     18 		echo "$test_name: $test_description: ok"
     19 		touch $test_name.ok
     20 	else
     21 		echo "$test_name: $test_description: failed"
     22 		diff $DIFF_OPTS $EXP $OUT > $test_name.failed
     23 		rm -f $test_name.tmp
     24 	fi
     25 else
     26 	echo "$test_name: skipped"
     27 fi
     28