diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 09:25:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 09:25:10 +0000 |
commit | 5dced3d1b3deca80e01415a2e35dc7972dcbfae7 (patch) | |
tree | 6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/i_bad_csum | |
parent | Initial commit. (diff) | |
download | e2fsprogs-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/i_bad_csum')
-rw-r--r-- | tests/i_bad_csum/expect | 11 | ||||
-rw-r--r-- | tests/i_bad_csum/image.gz | bin | 0 -> 2606 bytes | |||
-rw-r--r-- | tests/i_bad_csum/name | 1 | ||||
-rw-r--r-- | tests/i_bad_csum/script | 26 |
4 files changed, 38 insertions, 0 deletions
diff --git a/tests/i_bad_csum/expect b/tests/i_bad_csum/expect new file mode 100644 index 0000000..eeb967f --- /dev/null +++ b/tests/i_bad_csum/expect @@ -0,0 +1,11 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 12 passes checks, but checksum does not match inode. Fix? no + +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys.bin: ********** WARNING: Filesystem still has errors ********** + +test_filesys.bin: 12/128 files (0.0% non-contiguous), 19/512 blocks diff --git a/tests/i_bad_csum/image.gz b/tests/i_bad_csum/image.gz Binary files differnew file mode 100644 index 0000000..e17e921 --- /dev/null +++ b/tests/i_bad_csum/image.gz diff --git a/tests/i_bad_csum/name b/tests/i_bad_csum/name new file mode 100644 index 0000000..f7197f0 --- /dev/null +++ b/tests/i_bad_csum/name @@ -0,0 +1 @@ +run e2image on a file system with bad checksums diff --git a/tests/i_bad_csum/script b/tests/i_bad_csum/script new file mode 100644 index 0000000..8b5bef9 --- /dev/null +++ b/tests/i_bad_csum/script @@ -0,0 +1,26 @@ +test_description="e2image corrupt fs" + +IMAGE=$test_dir/image.gz +OUT=$test_name.log +EXP=$test_dir/expect + +gzip -d < $IMAGE > $TMPFILE +$E2IMAGE -r $TMPFILE $TMPFILE.bin > $OUT 2>&1 +$FSCK -fn $TMPFILE.bin >> $OUT 2>&1 + +sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test_filesys;" $OUT > $OUT.new +mv $OUT.new $OUT + +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 $test_name.tmp +fi + +rm -f $OUT $TMPFILE $TMPFILE.bin $TMPFILE.test +unset IMAGE FSCK_OPT OUT EXP |