summaryrefslogtreecommitdiffstats
path: root/tests/f_dup4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 09:25:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 09:25:10 +0000
commit5dced3d1b3deca80e01415a2e35dc7972dcbfae7 (patch)
tree6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/f_dup4
parentInitial commit. (diff)
downloade2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.tar.xz
e2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.zip
Adding upstream version 1.47.0.upstream/1.47.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/f_dup4')
-rw-r--r--tests/f_dup4/expect.1130
-rw-r--r--tests/f_dup4/expect.27
-rw-r--r--tests/f_dup4/name1
-rw-r--r--tests/f_dup4/script55
4 files changed, 193 insertions, 0 deletions
diff --git a/tests/f_dup4/expect.1 b/tests/f_dup4/expect.1
new file mode 100644
index 0000000..8b6565c
--- /dev/null
+++ b/tests/f_dup4/expect.1
@@ -0,0 +1,130 @@
+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 15: 30
+Multiply-claimed block(s) in inode 16: 30
+Multiply-claimed block(s) in inode 17: 30
+Multiply-claimed block(s) in inode 18: 30
+Multiply-claimed block(s) in inode 19: 34
+Multiply-claimed block(s) in inode 20: 34
+Multiply-claimed block(s) in inode 21: 34
+Multiply-claimed block(s) in inode 22: 34
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 8 inodes containing multiply-claimed blocks.)
+
+File /dir4 (inode #15, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/baz (inode #18, mod time Tue Apr 10 21:00:00 2007)
+ /dir2/bar (inode #17, mod time Tue Apr 10 21:00:00 2007)
+ /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/baz (inode #18, mod time Tue Apr 10 21:00:00 2007)
+ /dir2/bar (inode #17, mod time Tue Apr 10 21:00:00 2007)
+ /dir4 (inode #15, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir2/bar (inode #17, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/baz (inode #18, mod time Tue Apr 10 21:00:00 2007)
+ /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007)
+ /dir4 (inode #15, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir3/baz (inode #18, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir2/bar (inode #17, mod time Tue Apr 10 21:00:00 2007)
+ /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007)
+ /dir4 (inode #15, mod time Tue Apr 10 21:00:00 2007)
+Multiply-claimed blocks already reassigned or cloned.
+
+File /dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/foe (inode #22, mod time Tue Apr 10 21:00:00 2007)
+ /dir2/fie (inode #21, mod time Tue Apr 10 21:00:00 2007)
+ /dir/fee (inode #20, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir/fee (inode #20, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/foe (inode #22, mod time Tue Apr 10 21:00:00 2007)
+ /dir2/fie (inode #21, mod time Tue Apr 10 21:00:00 2007)
+ /dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir2/fie (inode #21, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/foe (inode #22, mod time Tue Apr 10 21:00:00 2007)
+ /dir/fee (inode #20, mod time Tue Apr 10 21:00:00 2007)
+ /dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir3/foe (inode #22, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir2/fie (inode #21, mod time Tue Apr 10 21:00:00 2007)
+ /dir/fee (inode #20, mod time Tue Apr 10 21:00:00 2007)
+ /dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Directory inode 22, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 22.
+Fix? yes
+
+Missing '..' in directory inode 22.
+Fix? yes
+
+Directory inode 20, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 20.
+Fix? yes
+
+Missing '..' in directory inode 20.
+Fix? yes
+
+Directory inode 21, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 21.
+Fix? yes
+
+Missing '..' in directory inode 21.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+'..' in /dir/fee (20) is <The NULL inode> (0), should be /dir (12).
+Fix? yes
+
+'..' in /dir2/fie (21) is <The NULL inode> (0), should be /dir2 (13).
+Fix? yes
+
+'..' in /dir3/foe (22) is <The NULL inode> (0), should be /dir3 (14).
+Fix? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 7. Fix? yes
+
+Inode 12 ref count is 4, should be 3. Fix? yes
+
+Inode 13 ref count is 4, should be 3. Fix? yes
+
+Inode 14 ref count is 4, should be 3. Fix? yes
+
+Inode 16 ref count is 1, should be 3. Fix? yes
+
+Inode 17 ref count is 1, should be 2. Fix? yes
+
+Inode 19 ref count is 1, should be 3. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 23/32 files (0.0% non-contiguous), 39/100 blocks
+Exit status is 1
diff --git a/tests/f_dup4/expect.2 b/tests/f_dup4/expect.2
new file mode 100644
index 0000000..fe9c7e2
--- /dev/null
+++ b/tests/f_dup4/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: 23/32 files (0.0% non-contiguous), 39/100 blocks
+Exit status is 0
diff --git a/tests/f_dup4/name b/tests/f_dup4/name
new file mode 100644
index 0000000..91cc5a3
--- /dev/null
+++ b/tests/f_dup4/name
@@ -0,0 +1 @@
+find all directory pathnames
diff --git a/tests/f_dup4/script b/tests/f_dup4/script
new file mode 100644
index 0000000..aec862d
--- /dev/null
+++ b/tests/f_dup4/script
@@ -0,0 +1,55 @@
+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"
+
+echo "/ Murphy Magic. The SeCrEt of the UnIvErSe is 43, NOT 42" > $TEST_DATA
+
+touch $TMPFILE
+$MKE2FS -N 32 -F -o Linux -b 1024 $TMPFILE 100 > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+set_current_time 20070410210000
+set_super_value lastcheck 0
+set_super_value hash_seed null
+set_super_value mkfs_time 0
+mkdir dir
+mkdir dir2
+mkdir dir3
+mkdir dir4
+cd /dir
+write $TEST_DATA foo
+cd /dir2
+write $TEST_DATA bar
+cd /dir3
+write $TEST_DATA baz
+cd /dir4
+write $TEST_DATA quux
+mkdir /dir/fee
+mkdir /dir2/fie
+mkdir /dir3/foe
+mkdir /dir4/fum
+link /dir/foo /dir2/foo1
+link /dir/foo /dir3/foo2
+link /dir2/bar /dir3/bar1
+link /dir4/quux /dir/quux1
+link /dir4/quux /dir2/quux2
+set_inode_field /dir/foo block[0] 30
+set_inode_field /dir2/bar block[0] 30
+set_inode_field /dir3/baz block[0] 30
+set_inode_field /dir/fee block[0] 34
+set_inode_field /dir2/fie block[0] 34
+set_inode_field /dir3/foe block[0] 34
+q
+EOF
+
+E2FSCK_TIME=200704102100
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA