From acd00754e01dc3a9037fb6c8595a89e3f63693ab Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Wed, 6 Dec 2017 15:27:22 -0600 Subject: [PATCH] LU-10338 test: handle empty CLIENTS in mountcli() 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 Change-Id: I440c3eefb4bee134caee1db5ff2ecdbdf9c1ee5c Reviewed-on: https://review.whamcloud.com/30413 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/test-framework.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 113ea76..4c29a97 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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 } -- 1.8.3.1