]> sourceware.org Git - lvm2.git/commitdiff
test: fail on device create
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 10 Dec 2019 12:30:55 +0000 (13:30 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 10 Dec 2019 14:44:16 +0000 (15:44 +0100)
Correct validation of prepared device and fail if the device can't
be created.

test/lib/aux.sh

index cbe0e21340ed8bc6acd1a96bfe726c2ec31a6550..ea126de8a1fd5f7a52d8e6ddcdbb95a6e1c3abc0 100644 (file)
@@ -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 "$@"
This page took 0.084415 seconds and 5 git commands to generate.