run_mustfail() checks the return value but doesn't check if the failure is graceful.
Add such ungraceful failure check, for incoming "mkfs.btrfs --rootdir" test cases, as old "--rootdir" never fail gracefully. Signed-off-by: Qu Wenruo <quwenruo.bt...@gmx.com> --- tests/common | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/common b/tests/common index 242ded1d..b49d9ff3 100644 --- a/tests/common +++ b/tests/common @@ -227,6 +227,11 @@ run_mustfail() $INSTRUMENT "$@" >> "$RESULTS" 2>&1 fi if [ $? != 0 ]; then + if [ $? -gt 128 ]; then + "failed (ungracefully): $@" >> "$RESULTS" + _fail "unexpected ungraceful failure: $msg" + return 1 + fi echo "failed (expected): $@" >> "$RESULTS" return 0 else -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html