Skip to content

Commit 94f68c0

Browse files
committed
selftests: net: amt: indicate progress in the stress test
Our CI expects output from the test at least once every 10 minutes. The AMT test when running on debug kernel is just on the edge of that time for the stress test. Improve the output: - print the name of the test first, before starting it, - output a dot every 10% of the way. Output after: TEST: amt discovery [ OK ] TEST: IPv4 amt multicast forwarding [ OK ] TEST: IPv6 amt multicast forwarding [ OK ] TEST: IPv4 amt traffic forwarding torture .......... [ OK ] TEST: IPv6 amt traffic forwarding torture .......... [ OK ] Reviewed-by: Taehee Yoo <ap420073@gmail.com> Link: https://patch.msgid.link/20250403145636.2891166-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent af6610e commit 94f68c0

File tree

1 file changed

+14
-6
lines changed
  • tools/testing/selftests/net

1 file changed

+14
-6
lines changed

tools/testing/selftests/net/amt.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,21 @@ test_remote_ip()
194194

195195
send_mcast_torture4()
196196
{
197-
ip netns exec "${SOURCE}" bash -c \
198-
'cat /dev/urandom | head -c 1G | nc -w 1 -u 239.0.0.1 4001'
197+
for i in `seq 10`; do
198+
ip netns exec "${SOURCE}" bash -c \
199+
'cat /dev/urandom | head -c 100M | nc -w 1 -u 239.0.0.1 4001'
200+
echo -n "."
201+
done
199202
}
200203

201204

202205
send_mcast_torture6()
203206
{
204-
ip netns exec "${SOURCE}" bash -c \
205-
'cat /dev/urandom | head -c 1G | nc -w 1 -u ff0e::5:6 6001'
207+
for i in `seq 10`; do
208+
ip netns exec "${SOURCE}" bash -c \
209+
'cat /dev/urandom | head -c 100M | nc -w 1 -u ff0e::5:6 6001'
210+
echo -n "."
211+
done
206212
}
207213

208214
check_features()
@@ -278,10 +284,12 @@ wait $pid || err=$?
278284
if [ $err -eq 1 ]; then
279285
ERR=1
280286
fi
287+
printf "TEST: %-50s" "IPv4 amt traffic forwarding torture"
281288
send_mcast_torture4
282-
printf "TEST: %-60s [ OK ]\n" "IPv4 amt traffic forwarding torture"
289+
printf " [ OK ]\n"
290+
printf "TEST: %-50s" "IPv6 amt traffic forwarding torture"
283291
send_mcast_torture6
284-
printf "TEST: %-60s [ OK ]\n" "IPv6 amt traffic forwarding torture"
292+
printf " [ OK ]\n"
285293
sleep 5
286294
if [ "${ERR}" -eq 1 ]; then
287295
echo "Some tests failed." >&2

0 commit comments

Comments
 (0)