Whamcloud - gitweb
LU-16822 tests: Setup IPv6 with fake network device 99/53599/3
authorJames Simmons <jsimmons@infradead.org>
Fri, 5 Jan 2024 14:00:24 +0000 (07:00 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 10 Jun 2024 06:07:58 +0000 (06:07 +0000)
Several of the LNet sanity test create a fake network device and
setup an IP. Only a IPv4 was setup so also setup a IPv6 address
to increase the testing coverage for large NID support.

Test-Parameters: trivial testlist=sanity-lnet
Change-Id: If29adf74f1fe6449ad3f48663c2872a39bf4664c
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53599
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity-lnet.sh

index d35e310..5663e08 100755 (executable)
@@ -64,6 +64,7 @@ TESTNS='test_ns'
 FAKE_IF="test1pg"
 FAKE_IP="10.1.2.3"
 FAKE_IP_ALIAS="10.1.2.31"
+FAKE_IPV6="2001:0db8:0:f101::1"
 do_ns() {
        echo "ip netns exec $TESTNS $*"
        ip netns exec $TESTNS "$@"
@@ -80,9 +81,11 @@ setup_fakeif() {
        ip link set 'test1pl' up
        if [[ -n $netns ]]; then
                do_ns ip addr add "${FAKE_IP}/31" dev $FAKE_IF
+               do_ns ip -6 addr add "${FAKE_IPV6}/64" dev $FAKE_IF
                do_ns ip link set $FAKE_IF up
        else
                ip addr add "${FAKE_IP}/31" dev $FAKE_IF
+               ip -6 addr add "${FAKE_IPV6}/64" dev $FAKE_IF
                ip link set $FAKE_IF up
        fi
 }