summaryrefslogtreecommitdiffstats
path: root/tests/f_yesthenno/script
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/f_yesthenno/script26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/f_yesthenno/script b/tests/f_yesthenno/script
new file mode 100644
index 0000000..5bbc0c6
--- /dev/null
+++ b/tests/f_yesthenno/script
@@ -0,0 +1,26 @@
+test_description="e2fsck with yes then no"
+FSCK_OPT=-f
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $test_dir/../f_yesall/image.gz > $TMPFILE
+
+echo "yyyyyyyyyynnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | 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