Whamcloud - gitweb
LU-814 tests: remove leading spaces from $WRITE_DISJOINT
authorYu Jian <yujian@whamcloud.com>
Tue, 22 May 2012 11:38:42 +0000 (19:38 +0800)
committerJohann Lombardi <johann@whamcloud.com>
Wed, 23 May 2012 15:11:19 +0000 (11:11 -0400)
In functions.sh, the WRITE_DISJOINT variable is defined as follows:

    WRITE_DISJOINT=${WRITE_DISJOINT:-\
        $(which write_disjoint 2> /dev/null || true)}

This will assign WRITE_DISJOINT with a value leading with spaces,
which causes "[: too many arguments" issue while checking the
variable. The PARALLEL_GROUPLOCK variable also has the same issue.
This patch fixes it.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I424af2acd4ef79ea67830010d17b6904769c2ca4
Reviewed-on: http://review.whamcloud.com/2866
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
lustre/tests/functions.sh

index b5a96b7..5b12290 100644 (file)
@@ -591,8 +591,8 @@ run_write_append_truncate() {
 
 run_write_disjoint() {
 
-    WRITE_DISJOINT=${WRITE_DISJOINT:-\
-        $(which write_disjoint 2> /dev/null || true)}
+    WRITE_DISJOINT=${WRITE_DISJOINT:-$(which write_disjoint \
+        2> /dev/null || true)}
     # threads per client
     wdisjoint_THREADS=${wdisjoint_THREADS:-4}
     wdisjoint_REP=${wdisjoint_REP:-10000}
@@ -630,8 +630,8 @@ run_write_disjoint() {
 
 run_parallel_grouplock() {
 
-    PARALLEL_GROUPLOCK=${PARALLEL_GROUPLOCK:-\
-        $(which parallel_grouplock 2> /dev/null || true)}
+    PARALLEL_GROUPLOCK=${PARALLEL_GROUPLOCK:-$(which parallel_grouplock \
+        2> /dev/null || true)}
     parallel_grouplock_MINTASKS=${parallel_grouplock_MINTASKS:-5}
 
     if [ "$NFSCLIENT" ]; then