]>
Commit | Line | Data |
---|---|---|
23cb84c5 AD |
1 | if [ $(uname -s) = "Darwin" ]; then |
2 | # creates a 4GB filesystem | |
3 | echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)" | |
4 | return 0 | |
5 | fi | |
6 | ||
3819bff4 AD |
7 | if ! test -x $DEBUGFS_EXE; then |
8 | echo "$test_name: $test_description: skipped (no debugfs)" | |
9 | return 0 | |
10 | fi | |
0858268d DW |
11 | |
12 | FSCK_OPT=-fy | |
13 | OUT=$test_name.log | |
14 | if [ -f $test_dir/expect.gz ]; then | |
15 | EXP=$test_name.tmp | |
16 | gunzip < $test_dir/expect.gz > $EXP1 | |
17 | else | |
18 | EXP=$test_dir/expect | |
19 | fi | |
20 | ||
21 | cp /dev/null $OUT | |
22 | ||
23 | $MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 1048576 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT 2>&1 | |
24 | ||
25 | $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1 | |
26 | status=$? | |
27 | echo Exit status is $status >> $OUT.new | |
28 | sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT | |
29 | rm -f $OUT.new | |
30 | ||
31 | echo "dumpe2fs output" >> $OUT | |
32 | $DUMPE2FS -g $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT | |
33 | ||
34 | rm -f $TMPFILE | |
35 | ||
36 | cmp -s $OUT $EXP | |
37 | status=$? | |
38 | ||
39 | if [ "$status" = 0 ] ; then | |
40 | echo "$test_name: $test_description: ok" | |
41 | touch $test_name.ok | |
42 | else | |
43 | echo "$test_name: $test_description: failed" | |
44 | diff $DIFF_OPTS $EXP $OUT > $test_name.failed | |
45 | rm -f $test_name.tmp | |
46 | fi | |
47 | ||
48 | unset IMAGE FSCK_OPT OUT EXP |