lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250618182029.GV1699@horms.kernel.org>
Date: Wed, 18 Jun 2025 19:20:29 +0100
From: Simon Horman <horms@...nel.org>
To: Yuyang Huang <yuyanghuang@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Shuah Khan <shuah@...nel.org>, netdev@...r.kernel.org,
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] selftest: add selftest for anycast notifications

On Wed, Jun 18, 2025 at 07:40:25PM +0900, Yuyang Huang wrote:
> This commit adds a new kernel selftest to verify RTNLGRP_IPV6_ACADDR
> notifications. The test works by adding/removing a dummy interface,
> enabling packet forwarding, and then confirming that user space can
> correctly receive anycast notifications.
> 
> The test relies on the iproute2 version to be 6.13+.
> 
> Tested by the following command:
> $ vng -v --user root --cpus 16 -- \
> make -C tools/testing/selftests TARGETS=net
> TEST_PROGS=rtnetlink_notification.sh \
> TEST_GEN_PROGS="" run_tests
> 
> Signed-off-by: Yuyang Huang <yuyanghuang@...gle.com>
> ---
>  .../selftests/net/rtnetlink_notification.sh   | 52 +++++++++++++++++--
>  1 file changed, 47 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/rtnetlink_notification.sh b/tools/testing/selftests/net/rtnetlink_notification.sh

...

> @@ -18,12 +20,11 @@ kci_test_mcast_addr_notification()
>  	local tmpfile
>  	local monitor_pid
>  	local match_result
> -	local test_dev="test-dummy1"
>  
>  	tmpfile=$(mktemp)
>  	defer rm "$tmpfile"
>  
> -	ip monitor maddr > $tmpfile &
> +	ip monitor maddr > "$tmpfile" &
>  	monitor_pid=$!
>  	defer kill_process "$monitor_pid"
>  
> @@ -32,7 +33,7 @@ kci_test_mcast_addr_notification()
>  	if [ ! -e "/proc/$monitor_pid" ]; then
>  		RET=$ksft_skip
>  		log_test "mcast addr notification: iproute2 too old"
> -		return $RET
> +		return "$RET"
>  	fi
>  
>  	ip link add name "$test_dev" type dummy

> @@ -53,7 +54,48 @@ kci_test_mcast_addr_notification()
>  		RET=$ksft_fail
>  	fi
>  	log_test "mcast addr notification: Expected 4 matches, got $match_result"
> -	return $RET
> +	return "$RET"
> +}

...

> @@ -67,4 +109,4 @@ require_command ip
>  
>  tests_run
>  
> -exit $EXIT_STATUS
> +exit "$EXIT_STATUS"

Hi,

While I like the changes above (that I haven't trimmed-out)
these seem to be clean-ups that aren't strictly related
to the subject of this patch. IOW, they don't belong in this patch
(but could be a separate patch).

-- 
pw-bot: changes-requested

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ