From 3b6defcf1fb20d3a9b2fb4f407e9abd4a8291bb0 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 10 Dec 2019 13:30:55 +0100 Subject: [PATCH] test: fail on device create Correct validation of prepared device and fail if the device can't be created. --- test/lib/aux.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lib/aux.sh b/test/lib/aux.sh index cbe0e2134..ea126de8a 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -874,7 +874,11 @@ prepare_devs() { wait finish_udev_transaction - if test -f CREATE_FAILED -a -n "$LVM_TEST_BACKING_DEVICE"; then + if test -f CREATE_FAILED ; then + if test -z "$LVM_TEST_BACKING_DEVICE"; then + echo "failed" + return 1 + fi LVM_TEST_BACKING_DEVICE= rm -f BACKING_DEV CREATE_FAILED prepare_devs "$@"