Whamcloud - gitweb
misc/mke2fs: fix Windows build
[tools/e2fsprogs.git] / tests / d_bad_ostype / script
1 dd if=/dev/zero of=$TMPFILE bs=1k count=64 > /dev/null 2>&1
2 $MKE2FS -q -b 1024 -o hurd $TMPFILE
3 $DEBUGFS -w -R 'set_super_value creator_os 0xf0000000' $TMPFILE
4
5 OUT=$test_name.log
6 EXP=$test_dir/expect
7 $DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed | grep 'Filesystem OS type:' > $OUT
8
9 rm -f $TMPFILE
10 cmp -s $OUT $EXP
11 status=$?
12
13 if [ "$status" = 0 ] ; then
14         echo "$test_name: $test_description: ok"
15         touch $test_name.ok
16 else
17         echo "$test_name: $test_description: failed"
18         diff $DIFF_OPTS $EXP $OUT > $test_name.failed
19         rm -f $test_name.tmp
20 fi
21 unset OUT EXP