Whamcloud - gitweb
LU-915 tests: MKFSOPTS fix for test suite
authorJames Simmons <uja.ornl@gmail.com>
Thu, 12 Jan 2012 15:00:06 +0000 (10:00 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 16 Feb 2012 17:02:54 +0000 (12:02 -0500)
While testing LU-80 I had to provide my own MKFSOPT string
for the mkfsoptions in local.sh. In the conf-sanity test
the MKFSOPT provided were totally replaced by a new MKFSOPT
that contained only lazy_itable_init. This prevented me from
running any conf-sanity test bacause I couldn't format the
MDS. This patch instead appends lazy_itable_init to the
mkfsoptions string if it already exist.

Change-Id: If30d2a692431dcdb3631fc9c1e77da5ff2792881
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/1830
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index 6b3b646..da81213 100644 (file)
@@ -54,8 +54,12 @@ for facet in MGS MDS OST; do
     if [[ ${!opts} != *lazy_itable_init* ]]; then
         eval SAVED_${facet}_MKFS_OPTS=\"${!opts}\"
-        eval ${facet}_MKFS_OPTS=\"${!opts} \
---mkfsoptions='\\\"-E lazy_itable_init\\\"'\"
+        if [[ ${!opts} != *mkfsoptions* ]]; then
+            eval ${facet}_MKFS_OPTS=\"${!opts} --mkfsoptions='\\\"-E lazy_itable_init\\\"'\"
+        else
+            val=${!opts//--mkfsoptions=\\\"/--mkfsoptions=\\\"-E lazy_itable_init }
+            eval ${facet}_MKFS_OPTS='${val}'
+        fi