From 01ec56e3ed5a0b08f8d1b143e0f00adbdb2e5183 Mon Sep 17 00:00:00 2001 From: Kit Westneat Date: Mon, 5 Jan 2015 00:12:47 -0500 Subject: [PATCH] LU-6026 tests: modify sanity-sec use right LNET, flush locks There were a couple of spots in sanity-sec that had the @tcp LNET type hardcoded in. This caused it to fail on other LNET networks, like o2ib. This patch uses the $NETTYPES variable to determine the correct NID. There is also a chance that the client will not flush its locks prior to doing the nodemap tests. This patch adds a line to force a flush. Test-Parameters: alwaysuploadlogs nettypes=o2ib testlist=sanity-sec Signed-off-by: Kit Westneat Change-Id: I68c6400217100939c171ad3707ed834c98a7755a Reviewed-on: http://review.whamcloud.com/13235 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Andreas Dilger --- lustre/tests/sanity-sec.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 3a478f2..a70ea40 100644 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -1220,14 +1220,15 @@ create_fops_nodemaps() { local i=0 local client for client in $clients; do - local client_ip=$($LUSTRE/tests/resolveip $client) + local client_ip=$(host_nids_address $client $NETTYPE) + local client_nid=$(h2$NETTYPE $client_ip) do_facet mgs $LCTL nodemap_add c${i} || return 1 do_facet mgs $LCTL nodemap_add_range \ - --name c${i} --range $client_ip@tcp || return 1 + --name c${i} --range $client_nid || return 1 do_facet ost0 $LCTL set_param nodemap.add_nodemap=c${i} || return 1 do_facet ost0 "$LCTL set_param nodemap.add_nodemap_range='c$i \ - $client_ip@tcp'" || return 1 + $client_nid'" || return 1 for map in ${FOPS_IDMAPS[i]}; do do_facet mgs $LCTL nodemap_add_idmap --name c${i} \ --idtype uid --idmap ${map} || return 1 @@ -1282,6 +1283,9 @@ fops_test_setup() { do_facet ost0 $LCTL set_param nodemap.c0.admin_nodemap=$admin do_facet ost0 $LCTL set_param nodemap.c0.trusted_nodemap=$trust + # flush MDT locks to make sure they are reacquired before test + do_node ${clients_arr[0]} lctl set_param \ + ldlm.namespaces.$FSNAME-MDT*.lru_size=clear } do_create_delete() { @@ -1311,8 +1315,8 @@ nodemap_check_quota() { do_fops_quota_test() { local run_u=$1 # define fuzz as 2x ost block size in K - local quota_fuzz=$(($(lctl get_param -n osc.lustre-OST0000-*.blocksize | - head -1) / 512)) + local quota_fuzz=$(($(lctl get_param -n \ + osc.$FSNAME-OST0000-*.blocksize | head -1) / 512)) local qused_orig=$(nodemap_check_quota "$run_u") local qused_low=$((qused_orig - quota_fuzz)) local qused_high=$((qused_orig + quota_fuzz)) @@ -1636,7 +1640,6 @@ nodemap_acl_test() { nodemap_acl_test_setup sleep 5 - do_node $set_client $RUNAS_USER find $DIR/ -ls do_node $set_client $RUNAS_USER touch $testfile # ACL masks aren't filtered by nodemap code, so we ignore them -- 1.8.3.1