Patch "selftests/net: Find nettest in current directory" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/net: Find nettest in current directory

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-net-find-nettest-in-current-directory.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ee66e69adf49d0b70c6047f373021590d86b0d79
Author: Daniel Díaz <daniel.diaz@xxxxxxxxxx>
Date:   Thu Nov 17 21:44:21 2022 -0600

    selftests/net: Find nettest in current directory
    
    [ Upstream commit bd5e1e42826f18147afb0ba07e6a815f52cf8bcb ]
    
    The `nettest` binary, built from `selftests/net/nettest.c`,
    was expected to be found in the path during test execution of
    `fcnal-test.sh` and `pmtu.sh`, leading to tests getting
    skipped when the binary is not installed in the system, as can
    be seen in these logs found in the wild [1]:
    
      # TEST: vti4: PMTU exceptions                                         [SKIP]
      [  350.600250] IPv6: ADDRCONF(NETDEV_CHANGE): veth_b: link becomes ready
      [  350.607421] IPv6: ADDRCONF(NETDEV_CHANGE): veth_a: link becomes ready
      # 'nettest' command not found; skipping tests
      #   xfrm6udp not supported
      # TEST: vti6: PMTU exceptions (ESP-in-UDP)                            [SKIP]
      [  351.605102] IPv6: ADDRCONF(NETDEV_CHANGE): veth_b: link becomes ready
      [  351.612243] IPv6: ADDRCONF(NETDEV_CHANGE): veth_a: link becomes ready
      # 'nettest' command not found; skipping tests
      #   xfrm4udp not supported
    
    The `unicast_extensions.sh` tests also rely on `nettest`, but
    it runs fine there because it looks for the binary in the
    current working directory [2]:
    
    The same mechanism that works for the Unicast extensions tests
    is here copied over to the PMTU and functional tests.
    
    [1] https://lkft.validation.linaro.org/scheduler/job/5839508#L6221
    [2] https://lkft.validation.linaro.org/scheduler/job/5839508#L7958
    
    Signed-off-by: Daniel Díaz <daniel.diaz@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
index 91f54112167f..364c82b797c1 100755
--- a/tools/testing/selftests/net/fcnal-test.sh
+++ b/tools/testing/selftests/net/fcnal-test.sh
@@ -4072,10 +4072,13 @@ elif [ "$TESTS" = "ipv6" ]; then
 	TESTS="$TESTS_IPV6"
 fi
 
-which nettest >/dev/null
-if [ $? -ne 0 ]; then
-	echo "'nettest' command not found; skipping tests"
-	exit $ksft_skip
+# nettest can be run from PATH or from same directory as this selftest
+if ! which nettest >/dev/null; then
+	PATH=$PWD:$PATH
+	if ! which nettest >/dev/null; then
+		echo "'nettest' command not found; skipping tests"
+		exit $ksft_skip
+	fi
 fi
 
 declare -i nfail=0
diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index 694732e4b344..da6ab300207c 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -671,10 +671,12 @@ setup_xfrm() {
 }
 
 setup_nettest_xfrm() {
-	which nettest >/dev/null
-	if [ $? -ne 0 ]; then
-		echo "'nettest' command not found; skipping tests"
-	        return 1
+	if ! which nettest >/dev/null; then
+		PATH=$PWD:$PATH
+		if ! which nettest >/dev/null; then
+			echo "'nettest' command not found; skipping tests"
+			return 1
+		fi
 	fi
 
 	[ ${1} -eq 6 ] && proto="-6" || proto=""



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux