Whamcloud - gitweb
tests: fix f_bigalloc_orphan_list so it is not dependant on umask
[tools/e2fsprogs.git] / tests / f_bigalloc_orphan_list / script
1 if ! test -x $DEBUGFS_EXE; then
2         echo "$test_name: $test_description: skipped (no debugfs)"
3         return 0
4 fi
5
6 SKIP_GUNZIP="true"
7 TEST_DATA="$test_name.tmp"
8
9 dd if=$TEST_BITS of=$TEST_DATA bs=28k count=1 > /dev/null 2>&1
10
11 touch $TMPFILE
12 $MKE2FS -Fq -t ext4 -O bigalloc $TMPFILE 1M > /dev/null 2>&1
13 $DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
14 write $TEST_DATA testfile
15 set_inode_field testfile links_count 0
16 set_inode_field testfile mode 0100644
17 set_inode_field testfile bmap[0] 0
18 set_inode_field testfile bmap[2] 0
19 set_super_value last_orphan 12
20 unlink testfile
21 quit
22 EOF
23
24 . $cmd_dir/run_e2fsck
25
26 rm -f $TEST_DATA
27
28 unset E2FSCK_TIME TEST_DATA