summaryrefslogtreecommitdiff
path: root/tests/f_extent_oobounds
diff options
context:
space:
mode:
Diffstat (limited to 'tests/f_extent_oobounds')
-rw-r--r--tests/f_extent_oobounds/expect.124
-rw-r--r--tests/f_extent_oobounds/expect.27
-rw-r--r--tests/f_extent_oobounds/script42
3 files changed, 73 insertions, 0 deletions
diff --git a/tests/f_extent_oobounds/expect.1 b/tests/f_extent_oobounds/expect.1
new file mode 100644
index 00000000..3164ea0e
--- /dev/null
+++ b/tests/f_extent_oobounds/expect.1
@@ -0,0 +1,24 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, end of extent exceeds allowed value
+ (logical block 15, physical block 200, len 30)
+Clear? yes
+
+Inode 12, i_blocks is 154, should be 94. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(200--229)
+Fix? yes
+
+Free blocks count wrong for group #0 (156, counted=186).
+Fix? yes
+
+Free blocks count wrong (156, counted=186).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/32 files (8.3% non-contiguous), 70/256 blocks
+Exit status is 1
diff --git a/tests/f_extent_oobounds/expect.2 b/tests/f_extent_oobounds/expect.2
new file mode 100644
index 00000000..22c4f2cc
--- /dev/null
+++ b/tests/f_extent_oobounds/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32 files (8.3% non-contiguous), 70/256 blocks
+Exit status is 0
diff --git a/tests/f_extent_oobounds/script b/tests/f_extent_oobounds/script
new file mode 100644
index 00000000..b00b031a
--- /dev/null
+++ b/tests/f_extent_oobounds/script
@@ -0,0 +1,42 @@
+if test -x $DEBUGFS_EXE; then
+
+SKIP_GUNZIP="true"
+TEST_DATA="$test_name.tmp"
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=256 > /dev/null 2>&1
+$MKE2FS -Ft ext4 $TMPFILE > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+write /dev/null testfile
+extent_open testfile
+ insert_node 0 15 100
+ insert_node --after 15 15 115
+ insert_node --after 30 15 130
+ insert_node --after 45 15 145
+ split
+ down
+ split
+ root
+ down
+ next
+ replace_node 15 30 200
+ extent_close
+set_inode_field testfile i_size 61400
+set_inode_field testfile i_blocks 154
+setb 100 15
+setb 130 30
+setb 200 30
+set_bg 0 free_blocks_count 156
+set_bg 0 bg_checksum calc
+set_super_value free_blocks_count 156
+q
+EOF
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA
+
+else #if test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped"
+fi