From: Emoly Liu Date: Thu, 19 Sep 2019 10:26:31 +0000 (+0800) Subject: LU-12229 tests: fix "bad substitution" error X-Git-Tag: 2.12.3-RC1~7 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F77%2F36377%2F2;p=fs%2Flustre-release.git LU-12229 tests: fix "bad substitution" error In newer bash version, the special characters is invalid in the usage of indirect variable expansion {!word}. For example, # a=lustre,pool # echo ${!a} -bash: lustre,pool: bad substitution To avoid "bad sustitution" error, pool_new command is used in test_1j and test_1k directly. Lustre-change: https://review.whamcloud.com/36243 Lustre-commit: ac426d6f17b80ed36052f11b9780fa444cfa24aa Test-Parameters:trivial clientdistro=el8 testlist=ost-pools Signed-off-by: Emoly Liu Change-Id: Ifce4616cd7f314416fe5fa09f8fba846ae45bcef Reviewed-by: Li Xi Reviewed-by: Jian Yu Reviewed-by: James Nunez Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/36377 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index 1a97cef..450ac96 100755 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -281,14 +281,14 @@ test_1i() { run_test 1i "pool_new should fail if poolname and fs-name are missing" test_1j() { - create_pool ${FSNAME},$POOL + do_facet mgs lctl pool_new ${FSNAME},$POOL [[ $? -ne 0 ]] || error "pool_new did not fail even if poolname format was wrong" } run_test 1j "pool_new should fail if poolname format is wrong" test_1k() { - create_pool ${FSNAME}/$POOL + do_facet mgs lctl pool_new ${FSNAME}/$POOL [[ $? -ne 0 ]] || error "pool_new did not fail even if poolname format was wrong" }