summaryrefslogtreecommitdiffstats
path: root/tests/f_no
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_no
parentInitial commit. (diff)
downloade2fsprogs-upstream/1.47.0.tar.xz
e2fsprogs-upstream/1.47.0.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_no/expect50
-rw-r--r--tests/f_no/script26
-rw-r--r--tests/f_no_cache_corrupt_inode/expect.111
-rw-r--r--tests/f_no_cache_corrupt_inode/expect.27
-rw-r--r--tests/f_no_cache_corrupt_inode/image.gzbin0 -> 2606 bytes
-rw-r--r--tests/f_no_cache_corrupt_inode/name1
-rw-r--r--tests/f_noroot/expect.139
-rw-r--r--tests/f_noroot/expect.27
-rw-r--r--tests/f_noroot/image.gzbin0 -> 550 bytes
-rw-r--r--tests/f_noroot/name1
-rw-r--r--tests/f_nospc_create_lnf/expect.129
-rw-r--r--tests/f_nospc_create_lnf/expect.226
-rw-r--r--tests/f_nospc_create_lnf/image.gzbin0 -> 4201 bytes
-rw-r--r--tests/f_nospc_create_lnf/name1
14 files changed, 198 insertions, 0 deletions
diff --git a/tests/f_no/expect b/tests/f_no/expect
new file mode 100644
index 0000000..140a01f
--- /dev/null
+++ b/tests/f_no/expect
@@ -0,0 +1,50 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 999999999, len 1)
+Clear<y>? no
+Inode 12 has an invalid extent
+ (logical block 1, invalid physical block 9999999999, len 1)
+Clear<y>? no
+Inode 13 is in use, but has dtime set. Fix<y>? no
+Inode 13 has an invalid extent
+ (logical block 1, invalid physical block 8888888888888, len 1)
+Clear<y>? no
+Inode 13 has an invalid extent
+ (logical block 0, invalid physical block 888888888888, len 1)
+Clear<y>? no
+Inodes that were part of a corrupted orphan linked list found. Fix<y>? no
+Inode 14 was part of the orphaned inode list. IGNORED.
+Inode 14 is in use, but has dtime set. Fix<y>? no
+Inode 14 has an invalid extent
+ (logical block 300, invalid physical block 777777777777, len 300)
+Clear<y>? no
+Inode 14 has an invalid extent
+ (logical block 0, invalid physical block 7777777777, len 1)
+Clear<y>? no
+Inode 14, i_blocks is 52574694748113, should be 0. Fix<y>? no
+Pass 2: Checking directory structure
+Extended attribute block for inode 12 (/a) is invalid (999999).
+Clear<y>? no
+Extended attribute block for inode 13 (/b) is invalid (298954296).
+Clear<y>? no
+Extended attribute block for inode 14 (/c) is invalid (388697201).
+Clear<y>? no
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 12 ref count is 34463, should be 1. Fix<y>? no
+Inode 13 ref count is 9999, should be 1. Fix<y>? no
+Inode 14 ref count is 12241, should be 1. Fix<y>? no
+Pass 5: Checking group summary information
+Block bitmap differences: -202 -381 -457
+Fix<y>? no
+Free blocks count wrong for group #0 (0, counted=491).
+Fix<y>? no
+Free blocks count wrong (494, counted=491).
+Fix<y>? no
+Free inodes count wrong for group #0 (4294967293, counted=114).
+Fix<y>? no
+
+test_filesys: ********** WARNING: Filesystem still has errors **********
+
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 4
diff --git a/tests/f_no/script b/tests/f_no/script
new file mode 100644
index 0000000..c046d76
--- /dev/null
+++ b/tests/f_no/script
@@ -0,0 +1,26 @@
+test_description="e2fsck with repeated no"
+FSCK_OPT=-f
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $test_dir/../f_yesall/image.gz > $TMPFILE
+
+echo "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | E2FSCK_FORCE_INTERACTIVE=y $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f tmp_expect
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_no_cache_corrupt_inode/expect.1 b/tests/f_no_cache_corrupt_inode/expect.1
new file mode 100644
index 0000000..4f82f75
--- /dev/null
+++ b/tests/f_no_cache_corrupt_inode/expect.1
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 passes checks, but checksum does not match inode. Fix? yes
+
+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: 12/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 1
diff --git a/tests/f_no_cache_corrupt_inode/expect.2 b/tests/f_no_cache_corrupt_inode/expect.2
new file mode 100644
index 0000000..1b43315
--- /dev/null
+++ b/tests/f_no_cache_corrupt_inode/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/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 0
diff --git a/tests/f_no_cache_corrupt_inode/image.gz b/tests/f_no_cache_corrupt_inode/image.gz
new file mode 100644
index 0000000..e17e921
--- /dev/null
+++ b/tests/f_no_cache_corrupt_inode/image.gz
Binary files differ
diff --git a/tests/f_no_cache_corrupt_inode/name b/tests/f_no_cache_corrupt_inode/name
new file mode 100644
index 0000000..fb213e2
--- /dev/null
+++ b/tests/f_no_cache_corrupt_inode/name
@@ -0,0 +1 @@
+don't cache inodes that fail checksum verification
diff --git a/tests/f_noroot/expect.1 b/tests/f_noroot/expect.1
new file mode 100644
index 0000000..f8f652e
--- /dev/null
+++ b/tests/f_noroot/expect.1
@@ -0,0 +1,39 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 15 is in use, but has dtime set. Fix? yes
+
+Pass 2: Checking directory structure
+Entry '..' in /lost+found (11) has deleted/unused inode 2. Clear? yes
+
+Entry '..' in /foo (12) has deleted/unused inode 2. Clear? yes
+
+Pass 3: Checking directory connectivity
+Root inode not allocated. Allocate? yes
+
+Unconnected directory inode 11 (was in /)
+Connect to /lost+found? yes
+
+/lost+found not found. Create? yes
+
+Unconnected directory inode 12 (was in /lost+found)
+Connect to /lost+found? yes
+
+Pass 4: Checking reference counts
+Inode 11 ref count is 3, should be 2. Fix? yes
+
+Inode 12 ref count is 4, should be 3. Fix? yes
+
+Unattached zero-length inode 15. Clear? yes
+
+Pass 5: Checking group summary information
+Free inodes count wrong for group #0 (17, counted=16).
+Fix? yes
+
+Free inodes count wrong (17, counted=16).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 1
diff --git a/tests/f_noroot/expect.2 b/tests/f_noroot/expect.2
new file mode 100644
index 0000000..5ea5bc7
--- /dev/null
+++ b/tests/f_noroot/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: 16/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 0
diff --git a/tests/f_noroot/image.gz b/tests/f_noroot/image.gz
new file mode 100644
index 0000000..0a87e99
--- /dev/null
+++ b/tests/f_noroot/image.gz
Binary files differ
diff --git a/tests/f_noroot/name b/tests/f_noroot/name
new file mode 100644
index 0000000..a70ebc2
--- /dev/null
+++ b/tests/f_noroot/name
@@ -0,0 +1 @@
+missing root directory
diff --git a/tests/f_nospc_create_lnf/expect.1 b/tests/f_nospc_create_lnf/expect.1
new file mode 100644
index 0000000..986fe12
--- /dev/null
+++ b/tests/f_nospc_create_lnf/expect.1
@@ -0,0 +1,29 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Cannot allocate space for /lost+found.
+Place lost files in root directory instead? yes
+
+Insufficient space to recover lost files!
+Move data off the filesystem and re-run e2fsck.
+
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Unattached inode 125
+Connect to /lost+found? yes
+
+Inode 125 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (496, counted=495).
+Fix? yes
+
+Free blocks count wrong (496, counted=495).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 128/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_nospc_create_lnf/expect.2 b/tests/f_nospc_create_lnf/expect.2
new file mode 100644
index 0000000..e9757f8
--- /dev/null
+++ b/tests/f_nospc_create_lnf/expect.2
@@ -0,0 +1,26 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Cannot allocate space for /lost+found.
+Place lost files in root directory instead? yes
+
+Insufficient space to recover lost files!
+Move data off the filesystem and re-run e2fsck.
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -9
+Fix? yes
+
+Free blocks count wrong for group #0 (494, counted=495).
+Fix? yes
+
+Free blocks count wrong (494, counted=495).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 128/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_nospc_create_lnf/image.gz b/tests/f_nospc_create_lnf/image.gz
new file mode 100644
index 0000000..dc71b61
--- /dev/null
+++ b/tests/f_nospc_create_lnf/image.gz
Binary files differ
diff --git a/tests/f_nospc_create_lnf/name b/tests/f_nospc_create_lnf/name
new file mode 100644
index 0000000..df6c932
--- /dev/null
+++ b/tests/f_nospc_create_lnf/name
@@ -0,0 +1 @@
+no space to create lost+found