summaryrefslogtreecommitdiffstats
path: root/tests/f_bigalloc_badinode
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_bigalloc_badinode
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_bigalloc_badinode')
-rw-r--r--tests/f_bigalloc_badinode/expect.112
-rw-r--r--tests/f_bigalloc_badinode/expect.27
-rw-r--r--tests/f_bigalloc_badinode/name1
-rw-r--r--tests/f_bigalloc_badinode/script23
4 files changed, 43 insertions, 0 deletions
diff --git a/tests/f_bigalloc_badinode/expect.1 b/tests/f_bigalloc_badinode/expect.1
new file mode 100644
index 0000000..615828a
--- /dev/null
+++ b/tests/f_bigalloc_badinode/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Symlink /testfile (inode #12) is invalid.
+Clear? yes
+
+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/64 files (0.0% non-contiguous), 112/1024 blocks
+Exit status is 1
diff --git a/tests/f_bigalloc_badinode/expect.2 b/tests/f_bigalloc_badinode/expect.2
new file mode 100644
index 0000000..16d88fa
--- /dev/null
+++ b/tests/f_bigalloc_badinode/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/64 files (0.0% non-contiguous), 112/1024 blocks
+Exit status is 0
diff --git a/tests/f_bigalloc_badinode/name b/tests/f_bigalloc_badinode/name
new file mode 100644
index 0000000..e1ed216
--- /dev/null
+++ b/tests/f_bigalloc_badinode/name
@@ -0,0 +1 @@
+delete bad inode handling for bigalloc filesystems
diff --git a/tests/f_bigalloc_badinode/script b/tests/f_bigalloc_badinode/script
new file mode 100644
index 0000000..6ceb6ee
--- /dev/null
+++ b/tests/f_bigalloc_badinode/script
@@ -0,0 +1,23 @@
+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=4k count=2 seek=1> /dev/null 2>&1
+
+touch $TMPFILE
+$MKE2FS -Fq -t ext4 -o Linux -O bigalloc -C 16384 $TMPFILE 1M > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+write $TEST_DATA testfile
+set_inode_field testfile i_mode 0120000
+quit
+EOF
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA