Whamcloud - gitweb
LU-10338 test: handle empty CLIENTS in mountcli() 13/30413/2
authorJohn L. Hammond <john.hammond@intel.com>
Wed, 6 Dec 2017 21:27:22 +0000 (15:27 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 17 Dec 2017 06:20:45 +0000 (06:20 +0000)
In mountcli() use if [ -n "$CLIENTS" ]; ... rather than
[ -n "$CLIENTS" ] && ... to avoid immediate exit on error when CLIENTS is
the empty string.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I440c3eefb4bee134caee1db5ff2ecdbdf9c1ee5c
Reviewed-on: https://review.whamcloud.com/30413
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/test-framework.sh

index 113ea76..4c29a97 100755 (executable)
@@ -4129,12 +4129,16 @@ mountcli() {
                [ "$arg1" = "server_only" ] && return
        fi
        mount_client $MOUNT
-       [ -n "$CLIENTS" ] && zconf_mount_clients $CLIENTS $MOUNT
+       if [ -n "$CLIENTS" ]; then
+               zconf_mount_clients $CLIENTS $MOUNT
+       fi
        clients_up
 
        if [ "$MOUNT_2" ]; then
                mount_client $MOUNT2
-               [ -n "$CLIENTS" ] && zconf_mount_clients $CLIENTS $MOUNT2
+               if [ -n "$CLIENTS" ]; then
+                       zconf_mount_clients $CLIENTS $MOUNT2
+               fi
        fi
 }