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/script | |
parent | Initial commit. (diff) | |
download | e2fsprogs-upstream.tar.xz e2fsprogs-upstream.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/script')
-rwxr-xr-x | tests/j_recover_fast_commit/script | 26 |
1 files changed, 26 insertions, 0 deletions
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 |