summaryrefslogtreecommitdiffstats
path: root/tests/f_desc_size_bad
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_desc_size_bad
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 'tests/f_desc_size_bad')
-rw-r--r--tests/f_desc_size_bad/expect.113
-rw-r--r--tests/f_desc_size_bad/expect.27
-rw-r--r--tests/f_desc_size_bad/script17
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/f_desc_size_bad/expect.1 b/tests/f_desc_size_bad/expect.1
new file mode 100644
index 0000000..84b852a
--- /dev/null
+++ b/tests/f_desc_size_bad/expect.1
@@ -0,0 +1,13 @@
+../e2fsck/e2fsck: Block group descriptor size incorrect while trying to open test.img
+../e2fsck/e2fsck: Trying to load superblock despite errors...
+ext2fs_check_desc: Block group descriptor size incorrect
+../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
+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: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 805/2048 blocks
+Exit status is 1
diff --git a/tests/f_desc_size_bad/expect.2 b/tests/f_desc_size_bad/expect.2
new file mode 100644
index 0000000..012f837
--- /dev/null
+++ b/tests/f_desc_size_bad/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: 11/32 files (0.0% non-contiguous), 805/2048 blocks
+Exit status is 0
diff --git a/tests/f_desc_size_bad/script b/tests/f_desc_size_bad/script
new file mode 100644
index 0000000..ae29627
--- /dev/null
+++ b/tests/f_desc_size_bad/script
@@ -0,0 +1,17 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+DESCRIPTION="bad superblock s_desc_size"
+SKIP_GUNZIP=true
+touch $TMPFILE
+$MKE2FS -F -o Linux -O 64bit,extents -N 32 -b 1024 -g 512 -E desc_size=128 $TMPFILE 2048 > $test_name.log 2>&1
+$DEBUGFS -R "ssv desc_size 129" -w $TMPFILE >> $test_name.log 2>&1
+
+E2FSCK_TIME=200704102100
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+unset E2FSCK_TIME