Whamcloud - gitweb
LU-12229 tests: fix "bad substitution" error 43/36243/3
authorEmoly Liu <emoly@whamcloud.com>
Thu, 19 Sep 2019 10:26:31 +0000 (18:26 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 4 Oct 2019 03:44:54 +0000 (03:44 +0000)
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.

Test-Parameters:trivial clientdistro=el8 testlist=ost-pools
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Ifce4616cd7f314416fe5fa09f8fba846ae45bcef
Reviewed-on: https://review.whamcloud.com/36243
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/ost-pools.sh

index bdfe65e..e91fb95 100755 (executable)
@@ -278,14 +278,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"
 }