Whamcloud - gitweb
LU-2469 tests: use MDS/OSTDEV and MDS/OSTDEVBASE with zfs
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Tue, 18 Dec 2012 19:05:55 +0000 (14:05 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 Jan 2013 05:55:50 +0000 (00:55 -0500)
Add support for using MDSDEVn, OSTDEVn, MDSDEVBASE and OSTDEVBASE
variables when testing with zfs.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I89115ce935294cdbbd6620fec3f9dc3eb76f8960
Reviewed-on: http://review.whamcloud.com/4854
Tested-by: Hudson
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/tests/test-framework.sh

index 76c6c3a..2fa0007 100644 (file)
@@ -2598,8 +2598,9 @@ ostdevname() {
                        #if $OSTDEVn isn't defined, default is $OSTDEVBASE + num
                        eval DEVPTR=${!DEVNAME:=${OSTDEVBASE}${num}};;
                zfs )
-                       #dataset name is independent of vdev device names
-                       eval DEVPTR=${FSNAME}-ost${num}/ost${num};;
+                       #try $OSTDEVn then $OSTDEVBASE + num then zfs default
+                       local foo=${OSTDEVBASE:-${FSNAME}-ost${num}/ost}${num}
+                       eval DEVPTR=${!DEVNAME:=$foo};;
                * )
                        error "unknown fstype!";;
        esac
@@ -2638,8 +2639,9 @@ mdsdevname() {
                        #if $MDSDEVn isn't defined, default is $MDSDEVBASE + num
                        eval DEVPTR=${!DEVNAME:=${MDSDEVBASE}${num}};;
                zfs )
-                       #dataset name is independent of vdev device names
-                       eval DEVPTR=${FSNAME}-mdt${num}/mdt${num};;
+                       # try $MDSDEVn then $MDSDEVBASE + num then zfs default
+                       local foo=${MDSDEVBASE:-${FSNAME}-mdt${num}/mdt}${num}
+                       eval DEVPTR=${!DEVNAME:=$foo};;
                * )
                        error "unknown fstype!";;
        esac