summaryrefslogtreecommitdiffstats
path: root/tests/f_dup_resize
diff options
context:
space:
mode:
Diffstat (limited to 'tests/f_dup_resize')
-rw-r--r--tests/f_dup_resize/expect.135
-rw-r--r--tests/f_dup_resize/expect.27
-rw-r--r--tests/f_dup_resize/name1
-rw-r--r--tests/f_dup_resize/script29
4 files changed, 72 insertions, 0 deletions
diff --git a/tests/f_dup_resize/expect.1 b/tests/f_dup_resize/expect.1
new file mode 100644
index 0000000..8a2764d
--- /dev/null
+++ b/tests/f_dup_resize/expect.1
@@ -0,0 +1,35 @@
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 7: 4--7
+Multiply-claimed block(s) in inode 12: 4--7
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 1 inodes containing multiply-claimed blocks.)
+
+File /debugfs (inode #12, mod time Mon Apr 11 00:00:00 2005)
+ has 4 multiply-claimed block(s), shared with 2 file(s):
+ <filesystem metadata>
+ <The group descriptor inode> (inode #7, mod time Mon Apr 11 06:13:20 2005)
+Clone multiply-claimed blocks? 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: +(8195--8198)
+Fix? yes
+
+Free blocks count wrong for group #0 (7750, counted=7751).
+Fix? yes
+
+Free blocks count wrong (9434, counted=9435).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/2560 files (8.3% non-contiguous), 805/10240 blocks
+Exit status is 1
diff --git a/tests/f_dup_resize/expect.2 b/tests/f_dup_resize/expect.2
new file mode 100644
index 0000000..d91b0af
--- /dev/null
+++ b/tests/f_dup_resize/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/2560 files (8.3% non-contiguous), 805/10240 blocks
+Exit status is 0
diff --git a/tests/f_dup_resize/name b/tests/f_dup_resize/name
new file mode 100644
index 0000000..6c5befa
--- /dev/null
+++ b/tests/f_dup_resize/name
@@ -0,0 +1 @@
+blocks claimed by the resize inode and another inode
diff --git a/tests/f_dup_resize/script b/tests/f_dup_resize/script
new file mode 100644
index 0000000..0fd350b
--- /dev/null
+++ b/tests/f_dup_resize/script
@@ -0,0 +1,29 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+SKIP_GUNZIP="true"
+TEST_DATA="$test_name.tmp"
+
+dd if=$TEST_BITS of=$TEST_DATA bs=63k count=1 conv=sync > /dev/null 2>&1
+
+touch $TMPFILE
+$MKE2FS -F -o Linux -O resize_inode $TMPFILE 10240 > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+freeb 4 4
+freeb 8195 4
+write $TEST_DATA debugfs
+set_current_time 20050411000000
+set_inode_field debugfs mtime 20050411000000
+q
+EOF
+
+E2FSCK_TIME=1113200000
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA