X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-lnet.sh;h=485e105d002ffc77b528e1634f0a5394041f5e90;hb=3b263dd80ee56efae922e2cfcab375dbe2cb273a;hp=74eb19a3e5a60d982c3e3580f9c0d757ccdbc292;hpb=2ce6957b69370b0ce75725d1d91866bf55c07fa8;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity-lnet.sh b/lustre/tests/sanity-lnet.sh index 74eb19a..485e105 100755 --- a/lustre/tests/sanity-lnet.sh +++ b/lustre/tests/sanity-lnet.sh @@ -1960,6 +1960,34 @@ test_212() { } run_test 212 "Check discovery refcount loss bug (LU-14627)" +test_213() { + have_interface "eth0" || skip "Need eth0 interface with ipv4 configured" + + cleanup_netns || error "Failed to cleanup netns before test execution" + cleanup_lnet || error "Failed to unload modules before test execution" + + setup_fakeif || error "Failed to add fake IF" + have_interface "$FAKE_IF" || + error "Expect $FAKE_IF configured but not found" + + reinit_dlc || return $? + + add_net "tcp" "eth0" || return $? + add_net "tcp" "$FAKE_IF" || return $? + + local nid1=$(lctl list_nids | head -n 1) + local nid2=$(lctl list_nids | tail --lines 1) + + [[ $(lctl which_nid $nid1 $nid2) == $nid1 ]] || + error "Expect nid1 \"$nid1\" to be preferred" + + [[ $(lctl which_nid $nid2 $nid1) == $nid2 ]] || + error "Expect nid2 \"$nid2\" to be preferred" + + return 0 +} +run_test 213 "Check LNetDist calculation for multiple local NIDs" + test_300() { # LU-13274 local header