diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2019-12-10 13:30:55 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2019-12-10 15:44:16 +0100 |
commit | 3b6defcf1fb20d3a9b2fb4f407e9abd4a8291bb0 (patch) | |
tree | b2333ccaf69bdb2e68d11f1aa577d863e1688ddc | |
parent | 8ab1d489f3e3ab140f014d5b5a10859e396bce66 (diff) | |
download | lvm2-3b6defcf1fb20d3a9b2fb4f407e9abd4a8291bb0.tar.gz |
test: fail on device create
Correct validation of prepared device and fail if the device can't
be created.
-rw-r--r-- | test/lib/aux.sh | 6 |
1 files changed, 5 insertions, 1 deletions
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 "$@" |