e2fsck: add a 'yes to all' response in interactive mode
[e2fsprogs.git] / tests / f_no / script
blob2a67e77a797ad5479ca7a7ee51f77876bc2d233d
1 test_description="e2fsck with repeated no"
2 FSCK_OPT=-f
3 OUT=$test_name.log
4 EXP=$test_dir/expect
6 gunzip < $test_dir/../f_yesall/image.gz > $TMPFILE
8 rm -rf $OUT
9 echo "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | E2FSCK_FORCE_INTERACTIVE=y $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
10 status=$?
11 echo Exit status is $status >> $OUT.new
12 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
13 rm -f $OUT.new
15 cmp -s $OUT $EXP
16 status=$?
18 if [ "$status" = 0 ] ; then
19         echo "$test_name: $test_description: ok"
20         touch $test_name.ok
21 else
22         echo "$test_name: $test_description: failed"
23         diff $DIFF_OPTS $EXP $OUT > $test_name.failed
24         rm -f tmp_expect
27 unset IMAGE FSCK_OPT OUT EXP