public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v7] selftests: net: add tests for PPP
@ 2026-03-30  3:55 Qingfang Deng
  2026-04-01 15:10 ` Jakub Kicinski
  0 siblings, 1 reply; 12+ messages in thread
From: Qingfang Deng @ 2026-03-30  3:55 UTC (permalink / raw)
  To: Shuah Khan, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, Felix Maurer,
	Sebastian Andrzej Siewior, Matthieu Baerts (NGI0), linux-kernel,
	linux-kselftest, linux-ppp, netdev
  Cc: Paul Mackerras

Add ping and iperf3 tests for ppp_async.c and pppoe.c.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
---
v7: repost after 24h
 https://lore.kernel.org/netdev/20260327033438.125135-1-dqfext@gmail.com/

 MAINTAINERS                                   |  1 +
 tools/testing/selftests/Makefile              |  1 +
 tools/testing/selftests/net/ppp/Makefile      | 15 +++++++
 tools/testing/selftests/net/ppp/config        |  9 ++++
 tools/testing/selftests/net/ppp/ppp_async.sh  | 44 +++++++++++++++++++
 tools/testing/selftests/net/ppp/ppp_common.sh | 44 +++++++++++++++++++
 .../selftests/net/ppp/pppoe-server-options    |  2 +
 tools/testing/selftests/net/ppp/pppoe.sh      | 41 +++++++++++++++++
 8 files changed, 157 insertions(+)
 create mode 100644 tools/testing/selftests/net/ppp/Makefile
 create mode 100644 tools/testing/selftests/net/ppp/config
 create mode 100755 tools/testing/selftests/net/ppp/ppp_async.sh
 create mode 100644 tools/testing/selftests/net/ppp/ppp_common.sh
 create mode 100644 tools/testing/selftests/net/ppp/pppoe-server-options
 create mode 100755 tools/testing/selftests/net/ppp/pppoe.sh

diff --git a/MAINTAINERS b/MAINTAINERS
index 7a2ffd9d37d5..b922e154b9e7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21080,6 +21080,7 @@ PPP PROTOCOL DRIVERS AND COMPRESSORS
 L:	linux-ppp@vger.kernel.org
 S:	Orphan
 F:	drivers/net/ppp/ppp_*
+F:	tools/testing/selftests/net/ppp/
 
 PPS SUPPORT
 M:	Rodolfo Giometti <giometti@enneenne.com>
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 450f13ba4cca..65f84e8a0cf0 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -78,6 +78,7 @@ TARGETS += net/netfilter
 TARGETS += net/openvswitch
 TARGETS += net/ovpn
 TARGETS += net/packetdrill
+TARGETS += net/ppp
 TARGETS += net/rds
 TARGETS += net/tcp_ao
 TARGETS += nolibc
diff --git a/tools/testing/selftests/net/ppp/Makefile b/tools/testing/selftests/net/ppp/Makefile
new file mode 100644
index 000000000000..b39b0abadde6
--- /dev/null
+++ b/tools/testing/selftests/net/ppp/Makefile
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: GPL-2.0
+
+top_srcdir = ../../../../..
+
+TEST_PROGS := \
+	ppp_async.sh \
+	pppoe.sh \
+# end of TEST_PROGS
+
+TEST_FILES := \
+	ppp_common.sh \
+	pppoe-server-options \
+# end of TEST_FILES
+
+include ../../lib.mk
diff --git a/tools/testing/selftests/net/ppp/config b/tools/testing/selftests/net/ppp/config
new file mode 100644
index 000000000000..b45d25c5b970
--- /dev/null
+++ b/tools/testing/selftests/net/ppp/config
@@ -0,0 +1,9 @@
+CONFIG_IPV6=y
+CONFIG_PACKET=y
+CONFIG_PPP=m
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPPOE=m
+CONFIG_PPPOE_HASH_BITS_4=y
+CONFIG_VETH=y
diff --git a/tools/testing/selftests/net/ppp/ppp_async.sh b/tools/testing/selftests/net/ppp/ppp_async.sh
new file mode 100755
index 000000000000..9233dc656678
--- /dev/null
+++ b/tools/testing/selftests/net/ppp/ppp_async.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+
+source ppp_common.sh
+
+# Temporary files for PTY symlinks
+TTY_DIR=$(mktemp -d /tmp/ppp.XXXXXX)
+TTY_SERVER="$TTY_DIR"/server
+TTY_CLIENT="$TTY_DIR"/client
+
+# shellcheck disable=SC2329
+cleanup() {
+	cleanup_all_ns
+	[ -n "$SOCAT_PID" ] && kill_process "$SOCAT_PID"
+	rm -fr "$TTY_DIR"
+}
+
+trap cleanup EXIT
+
+require_command socat
+ppp_common_init
+modprobe -q ppp_async
+
+# Create the virtual serial device
+socat -d PTY,link="$TTY_SERVER",rawer PTY,link="$TTY_CLIENT",rawer &
+SOCAT_PID=$!
+
+# Wait for symlinks to be created
+slowwait 5 [ -L "$TTY_SERVER" ]
+
+# Start the PPP Server
+ip netns exec "$NS_SERVER" pppd "$TTY_SERVER" 115200 \
+	"$IP_SERVER":"$IP_CLIENT" \
+	local noauth nodefaultroute debug
+
+# Start the PPP Client
+ip netns exec "$NS_CLIENT" pppd "$TTY_CLIENT" 115200 \
+	local noauth updetach nodefaultroute debug
+
+ppp_test_connectivity
+
+log_test "PPP async"
+
+exit "$EXIT_STATUS"
diff --git a/tools/testing/selftests/net/ppp/ppp_common.sh b/tools/testing/selftests/net/ppp/ppp_common.sh
new file mode 100644
index 000000000000..c72218813f95
--- /dev/null
+++ b/tools/testing/selftests/net/ppp/ppp_common.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# shellcheck disable=SC2153
+
+source ../lib.sh
+
+IP_SERVER="192.168.200.1"
+IP_CLIENT="192.168.200.2"
+
+ppp_common_init() {
+	# Package requirements
+	require_command pppd
+	require_command iperf3
+
+	# Check for root privileges
+	if [ "$(id -u)" -ne 0 ];then
+		echo "SKIP: Need root privileges"
+		exit $ksft_skip
+	fi
+
+	# Namespaces
+	setup_ns NS_SERVER NS_CLIENT
+}
+
+ppp_check_addr() {
+	dev=$1
+	addr=$2
+	ns=$3
+	ip -netns "$ns" -4 addr show dev "$dev" 2>/dev/null | grep -q "$addr"
+	return $?
+}
+
+ppp_test_connectivity() {
+	slowwait 10 ppp_check_addr "ppp0" "$IP_CLIENT" "$NS_CLIENT"
+
+	ip netns exec "$NS_CLIENT" ping -c 3 "$IP_SERVER"
+	check_err $?
+
+	ip netns exec "$NS_SERVER" iperf3 -s -1 -D
+	wait_local_port_listen "$NS_SERVER" 5201 tcp
+
+	ip netns exec "$NS_CLIENT" iperf3 -c "$IP_SERVER" -Z -t 2
+	check_err $?
+}
diff --git a/tools/testing/selftests/net/ppp/pppoe-server-options b/tools/testing/selftests/net/ppp/pppoe-server-options
new file mode 100644
index 000000000000..66c8c9d319e9
--- /dev/null
+++ b/tools/testing/selftests/net/ppp/pppoe-server-options
@@ -0,0 +1,2 @@
+noauth
+noipdefault
diff --git a/tools/testing/selftests/net/ppp/pppoe.sh b/tools/testing/selftests/net/ppp/pppoe.sh
new file mode 100755
index 000000000000..73e4ea957b43
--- /dev/null
+++ b/tools/testing/selftests/net/ppp/pppoe.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+
+source ppp_common.sh
+
+VETH_SERVER="veth-server"
+VETH_CLIENT="veth-client"
+
+# shellcheck disable=SC2329
+cleanup() {
+	cleanup_all_ns
+}
+
+trap cleanup EXIT
+
+require_command pppoe-server
+ppp_common_init
+modprobe -q pppoe
+
+# Create the veth pair
+ip link add "$VETH_SERVER" type veth peer name "$VETH_CLIENT"
+ip link set "$VETH_SERVER" netns "$NS_SERVER"
+ip link set "$VETH_CLIENT" netns "$NS_CLIENT"
+ip -netns "$NS_SERVER" link set "$VETH_SERVER" up
+ip -netns "$NS_CLIENT" link set "$VETH_CLIENT" up
+
+# Start the PPP Server
+ip netns exec "$NS_SERVER" pppoe-server -I "$VETH_SERVER" \
+	-L "$IP_SERVER" -R "$IP_CLIENT" -N 1 -q "$(command -v pppd)" \
+	-k -O "$(pwd)/pppoe-server-options"
+
+# Start the PPP Client
+ip netns exec "$NS_CLIENT" pppd \
+	local debug updetach noipdefault noauth nodefaultroute \
+	plugin pppoe.so nic-"$VETH_CLIENT"
+
+ppp_test_connectivity
+
+log_test "PPPoE"
+
+exit "$EXIT_STATUS"
-- 
2.43.0


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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-03-30  3:55 [PATCH net-next v7] selftests: net: add tests for PPP Qingfang Deng
@ 2026-04-01 15:10 ` Jakub Kicinski
  2026-04-01 15:45   ` Qingfang Deng
  0 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2026-04-01 15:10 UTC (permalink / raw)
  To: Qingfang Deng
  Cc: Shuah Khan, David S. Miller, Eric Dumazet, Paolo Abeni,
	Simon Horman, Felix Maurer, Sebastian Andrzej Siewior,
	Matthieu Baerts (NGI0), linux-kernel, linux-kselftest, linux-ppp,
	netdev, Paul Mackerras

On Mon, 30 Mar 2026 11:55:44 +0800 Qingfang Deng wrote:
> Add ping and iperf3 tests for ppp_async.c and pppoe.c.

Hi! I added the new TARGET to netdev CI, the pppoe.sh test does not
seem happy:

# timeout set to 45
# selftests: net/ppp: pppoe.sh
# Plugin pppoe.so loaded.
# PPPoE plugin from pppd 2.5.1
# Send PPPOE Discovery V1T1 PADI session 0x0 length 12
#  dst ff:ff:ff:ff:ff:ff  src b2:36:d8:0d:61:83
#  [service-name] [host-uniq 9b 08 00 00]
# Recv PPPOE Discovery V1T1 PADO session 0x0 length 73
#  dst b2:36:d8:0d:61:83  src 4e:f5:66:23:13:38
#  [AC-name vmksft-net-extra,debug-threads=on] [service-name] [AC-cookie e5 e4 8c f0 87 72 d8 3a 60 66 4e 32 e4 ee af 6f 9a 08 00 00] [host-uniq 9b 08 00 00]
# Send PPPOE Discovery V1T1 PADR session 0x0 length 36
#  dst 4e:f5:66:23:13:38  src b2:36:d8:0d:61:83
#  [service-name] [host-uniq 9b 08 00 00] [AC-cookie e5 e4 8c f0 87 72 d8 3a 60 66 4e 32 e4 ee af 6f 9a 08 00 00]
# Recv PPPOE Discovery V1T1 PADS session 0x1 length 12
#  dst b2:36:d8:0d:61:83  src 4e:f5:66:23:13:38
#  [service-name] [host-uniq 9b 08 00 00]
# PPP session is 1
# Connected to 4E:F5:66:23:13:38 via interface veth-client
# using channel 1
# Using interface ppp0
# Connect: ppp0 <--> veth-client
# sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6db8fab4>]
# Modem hangup
# Connection terminated.
# Send PPPOE Discovery V1T1 PADT session 0x1 length 32
#  dst 4e:f5:66:23:13:38  src b2:36:d8:0d:61:83
#  [host-uniq 9b 08 00 00] [AC-cookie e5 e4 8c f0 87 72 d8 3a 60 66 4e 32 e4 ee af 6f 9a 08 00 00]
# Sent PADT
# ping: connect: Network is unreachable
# iperf3: error - unable to connect to server - server may have stopped running or use a different port, firewall issue, etc.: Network is unreachable
# TEST: PPPoE                                                         [FAIL]
not ok 1 selftests: net/ppp: pppoe.sh # exit=1

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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-01 15:10 ` Jakub Kicinski
@ 2026-04-01 15:45   ` Qingfang Deng
  2026-04-02  0:56     ` Jakub Kicinski
  0 siblings, 1 reply; 12+ messages in thread
From: Qingfang Deng @ 2026-04-01 15:45 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Shuah Khan, David S. Miller, Eric Dumazet, Paolo Abeni,
	Simon Horman, Felix Maurer, Sebastian Andrzej Siewior,
	Matthieu Baerts (NGI0), linux-kernel, linux-kselftest, linux-ppp,
	netdev, Paul Mackerras

Hi,

On Wed, Apr 1, 2026 at 11:10 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Mon, 30 Mar 2026 11:55:44 +0800 Qingfang Deng wrote:
> > Add ping and iperf3 tests for ppp_async.c and pppoe.c.
>
> Hi! I added the new TARGET to netdev CI, the pppoe.sh test does not
> seem happy:
>
> # timeout set to 45
> # selftests: net/ppp: pppoe.sh
> # Plugin pppoe.so loaded.
> # PPPoE plugin from pppd 2.5.1
> # Send PPPOE Discovery V1T1 PADI session 0x0 length 12
> #  dst ff:ff:ff:ff:ff:ff  src b2:36:d8:0d:61:83
> #  [service-name] [host-uniq 9b 08 00 00]
> # Recv PPPOE Discovery V1T1 PADO session 0x0 length 73
> #  dst b2:36:d8:0d:61:83  src 4e:f5:66:23:13:38
> #  [AC-name vmksft-net-extra,debug-threads=on] [service-name] [AC-cookie e5 e4 8c f0 87 72 d8 3a 60 66 4e 32 e4 ee af 6f 9a 08 00 00] [host-uniq 9b 08 00 00]
> # Send PPPOE Discovery V1T1 PADR session 0x0 length 36
> #  dst 4e:f5:66:23:13:38  src b2:36:d8:0d:61:83
> #  [service-name] [host-uniq 9b 08 00 00] [AC-cookie e5 e4 8c f0 87 72 d8 3a 60 66 4e 32 e4 ee af 6f 9a 08 00 00]
> # Recv PPPOE Discovery V1T1 PADS session 0x1 length 12
> #  dst b2:36:d8:0d:61:83  src 4e:f5:66:23:13:38
> #  [service-name] [host-uniq 9b 08 00 00]
> # PPP session is 1
> # Connected to 4E:F5:66:23:13:38 via interface veth-client
> # using channel 1
> # Using interface ppp0
> # Connect: ppp0 <--> veth-client
> # sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6db8fab4>]
> # Modem hangup
> # Connection terminated.
> # Send PPPOE Discovery V1T1 PADT session 0x1 length 32
> #  dst 4e:f5:66:23:13:38  src b2:36:d8:0d:61:83
> #  [host-uniq 9b 08 00 00] [AC-cookie e5 e4 8c f0 87 72 d8 3a 60 66 4e 32 e4 ee af 6f 9a 08 00 00]
> # Sent PADT
> # ping: connect: Network is unreachable
> # iperf3: error - unable to connect to server - server may have stopped running or use a different port, firewall issue, etc.: Network is unreachable
> # TEST: PPPoE                                                         [FAIL]
> not ok 1 selftests: net/ppp: pppoe.sh # exit=1

It looks like pppoe-server fails to start. You may check the syslog to
see what's going on.

Regards,
Qingfang

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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-01 15:45   ` Qingfang Deng
@ 2026-04-02  0:56     ` Jakub Kicinski
  2026-04-02  2:26       ` Qingfang Deng
  0 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2026-04-02  0:56 UTC (permalink / raw)
  To: Qingfang Deng
  Cc: Shuah Khan, David S. Miller, Eric Dumazet, Paolo Abeni,
	Simon Horman, Felix Maurer, Sebastian Andrzej Siewior,
	Matthieu Baerts (NGI0), linux-kernel, linux-kselftest, linux-ppp,
	netdev, Paul Mackerras

On Wed, 1 Apr 2026 23:45:38 +0800 Qingfang Deng wrote:
> > # iperf3: error - unable to connect to server - server may have stopped running or use a different port, firewall issue, etc.: Network is unreachable
> > # TEST: PPPoE                                                         [FAIL]
> > not ok 1 selftests: net/ppp: pppoe.sh # exit=1  
> 
> It looks like pppoe-server fails to start. You may check the syslog to
> see what's going on.

Hm, we don't capture syslog automatically :S We capture stdout and
stderr

I'm not even sure there's something listening on syslog in virtme-ng
Is it possible to make the daemon log to stdout or a file and dump
that file to stdout on failure? Even if we fix the current issue
it will be quite inconvenient if we have to go into syslog every time
the test is failing. The test output should provide enough info to
debug failures.

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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-02  0:56     ` Jakub Kicinski
@ 2026-04-02  2:26       ` Qingfang Deng
  2026-04-02  2:52         ` Jakub Kicinski
  2026-04-02  9:48         ` Paolo Abeni
  0 siblings, 2 replies; 12+ messages in thread
From: Qingfang Deng @ 2026-04-02  2:26 UTC (permalink / raw)
  To: Jakub Kicinski, Dianne Skoll
  Cc: Shuah Khan, David S. Miller, Eric Dumazet, Paolo Abeni,
	Simon Horman, Felix Maurer, Sebastian Andrzej Siewior,
	Matthieu Baerts (NGI0), linux-kernel, linux-kselftest, linux-ppp,
	netdev, Paul Mackerras

Hi,

On Thu, Apr 2, 2026 at 8:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 1 Apr 2026 23:45:38 +0800 Qingfang Deng wrote:
> > > # iperf3: error - unable to connect to server - server may have stopped running or use a different port, firewall issue, etc.: Network is unreachable
> > > # TEST: PPPoE                                                         [FAIL]
> > > not ok 1 selftests: net/ppp: pppoe.sh # exit=1
> >
> > It looks like pppoe-server fails to start. You may check the syslog to
> > see what's going on.
>
> Hm, we don't capture syslog automatically :S We capture stdout and
> stderr
>
> I'm not even sure there's something listening on syslog in virtme-ng
> Is it possible to make the daemon log to stdout or a file and dump
> that file to stdout on failure? Even if we fix the current issue
> it will be quite inconvenient if we have to go into syslog every time
> the test is failing. The test output should provide enough info to
> debug failures.

Add Cc: Dianne

I checked the man page of pppoe-server and did not find such option.
We can instead start our own listener and redirect the syslog to a
file or stdout:

socat -u UNIX-RECV:/dev/log,ignoreeof STDOUT &

Regards,
Qingfang

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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-02  2:26       ` Qingfang Deng
@ 2026-04-02  2:52         ` Jakub Kicinski
  2026-04-02  9:48         ` Paolo Abeni
  1 sibling, 0 replies; 12+ messages in thread
From: Jakub Kicinski @ 2026-04-02  2:52 UTC (permalink / raw)
  To: Qingfang Deng
  Cc: Dianne Skoll, Shuah Khan, David S. Miller, Eric Dumazet,
	Paolo Abeni, Simon Horman, Felix Maurer,
	Sebastian Andrzej Siewior, Matthieu Baerts (NGI0), linux-kernel,
	linux-kselftest, linux-ppp, netdev, Paul Mackerras

On Thu, 2 Apr 2026 10:26:11 +0800 Qingfang Deng wrote:
> Hi,
> 
> On Thu, Apr 2, 2026 at 8:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Wed, 1 Apr 2026 23:45:38 +0800 Qingfang Deng wrote:  
>  [...]  
> > >
> > > It looks like pppoe-server fails to start. You may check the syslog to
> > > see what's going on.  
> >
> > Hm, we don't capture syslog automatically :S We capture stdout and
> > stderr
> >
> > I'm not even sure there's something listening on syslog in virtme-ng
> > Is it possible to make the daemon log to stdout or a file and dump
> > that file to stdout on failure? Even if we fix the current issue
> > it will be quite inconvenient if we have to go into syslog every time
> > the test is failing. The test output should provide enough info to
> > debug failures.  
> 
> Add Cc: Dianne
> 
> I checked the man page of pppoe-server and did not find such option.
> We can instead start our own listener and redirect the syslog to a
> file or stdout:
> 
> socat -u UNIX-RECV:/dev/log,ignoreeof STDOUT &

That should work for vng, I confirmed it doesn't seem to have a syslog
socket

$ vng -r
...
$ ls /dev/log
ls: cannot access '/dev/log': No such file or directory

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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-02  2:26       ` Qingfang Deng
  2026-04-02  2:52         ` Jakub Kicinski
@ 2026-04-02  9:48         ` Paolo Abeni
  2026-04-02 10:13           ` Qingfang Deng
  1 sibling, 1 reply; 12+ messages in thread
From: Paolo Abeni @ 2026-04-02  9:48 UTC (permalink / raw)
  To: Qingfang Deng, Jakub Kicinski, Dianne Skoll
  Cc: Shuah Khan, David S. Miller, Eric Dumazet, Simon Horman,
	Felix Maurer, Sebastian Andrzej Siewior, Matthieu Baerts (NGI0),
	linux-kernel, linux-kselftest, linux-ppp, netdev, Paul Mackerras

On 4/2/26 4:26 AM, Qingfang Deng wrote:
> On Thu, Apr 2, 2026 at 8:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
>> On Wed, 1 Apr 2026 23:45:38 +0800 Qingfang Deng wrote:
>>>> # iperf3: error - unable to connect to server - server may have stopped running or use a different port, firewall issue, etc.: Network is unreachable
>>>> # TEST: PPPoE                                                         [FAIL]
>>>> not ok 1 selftests: net/ppp: pppoe.sh # exit=1
>>>
>>> It looks like pppoe-server fails to start. You may check the syslog to
>>> see what's going on.
>>
>> Hm, we don't capture syslog automatically :S We capture stdout and
>> stderr
>>
>> I'm not even sure there's something listening on syslog in virtme-ng
>> Is it possible to make the daemon log to stdout or a file and dump
>> that file to stdout on failure? Even if we fix the current issue
>> it will be quite inconvenient if we have to go into syslog every time
>> the test is failing. The test output should provide enough info to
>> debug failures.
> 
> Add Cc: Dianne
> 
> I checked the man page of pppoe-server and did not find such option.
> We can instead start our own listener and redirect the syslog to a
> file or stdout:
> 
> socat -u UNIX-RECV:/dev/log,ignoreeof STDOUT &

Note that similar failures in the past in other test-cases were usually
due to timing issues. i.e. the pppoe-server starts in background too
late for the client.

Possibly a somewhat clean solution is to wait in a loop for the
'pppoe-server ready' event, somewhat similar to wait_local_port_listen().

Otherwise an hackish sleep in between should do.

Note that you should be possibly able to reproduce this kind of failure
in a virtualized/slow enough environment (i.e. using vng as described on
nipa wiki)

Finally, note that in this test script you should start the socat
listener only if /dev/log does not exists, or ignore socat startup
errors - because self-test should run also on different systems.

/P



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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-02  9:48         ` Paolo Abeni
@ 2026-04-02 10:13           ` Qingfang Deng
  2026-04-02 11:17             ` Paolo Abeni
  0 siblings, 1 reply; 12+ messages in thread
From: Qingfang Deng @ 2026-04-02 10:13 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: Jakub Kicinski, Dianne Skoll, Shuah Khan, David S. Miller,
	Eric Dumazet, Simon Horman, Felix Maurer,
	Sebastian Andrzej Siewior, Matthieu Baerts (NGI0), linux-kernel,
	linux-kselftest, linux-ppp, netdev, Paul Mackerras, Jaco Kroon

Hi Paolo and Jakub,

On Thu, Apr 2, 2026 at 5:48 PM Paolo Abeni <pabeni@redhat.com> wrote:
> Note that similar failures in the past in other test-cases were usually
> due to timing issues. i.e. the pppoe-server starts in background too
> late for the client.

I don't think it is a timing issue, otherwise the PADI negotiation
won't succeed. The "updetach" option on the client side also make it
wait for the negotiation.
It's likely that the pppd instance spawned by pppoe-server fails to
find the "rp-pppoe.so" plugin, so the connection fails when handing
off the session from pppoe-server to pppd. Note the naming difference:
the client loads "pppoe.so", while the server loads "rp-pppoe.so" by
default.

What distro do you run CI tests on? On Ubuntu 24.04, "rp-pppoe.so" is
a symlink to "pppoe.so" in apt package "ppp". Maybe an additional
package is required for the distro you use, or I may work around that
by manually creating the symlink.

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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-02 10:13           ` Qingfang Deng
@ 2026-04-02 11:17             ` Paolo Abeni
  2026-04-02 12:04               ` Qingfang Deng
  0 siblings, 1 reply; 12+ messages in thread
From: Paolo Abeni @ 2026-04-02 11:17 UTC (permalink / raw)
  To: Qingfang Deng
  Cc: Jakub Kicinski, Dianne Skoll, Shuah Khan, David S. Miller,
	Eric Dumazet, Simon Horman, Felix Maurer,
	Sebastian Andrzej Siewior, Matthieu Baerts (NGI0), linux-kernel,
	linux-kselftest, linux-ppp, netdev, Paul Mackerras, Jaco Kroon

On 4/2/26 12:13 PM, Qingfang Deng wrote:
> On Thu, Apr 2, 2026 at 5:48 PM Paolo Abeni <pabeni@redhat.com> wrote:
>> Note that similar failures in the past in other test-cases were usually
>> due to timing issues. i.e. the pppoe-server starts in background too
>> late for the client.
> 
> I don't think it is a timing issue, otherwise the PADI negotiation
> won't succeed. The "updetach" option on the client side also make it
> wait for the negotiation.
> It's likely that the pppd instance spawned by pppoe-server fails to
> find the "rp-pppoe.so" plugin, so the connection fails when handing
> off the session from pppoe-server to pppd. Note the naming difference:
> the client loads "pppoe.so", while the server loads "rp-pppoe.so" by
> default.
> 
> What distro do you run CI tests on? On Ubuntu 24.04, "rp-pppoe.so" is
> a symlink to "pppoe.so" in apt package "ppp". Maybe an additional
> package is required for the distro you use, or I may work around that
> by manually creating the symlink.

It's fedora 43 with ppp and pppoe installed.

ppp provides pppoe.so, and AFAICS nothink provides rp-pppoe.so, and the
pppoe-server is looking for a non existing /etc/ppp/plugins/rp-pppoe.so
plugin.

Before I mess with the nipa testbed, could you please double check that

ln -n /usr/lib64/pppd/2.5.1/pppoe.so /etc/ppp/plugins/rp-pppoe.so

should solve?

Thanks,

Paolo


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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-02 11:17             ` Paolo Abeni
@ 2026-04-02 12:04               ` Qingfang Deng
  2026-04-02 14:37                 ` Andrew Lunn
  0 siblings, 1 reply; 12+ messages in thread
From: Qingfang Deng @ 2026-04-02 12:04 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: Jakub Kicinski, Dianne Skoll, Shuah Khan, David S. Miller,
	Eric Dumazet, Simon Horman, Felix Maurer,
	Sebastian Andrzej Siewior, Matthieu Baerts (NGI0), linux-kernel,
	linux-kselftest, linux-ppp, netdev, Paul Mackerras, Jaco Kroon

On Thu, Apr 2, 2026 at 7:17 PM Paolo Abeni <pabeni@redhat.com> wrote:
>
> On 4/2/26 12:13 PM, Qingfang Deng wrote:
>
> > What distro do you run CI tests on? On Ubuntu 24.04, "rp-pppoe.so" is
> > a symlink to "pppoe.so" in apt package "ppp". Maybe an additional
> > package is required for the distro you use, or I may work around that
> > by manually creating the symlink.
>
> It's fedora 43 with ppp and pppoe installed.
>
> ppp provides pppoe.so, and AFAICS nothink provides rp-pppoe.so, and the
> pppoe-server is looking for a non existing /etc/ppp/plugins/rp-pppoe.so
> plugin.
>
> Before I mess with the nipa testbed, could you please double check that
>
> ln -n /usr/lib64/pppd/2.5.1/pppoe.so /etc/ppp/plugins/rp-pppoe.so
>
> should solve?

Hard links will also work.
Alternatively, if your rp-pppoe version is 4.0, you can use the new
option `-g` to specify the full path of the pppoe.so plugin.

Regards,
Qingfang

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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-02 12:04               ` Qingfang Deng
@ 2026-04-02 14:37                 ` Andrew Lunn
  2026-04-02 14:55                   ` Jakub Kicinski
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Lunn @ 2026-04-02 14:37 UTC (permalink / raw)
  To: Qingfang Deng
  Cc: Paolo Abeni, Jakub Kicinski, Dianne Skoll, Shuah Khan,
	David S. Miller, Eric Dumazet, Simon Horman, Felix Maurer,
	Sebastian Andrzej Siewior, Matthieu Baerts (NGI0), linux-kernel,
	linux-kselftest, linux-ppp, netdev, Paul Mackerras, Jaco Kroon

On Thu, Apr 02, 2026 at 08:04:23PM +0800, Qingfang Deng wrote:
> On Thu, Apr 2, 2026 at 7:17 PM Paolo Abeni <pabeni@redhat.com> wrote:
> >
> > On 4/2/26 12:13 PM, Qingfang Deng wrote:
> >
> > > What distro do you run CI tests on? On Ubuntu 24.04, "rp-pppoe.so" is
> > > a symlink to "pppoe.so" in apt package "ppp". Maybe an additional
> > > package is required for the distro you use, or I may work around that
> > > by manually creating the symlink.
> >
> > It's fedora 43 with ppp and pppoe installed.
> >
> > ppp provides pppoe.so, and AFAICS nothink provides rp-pppoe.so, and the
> > pppoe-server is looking for a non existing /etc/ppp/plugins/rp-pppoe.so
> > plugin.
> >
> > Before I mess with the nipa testbed, could you please double check that
> >
> > ln -n /usr/lib64/pppd/2.5.1/pppoe.so /etc/ppp/plugins/rp-pppoe.so
> >
> > should solve?
> 
> Hard links will also work.
> Alternatively, if your rp-pppoe version is 4.0, you can use the new
> option `-g` to specify the full path of the pppoe.so plugin.

It should be possible for anybody to run these self tests. So we don't
want specially crafted setups, but generic setups which will work for
as many people as possible.

It looks like v4.0 we released 2024-09-09. So can we make that the
minimum version? Fail the test if an older version is found? Can the
test poke around the file system and find rp-pppoe.so and pass it
using -g?

      Andrew

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

* Re: [PATCH net-next v7] selftests: net: add tests for PPP
  2026-04-02 14:37                 ` Andrew Lunn
@ 2026-04-02 14:55                   ` Jakub Kicinski
  0 siblings, 0 replies; 12+ messages in thread
From: Jakub Kicinski @ 2026-04-02 14:55 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Qingfang Deng, Paolo Abeni, Dianne Skoll, Shuah Khan,
	David S. Miller, Eric Dumazet, Simon Horman, Felix Maurer,
	Sebastian Andrzej Siewior, Matthieu Baerts (NGI0), linux-kernel,
	linux-kselftest, linux-ppp, netdev, Paul Mackerras, Jaco Kroon

On Thu, 2 Apr 2026 16:37:01 +0200 Andrew Lunn wrote:
> > > ln -n /usr/lib64/pppd/2.5.1/pppoe.so /etc/ppp/plugins/rp-pppoe.so
> > >
> > > should solve?  
> > 
> > Hard links will also work.
> > Alternatively, if your rp-pppoe version is 4.0, you can use the new
> > option `-g` to specify the full path of the pppoe.so plugin.  
> 
> It should be possible for anybody to run these self tests. So we don't
> want specially crafted setups, but generic setups which will work for
> as many people as possible.

+1 let's try not to tweak the underlying OS.

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

end of thread, other threads:[~2026-04-02 14:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30  3:55 [PATCH net-next v7] selftests: net: add tests for PPP Qingfang Deng
2026-04-01 15:10 ` Jakub Kicinski
2026-04-01 15:45   ` Qingfang Deng
2026-04-02  0:56     ` Jakub Kicinski
2026-04-02  2:26       ` Qingfang Deng
2026-04-02  2:52         ` Jakub Kicinski
2026-04-02  9:48         ` Paolo Abeni
2026-04-02 10:13           ` Qingfang Deng
2026-04-02 11:17             ` Paolo Abeni
2026-04-02 12:04               ` Qingfang Deng
2026-04-02 14:37                 ` Andrew Lunn
2026-04-02 14:55                   ` Jakub Kicinski

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