summaryrefslogtreecommitdiffstats
path: root/tests/m_mmp_bad_magic/script
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/m_mmp_bad_magic/script
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 'tests/m_mmp_bad_magic/script')
-rw-r--r--tests/m_mmp_bad_magic/script27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/m_mmp_bad_magic/script b/tests/m_mmp_bad_magic/script
new file mode 100644
index 0000000..a5e222e
--- /dev/null
+++ b/tests/m_mmp_bad_magic/script
@@ -0,0 +1,27 @@
+gzip -dc < $test_dir/image.gz > $TMPFILE
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+$E2MMPSTATUS $TMPFILE > $OUT 2>&1
+echo Exit status is $? >> $OUT
+$FSCK -fy $TMPFILE >> $OUT 2>&1
+echo Exit status is $? >> $OUT
+$E2MMPSTATUS $TMPFILE >> $OUT 2>&1
+echo Exit status is $? >> $OUT
+$E2MMPSTATUS -i $TMPFILE >> $OUT 2>&1
+sed -f $cmd_dir/filter.sed $OUT > $OUT.new
+mv $OUT.new $OUT
+
+rm -f $TMPFILE
+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
+unset OUT EXP