Whamcloud - gitweb
31ac6c926d07e31ff712a2d29e4349806d3e3443
[tools/e2fsprogs.git] / tests / f_extent_oobounds / script
1 if test -x $DEBUGFS_EXE; then
2
3 SKIP_GUNZIP="true"
4 TEST_DATA="$test_name.tmp"
5
6 dd if=/dev/zero of=$TMPFILE bs=1k count=256 > /dev/null 2>&1
7 mke2fs -Ft ext4 $TMPFILE > /dev/null 2>&1
8 debugfs -w $TMPFILE << EOF  > /dev/null 2>&1
9 write /dev/null testfile
10 extent_open testfile
11   insert_node 0 15 100
12   insert_node --after 15 15 115
13   insert_node --after 30 15 130
14   insert_node --after 45 15 145
15   split
16   down
17   split
18   root
19   down
20   next
21   replace_node 15 30 200
22   extent_close
23 set_inode_field testfile i_size 61400
24 set_inode_field testfile i_blocks 154
25 setb 100 15
26 setb 130 30
27 setb 200 30
28 set_bg 0 free_blocks_count 156
29 set_bg 0 bg_checksum calc
30 set_super_value free_blocks_count 156
31 q
32 EOF
33
34 . $cmd_dir/run_e2fsck
35
36 rm -f $TEST_DATA
37
38 unset E2FSCK_TIME TEST_DATA
39
40 else #if test -x $DEBUGFS_EXE; then
41         echo "$test_name: $test_description: skipped"
42 fi