diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:25 +0000 |
commit | 464df1d5e5ab1322e2dd0a7796939fff1aeefa9a (patch) | |
tree | 6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/j_recover_fast_commit | |
parent | Initial commit. (diff) | |
download | e2fsprogs-db58a52ab489b66cea7224323c4c6171ccc2a9dd.tar.xz e2fsprogs-db58a52ab489b66cea7224323c4c6171ccc2a9dd.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/j_recover_fast_commit')
-rw-r--r-- | tests/j_recover_fast_commit/commands | 4 | ||||
-rw-r--r-- | tests/j_recover_fast_commit/expect | 22 | ||||
-rw-r--r-- | tests/j_recover_fast_commit/image.gz | bin | 0 -> 3595 bytes | |||
-rwxr-xr-x | tests/j_recover_fast_commit/script | 26 |
4 files changed, 52 insertions, 0 deletions
diff --git a/tests/j_recover_fast_commit/commands b/tests/j_recover_fast_commit/commands new file mode 100644 index 0000000..74e20e4 --- /dev/null +++ b/tests/j_recover_fast_commit/commands @@ -0,0 +1,4 @@ +ls +ls a/ +ex a/new +ex a/data diff --git a/tests/j_recover_fast_commit/expect b/tests/j_recover_fast_commit/expect new file mode 100644 index 0000000..18e2fe0 --- /dev/null +++ b/tests/j_recover_fast_commit/expect @@ -0,0 +1,22 @@ +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: 14/256 files (14.3% non-contiguous), 1365/2048 blocks +Exit status is 0 +debugfs: ls + 2 (12) . 2 (12) .. 11 (20) lost+found 12 (968) a +debugfs: ls a/ + 12 (12) . 2 (12) .. 13 (12) data 14 (976) new +debugfs: ex a/new +Level Entries Logical Physical Length Flags + 0/ 0 1/ 1 0 - 0 1107 - 1107 1 +debugfs: ex a/data +Level Entries Logical Physical Length Flags + 0/ 1 1/ 1 0 - 255 1618 256 + 1/ 1 1/ 5 0 - 15 1619 - 1634 16 + 1/ 1 2/ 5 16 - 31 1601 - 1616 16 + 1/ 1 3/ 5 32 - 63 1985 - 2016 32 + 1/ 1 4/ 5 64 - 127 1537 - 1600 64 + 1/ 1 5/ 5 128 - 255 1793 - 1920 128 diff --git a/tests/j_recover_fast_commit/image.gz b/tests/j_recover_fast_commit/image.gz Binary files differnew file mode 100644 index 0000000..b7357af --- /dev/null +++ b/tests/j_recover_fast_commit/image.gz diff --git a/tests/j_recover_fast_commit/script b/tests/j_recover_fast_commit/script new file mode 100755 index 0000000..14cbb60 --- /dev/null +++ b/tests/j_recover_fast_commit/script @@ -0,0 +1,26 @@ +#!/bin/bash + +FSCK_OPT=-fy +IMAGE=$test_dir/image.gz +CMDS=$test_dir/commands +test_description="replay fast commit journal" + +gunzip < $IMAGE > $TMPFILE + +# Run fsck to fix things? +EXP=$test_dir/expect +OUT=$test_name.log + +$FSCK $FSCK_OPT -E journal_only -N test_filesys $TMPFILE 2>/dev/null | head -n 1000 | tail -n +2 > $OUT +echo "Exit status is $?" >> $OUT + +$DEBUGFS -f $CMDS $TMPFILE >> $OUT 2>/dev/null + +# Figure out what happened +if cmp -s $EXP $OUT; then + echo "$test_name: $test_description: ok" + touch $test_name.ok +else + echo "$test_name: $test_description: failed" + diff -u $EXP $OUT >> $test_name.failed +fi |