]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - tests/d_dumpe2fs_group_only/script
tests: clean up $DEBUGFS_EXE usage in scripts
[thirdparty/e2fsprogs.git] / tests / d_dumpe2fs_group_only / script
CommitLineData
23cb84c5
AD
1if [ $(uname -s) = "Darwin" ]; then
2 # creates a 4GB filesystem
3 echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
4 return 0
5fi
6
3819bff4
AD
7if ! test -x $DEBUGFS_EXE; then
8 echo "$test_name: $test_description: skipped (no debugfs)"
9 return 0
10fi
0858268d
DW
11
12FSCK_OPT=-fy
13OUT=$test_name.log
14if [ -f $test_dir/expect.gz ]; then
15 EXP=$test_name.tmp
16 gunzip < $test_dir/expect.gz > $EXP1
17else
18 EXP=$test_dir/expect
19fi
20
21cp /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
26status=$?
27echo Exit status is $status >> $OUT.new
28sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
29rm -f $OUT.new
30
31echo "dumpe2fs output" >> $OUT
32$DUMPE2FS -g $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
33
34rm -f $TMPFILE
35
36cmp -s $OUT $EXP
37status=$?
38
39if [ "$status" = 0 ] ; then
40 echo "$test_name: $test_description: ok"
41 touch $test_name.ok
42else
43 echo "$test_name: $test_description: failed"
44 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
45 rm -f $test_name.tmp
46fi
47
48unset IMAGE FSCK_OPT OUT EXP