From 67b7b4bc4090e83059384b8c870ed09ab410ad5b Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 11 Sep 2017 17:29:03 +0200 Subject: [PATCH] btrfs-progs: tests: fix run_mustfail in cli-tests/007-check-force The sanity check in run_mustfail does not work as expected and allowed the command to continue without the missing parameter Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196893 Signed-off-by: David Sterba --- tests/cli-tests/007-check-force/test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/cli-tests/007-check-force/test.sh b/tests/cli-tests/007-check-force/test.sh index ecee016..8b60033 100755 --- a/tests/cli-tests/007-check-force/test.sh +++ b/tests/cli-tests/007-check-force/test.sh @@ -12,10 +12,13 @@ prepare_test_dev run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV" run_check_mount_test_dev -run_mustfail $SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV" +run_mustfail "checking mounted filesystem without --force" \ + $SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV" run_check $SUDO_HELPER "$TOP/btrfs" check --force "$TEST_DEV" -run_mustfail $SUDO_HELPER "$TOP/btrfs" check --force --repair "$TEST_DEV" +run_mustfail "checking mounted filesystem with --force --repair" \ + $SUDO_HELPER "$TOP/btrfs" check --force --repair "$TEST_DEV" run_check_umount_test_dev run_check $SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV" run_check $SUDO_HELPER "$TOP/btrfs" check --force "$TEST_DEV" -run_mustfail $SUDO_HELPER "$TOP/btrfs" check --force --repair "$TEST_DEV" +run_mustfail "--force --repair on unmounted filesystem" \ + $SUDO_HELPER "$TOP/btrfs" check --force --repair "$TEST_DEV" -- 2.7.4