summaryrefslogtreecommitdiffstats
path: root/tests/f_yesall
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_yesall
parentInitial commit. (diff)
downloade2fsprogs-464df1d5e5ab1322e2dd0a7796939fff1aeefa9a.tar.xz
e2fsprogs-464df1d5e5ab1322e2dd0a7796939fff1aeefa9a.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_yesall/expect63
-rw-r--r--tests/f_yesall/image.gzbin0 -> 2597 bytes
-rw-r--r--tests/f_yesall/script26
3 files changed, 89 insertions, 0 deletions
diff --git a/tests/f_yesall/expect b/tests/f_yesall/expect
new file mode 100644
index 0000000..757b048
--- /dev/null
+++ b/tests/f_yesall/expect
@@ -0,0 +1,63 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 999999999, len 1)
+Clear<y>? yes to all
+Inode 12 has an invalid extent
+ (logical block 1, invalid physical block 9999999999, len 1)
+Clear? yes
+
+Inode 13 is in use, but has dtime set. Fix? yes
+
+Inode 13 has an invalid extent
+ (logical block 1, invalid physical block 8888888888888, len 1)
+Clear? yes
+
+Inode 13 has an invalid extent
+ (logical block 0, invalid physical block 888888888888, len 1)
+Clear? yes
+
+Inodes that were part of a corrupted orphan linked list found. Fix? yes
+
+Inode 14 was part of the orphaned inode list. FIXED.
+Inode 14 has an invalid extent
+ (logical block 300, invalid physical block 777777777777, len 300)
+Clear? yes
+
+Inode 14 has an invalid extent
+ (logical block 0, invalid physical block 7777777777, len 1)
+Clear? yes
+
+Inode 14, i_blocks is 52574694748113, should be 0. Fix? yes
+
+Pass 2: Checking directory structure
+Extended attribute block for inode 12 (/a) is invalid (999999).
+Clear? yes
+
+Extended attribute block for inode 13 (/b) is invalid (298954296).
+Clear? yes
+
+Extended attribute block for inode 14 (/c) is invalid (388697201).
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 12 ref count is 34463, should be 1. Fix? yes
+
+Inode 13 ref count is 9999, should be 1. Fix? yes
+
+Inode 14 ref count is 12241, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -202 -381 -457
+Fix? yes
+
+Free blocks count wrong for group #0 (0, counted=494).
+Fix? yes
+
+Free inodes count wrong for group #0 (4294967293, counted=114).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_yesall/image.gz b/tests/f_yesall/image.gz
new file mode 100644
index 0000000..0f8b205
--- /dev/null
+++ b/tests/f_yesall/image.gz
Binary files differ
diff --git a/tests/f_yesall/script b/tests/f_yesall/script
new file mode 100644
index 0000000..cb67ee7
--- /dev/null
+++ b/tests/f_yesall/script
@@ -0,0 +1,26 @@
+test_description="e2fsck with yes-to-all"
+FSCK_OPT=-f
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $test_dir/image.gz > $TMPFILE
+
+echo "annnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | 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