Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2] selftests: net: add socat syslog for PPPoL2TP
@ 2026-05-29  2:11 Qingfang Deng
  2026-05-29  3:21 ` Matthieu Baerts
  2026-06-02 18:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 5+ messages in thread
From: Qingfang Deng @ 2026-05-29  2:11 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Shuah Khan, Qingfang Deng, linux-ppp, netdev,
	linux-kselftest, linux-kernel
  Cc: Matthieu Baerts

As done in pppoe.sh, start socat as the syslog listener. In case the
test fails, dump its log to see what's going on.

Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
v2: move syslog dump to the end and use EXIT_STATUS
v1: https://lore.kernel.org/netdev/20260526014152.532505-1-qingfang.deng@linux.dev/
 tools/testing/selftests/net/ppp/pppol2tp.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tools/testing/selftests/net/ppp/pppol2tp.sh b/tools/testing/selftests/net/ppp/pppol2tp.sh
index 5b592785f1f9..37c4d56c5c6e 100755
--- a/tools/testing/selftests/net/ppp/pppol2tp.sh
+++ b/tools/testing/selftests/net/ppp/pppol2tp.sh
@@ -9,10 +9,12 @@ OUTER_IP_SERVER="172.16.1.1"
 OUTER_IP_CLIENT="172.16.1.2"
 
 PPPOL2TP_DIR=$(mktemp -d /tmp/pppol2tp.XXXXXX)
+PPPOL2TP_LOG="$PPPOL2TP_DIR/l2tp.log"
 
 # shellcheck disable=SC2329
 cleanup() {
 	cleanup_all_ns
+	[ -n "$SOCAT_PID" ] && kill_process "$SOCAT_PID"
 	rm -rf "$PPPOL2TP_DIR"
 }
 
@@ -31,6 +33,10 @@ ip -netns "$NS_CLIENT" link set "$VETH_CLIENT" up
 ip -netns "$NS_SERVER" address add dev "$VETH_SERVER" "$OUTER_IP_SERVER" peer "$OUTER_IP_CLIENT"
 ip -netns "$NS_CLIENT" address add dev "$VETH_CLIENT" "$OUTER_IP_CLIENT" peer "$OUTER_IP_SERVER"
 
+# Start socat as syslog listener
+socat -v -u UNIX-RECV:/dev/log OPEN:/dev/null > "$PPPOL2TP_LOG" 2>&1 &
+SOCAT_PID=$!
+
 # Generate configuration files
 cat > "$PPPOL2TP_DIR/l2tp-server.conf" <<EOF
 [global]
@@ -92,4 +98,13 @@ check_fail $?
 
 log_test "PPPoL2TP Recursion"
 
+# Dump syslog messages if the test failed
+if [ "$EXIT_STATUS" -ne 0 ]; then
+	while read -r _sign _date _time len _from _to
+	do      len=${len##*=}
+		read -n "$len" -r LINE
+		echo "$LINE"
+	done < "$PPPOL2TP_LOG"
+fi
+
 exit "$EXIT_STATUS"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2] selftests: net: add socat syslog for PPPoL2TP
  2026-05-29  2:11 [PATCH net-next v2] selftests: net: add socat syslog for PPPoL2TP Qingfang Deng
@ 2026-05-29  3:21 ` Matthieu Baerts
  2026-06-03  4:04   ` Matthieu Baerts
  2026-06-02 18:50 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 5+ messages in thread
From: Matthieu Baerts @ 2026-05-29  3:21 UTC (permalink / raw)
  To: Qingfang Deng
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Shuah Khan, linux-ppp, netdev, linux-kselftest,
	linux-kernel

Hi Qingfang,

On 29/05/2026 12:11, Qingfang Deng wrote:
> As done in pppoe.sh, start socat as the syslog listener. In case the
> test fails, dump its log to see what's going on.
Thank you for the v2, it looks good to me:

Reviewed-by: Matthieu Baerts <matttbe@kernel.org>

Hopefully this will help you to understand why this test is flaky, so a
fix can be provided, then this test can be unignored.

https://netdev.bots.linux.dev/contest.html?skip=0&test=pppol2tp-sh

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2] selftests: net: add socat syslog for PPPoL2TP
  2026-05-29  2:11 [PATCH net-next v2] selftests: net: add socat syslog for PPPoL2TP Qingfang Deng
  2026-05-29  3:21 ` Matthieu Baerts
@ 2026-06-02 18:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-06-02 18:50 UTC (permalink / raw)
  To: Qingfang Deng
  Cc: davem, edumazet, kuba, pabeni, horms, shuah, linux-ppp, netdev,
	linux-kselftest, linux-kernel, matttbe

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 29 May 2026 10:11:42 +0800 you wrote:
> As done in pppoe.sh, start socat as the syslog listener. In case the
> test fails, dump its log to see what's going on.
> 
> Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
> ---
> v2: move syslog dump to the end and use EXIT_STATUS
> v1: https://lore.kernel.org/netdev/20260526014152.532505-1-qingfang.deng@linux.dev/
>  tools/testing/selftests/net/ppp/pppol2tp.sh | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)

Here is the summary with links:
  - [net-next,v2] selftests: net: add socat syslog for PPPoL2TP
    https://git.kernel.org/netdev/net-next/c/ae4ef7271c28

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2] selftests: net: add socat syslog for PPPoL2TP
  2026-05-29  3:21 ` Matthieu Baerts
@ 2026-06-03  4:04   ` Matthieu Baerts
  2026-06-03  5:35     ` Qingfang Deng
  0 siblings, 1 reply; 5+ messages in thread
From: Matthieu Baerts @ 2026-06-03  4:04 UTC (permalink / raw)
  To: Qingfang Deng
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Shuah Khan, linux-ppp, netdev, linux-kselftest,
	linux-kernel

Hi Qingfang,

On 29/05/2026 13:21, Matthieu Baerts wrote:
> Hi Qingfang,
> 
> On 29/05/2026 12:11, Qingfang Deng wrote:
>> As done in pppoe.sh, start socat as the syslog listener. In case the
>> test fails, dump its log to see what's going on.
> Thank you for the v2, it looks good to me:
> 
> Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
> 
> Hopefully this will help you to understand why this test is flaky, so a
> fix can be provided, then this test can be unignored.
> 
> https://netdev.bots.linux.dev/contest.html?skip=0&test=pppol2tp-sh

It looks like the issue happened once since this patch is being tested:

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net-extra/results/668501/11-pppol2tp-sh/stdout

Is it enough for you to understand what's wrong and how to fix it?

Cheers,
Matt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2] selftests: net: add socat syslog for PPPoL2TP
  2026-06-03  4:04   ` Matthieu Baerts
@ 2026-06-03  5:35     ` Qingfang Deng
  0 siblings, 0 replies; 5+ messages in thread
From: Qingfang Deng @ 2026-06-03  5:35 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Shuah Khan, linux-ppp, netdev, linux-kselftest,
	linux-kernel

On 2026/6/3 12:04, Matthieu Baerts wrote:
> Hi Qingfang,
> It looks like the issue happened once since this patch is being tested:
>
> https://netdev-ctrl.bots.linux.dev/logs/vmksft/net-extra/results/668501/11-pppol2tp-sh/stdout
>
> Is it enough for you to understand what's wrong and how to fix it?

Yes. Both pppd instances detected a false loopback, possibly because 
they happened to use the same PRNG seed to generate the magic number. 
I'll send a patch to disable this detection.

Regards,

Qingfang


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-03  5:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-29  2:11 [PATCH net-next v2] selftests: net: add socat syslog for PPPoL2TP Qingfang Deng
2026-05-29  3:21 ` Matthieu Baerts
2026-06-03  4:04   ` Matthieu Baerts
2026-06-03  5:35     ` Qingfang Deng
2026-06-02 18:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox