1#!/bin/bash 2 3FSCK_OPT=-fy 4IMAGE=$test_dir/image.gz 5CMDS=$test_dir/commands 6test_description="replay fast commit journal" 7 8gunzip < $IMAGE > $TMPFILE 9 10# Run fsck to fix things? 11EXP=$test_dir/expect 12OUT=$test_name.log 13 14$FSCK $FSCK_OPT -E journal_only -N test_filesys $TMPFILE 2>/dev/null | head -n 1000 | tail -n +2 > $OUT 15echo "Exit status is $?" >> $OUT 16 17$DEBUGFS -f $CMDS $TMPFILE >> $OUT 2>/dev/null 18 19# Figure out what happened 20if cmp -s $EXP $OUT; then 21 echo "$test_name: $test_description: ok" 22 touch $test_name.ok 23else 24 echo "$test_name: $test_description: failed" 25 diff -u $EXP $OUT >> $test_name.failed 26fi 27