From 1d509e6357b40b33ff88ad686a8fb29e95254869 Mon Sep 17 00:00:00 2001 From: Chris Horn Date: Thu, 27 Jun 2024 14:08:49 -0600 Subject: [PATCH] LU-17986 tests: Update sanity-lnet 111 for IPv6 Modify test_111 to use setup_router_test() so that it will use IPv6 NIDs for the --gateway argument when that is what the test environment has configured. The test is also modified to check success/failure of the route add command, and to verify that the correct number for routes were added. Test-Parameters: trivial Signed-off-by: Chris Horn Change-Id: I8dea5874dd01eb7f35603bed46660cd6c6b85041 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55561 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Serguei Smirnov Reviewed-by: Frank Sehr Reviewed-by: Oleg Drokin --- lustre/tests/sanity-lnet.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lustre/tests/sanity-lnet.sh b/lustre/tests/sanity-lnet.sh index 12774c9..43e2665 100755 --- a/lustre/tests/sanity-lnet.sh +++ b/lustre/tests/sanity-lnet.sh @@ -326,7 +326,6 @@ if [[ $NETTYPE =~ (tcp|o2ib)[0-9]* ]]; then if $FORCE_LARGE_NID; then always_except LU-14288 101 always_except LU-14288 103 - always_except LU-17986 111 always_except LU-17457 208 always_except LU-9680 213 always_except LU-17460 214 @@ -1808,14 +1807,23 @@ test_111() { [[ $(uname -r | grep "3.10") ]] && skip "Unsupported on RHEL7" - reinit_dlc || return $? - add_net "${NETTYPE}" "${INTERFACES[0]}" + setup_router_test || return $? + + local i + local gw=( ${ROUTER_NIDS[${ROUTERS[0]}]} ) - for index in {2..500} + for i in {2..500} do - do_lnetctl route add --net ${NETTYPE}${index} --gateway ${GW_NID} + do_lnetctl route add -n ${REMOTE_NET}${i} -g ${gw[0]} || + error "Failed to add route rc=$?" done - do_lnetctl route show || return $? + + local num_routes=$($LNETCTL route show 2>/dev/null | grep -c gateway) + + (( num_routes == 499 )) || + error "Expect 499 routes but found $num_routes" + + cleanup_router_test } run_test 111 "Test many routes" -- 1.8.3.1