Whamcloud - gitweb
LU-17986 tests: Update sanity-lnet 111 for IPv6 61/55561/2
authorChris Horn <chris.horn@hpe.com>
Thu, 27 Jun 2024 20:08:49 +0000 (14:08 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Jul 2024 20:13:02 +0000 (20:13 +0000)
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 <chris.horn@hpe.com>
Change-Id: I8dea5874dd01eb7f35603bed46660cd6c6b85041
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55561
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-lnet.sh

index 12774c9..43e2665 100755 (executable)
@@ -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"