From d102cd7db00fca88af27cba73fe5b7a4fd8f8484 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 5 Dec 2017 20:55:13 -0500 Subject: [PATCH] tests: Change test-corruption to use fatal() It's clearer. Closes: #1364 Approved by: jlebon --- tests/test-corruption.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test-corruption.sh b/tests/test-corruption.sh index 52a8189a..cb5e9c09 100755 --- a/tests/test-corruption.sh +++ b/tests/test-corruption.sh @@ -29,7 +29,9 @@ setup_test_repository "bare" $OSTREE checkout test2 checkout-test2 cd checkout-test2 chmod o+x firstfile -$OSTREE fsck -q && (echo 1>&2 "fsck unexpectedly succeeded"; exit 1) +if $OSTREE fsck -q; then + fatal "fsck unexpectedly succeeded" +fi chmod o-x firstfile $OSTREE fsck -q @@ -54,7 +56,9 @@ rm checkout-test2 -rf $OSTREE checkout test2 checkout-test2 cd checkout-test2 chmod o+x firstfile -$OSTREE fsck -q --delete && (echo 1>&2 "fsck unexpectedly succeeded"; exit 1) +if $OSTREE fsck -q --delete; then + fatal "fsck unexpectedly succeeded" +fi echo "ok chmod"