summaryrefslogtreecommitdiffstats
path: root/tests/f_imagic
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:49:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:49:25 +0000
commit464df1d5e5ab1322e2dd0a7796939fff1aeefa9a (patch)
tree6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/f_imagic
parentInitial commit. (diff)
downloade2fsprogs-upstream.tar.xz
e2fsprogs-upstream.zip
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/f_imagic/expect.147
-rw-r--r--tests/f_imagic/expect.27
-rw-r--r--tests/f_imagic/image.gzbin0 -> 1143 bytes
-rw-r--r--tests/f_imagic/name1
-rw-r--r--tests/f_imagic_fs/expect.131
-rw-r--r--tests/f_imagic_fs/expect.27
-rw-r--r--tests/f_imagic_fs/name1
-rw-r--r--tests/f_imagic_fs/script8
8 files changed, 102 insertions, 0 deletions
diff --git a/tests/f_imagic/expect.1 b/tests/f_imagic/expect.1
new file mode 100644
index 0000000..ebee192
--- /dev/null
+++ b/tests/f_imagic/expect.1
@@ -0,0 +1,47 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has imagic flag set. Clear? yes
+
+Inode 13 has imagic flag set. Clear? yes
+
+Inode 14 has imagic flag set. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Unattached inode 12
+Connect to /lost+found? yes
+
+Inode 12 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 14
+Connect to /lost+found? yes
+
+Inode 14 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(9--19)
+Fix? yes
+
+Free blocks count wrong for group #0 (75, counted=87).
+Fix? yes
+
+Free blocks count wrong (75, counted=87).
+Fix? yes
+
+Free inodes count wrong for group #0 (1, counted=2).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (1, counted=2).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 1
diff --git a/tests/f_imagic/expect.2 b/tests/f_imagic/expect.2
new file mode 100644
index 0000000..1f411c0
--- /dev/null
+++ b/tests/f_imagic/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: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 0
diff --git a/tests/f_imagic/image.gz b/tests/f_imagic/image.gz
new file mode 100644
index 0000000..6c2b3fa
--- /dev/null
+++ b/tests/f_imagic/image.gz
Binary files differ
diff --git a/tests/f_imagic/name b/tests/f_imagic/name
new file mode 100644
index 0000000..db94008
--- /dev/null
+++ b/tests/f_imagic/name
@@ -0,0 +1 @@
+non-imagic filesystem with imagic inodes
diff --git a/tests/f_imagic_fs/expect.1 b/tests/f_imagic_fs/expect.1
new file mode 100644
index 0000000..b21fd35
--- /dev/null
+++ b/tests/f_imagic_fs/expect.1
@@ -0,0 +1,31 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(9--19)
+Fix? yes
+
+Free blocks count wrong for group #0 (75, counted=87).
+Fix? yes
+
+Free blocks count wrong (75, counted=87).
+Fix? yes
+
+Free inodes count wrong for group #0 (1, counted=2).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (1, counted=2).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 1
diff --git a/tests/f_imagic_fs/expect.2 b/tests/f_imagic_fs/expect.2
new file mode 100644
index 0000000..1f411c0
--- /dev/null
+++ b/tests/f_imagic_fs/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: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 0
diff --git a/tests/f_imagic_fs/name b/tests/f_imagic_fs/name
new file mode 100644
index 0000000..a036976
--- /dev/null
+++ b/tests/f_imagic_fs/name
@@ -0,0 +1 @@
+imagic filesystem with imagic inodes
diff --git a/tests/f_imagic_fs/script b/tests/f_imagic_fs/script
new file mode 100644
index 0000000..511dcc7
--- /dev/null
+++ b/tests/f_imagic_fs/script
@@ -0,0 +1,8 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/../f_imagic/image.gz
+PREP_CMD='$DEBUGFS -w -R "feature imagic_inodes" $TMPFILE > /dev/null 2>&1'
+. $cmd_dir/run_e2fsck