[lvm-devel] master - tests: validate passed LVM_TEST_DEVDIR

Zdenek Kabelac zkabelac at fedoraproject.org
Mon May 4 08:21:26 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3f05e662bbb0a02315e3ef806543fd3e092f40f0
Commit:        3f05e662bbb0a02315e3ef806543fd3e092f40f0
Parent:        b09ac72624031a7d6d0b6416a067aa60584e0d6c
Author:        Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate:    Mon May 4 10:15:56 2015 +0200
Committer:     Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Mon May 4 10:15:56 2015 +0200

tests: validate passed LVM_TEST_DEVDIR

Quit test early if passed LVM_TEST_DEVDIR dir does not exists.
---
 test/lib/inittest.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh
index b577389..cd6471c 100644
--- a/test/lib/inittest.sh
+++ b/test/lib/inittest.sh
@@ -60,6 +60,7 @@ DM_DEV_DIR="$TESTDIR/dev"
 LVM_SYSTEM_DIR="$TESTDIR/etc"
 mkdir "$LVM_SYSTEM_DIR" "$DM_DEV_DIR"
 if test -n "$LVM_TEST_DEVDIR" ; then
+	test -d "$LVM_TEST_DEVDIR" || die "Test device directory LVM_TEST_DEVDIR=\"$LVM_TEST_DEVDIR\" is not valid."
 	DM_DEV_DIR=$LVM_TEST_DEVDIR
 else
 	mknod "$DM_DEV_DIR/testnull" c 1 3 || die "mknod failed"




More information about the lvm-devel mailing list