Whamcloud - gitweb
LU-10907 tests: improve nodemap_test_setup() 18/32018/5
authorEmoly Liu <emoly.liu@intel.com>
Tue, 17 Apr 2018 03:08:04 +0000 (11:08 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 17 May 2018 02:31:05 +0000 (02:31 +0000)
Do wait_nm_sync() after modifying default.admin_nodemap, otherwise
it might cause the latter sync to fail.

Also, this patch checks the number of clients for sanity-sec.sh
test_23a, 2 clients at least for nodemap c0 and c1.

Test-Parameters: trivial testlist=sanity-sec

Change-Id: I7c7d5929b2f2b5aaaa0e7e884fa296fdf3cc1b57
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/32018
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-sec.sh

index 7e3d2e4..885ec84 100755 (executable)
@@ -1493,6 +1493,7 @@ nodemap_test_setup() {
 
        do_facet mgs $LCTL nodemap_modify --name default \
                --property admin --value 1
+       wait_nm_sync default admin_nodemap
        do_facet mgs $LCTL nodemap_modify --name default \
                --property trusted --value 1
        wait_nm_sync default trusted_nodemap
@@ -1506,6 +1507,7 @@ nodemap_test_cleanup() {
 
        do_facet mgs $LCTL nodemap_modify --name default \
                 --property admin --value 0
+       wait_nm_sync default admin_nodemap
        do_facet mgs $LCTL nodemap_modify --name default \
                 --property trusted --value 0
        wait_nm_sync default trusted_nodemap
@@ -1694,6 +1696,7 @@ nodemap_acl_test() {
 }
 
 test_23a() {
+       [ $num_clients -lt 2 ] && skip "Need 2 clients at least" && return
        nodemap_version_check || return 0
        nodemap_test_setup