Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Felix Maurer <fmaurer@redhat.com>
To: Qingfang Deng <qingfang.deng@linux.dev>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Petr Machata <petrm@nvidia.com>,
	linux-kernel@vger.kernel.org, linux-ppp@vger.kernel.org,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next] selftests: net: add tests for PPPoL2TP
Date: Fri, 8 May 2026 19:26:36 +0200	[thread overview]
Message-ID: <af4czAjnz--nOUYf@thinkpad> (raw)
In-Reply-To: <20260508032158.67887-1-qingfang.deng@linux.dev>

On Fri, May 08, 2026 at 11:21:49AM +0800, Qingfang Deng wrote:
> Add ping, iperf3, and recursion tests for PPPoL2TP.
>
> Assisted-by: Gemini:gemini-3-flash
> Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
> ---
>  tools/testing/selftests/net/ppp/Makefile    |  1 +
>  tools/testing/selftests/net/ppp/config      |  3 +
>  tools/testing/selftests/net/ppp/pppol2tp.sh | 93 +++++++++++++++++++++
>  3 files changed, 97 insertions(+)
>  create mode 100755 tools/testing/selftests/net/ppp/pppol2tp.sh
>
> diff --git a/tools/testing/selftests/net/ppp/Makefile b/tools/testing/selftests/net/ppp/Makefile
> index b39b0abadde6..6036fa134351 100644
> --- a/tools/testing/selftests/net/ppp/Makefile
> +++ b/tools/testing/selftests/net/ppp/Makefile
> @@ -5,6 +5,7 @@ top_srcdir = ../../../../..
>  TEST_PROGS := \
>  	ppp_async.sh \
>  	pppoe.sh \
> +	pppol2tp.sh \
>  # end of TEST_PROGS
>
>  TEST_FILES := \
> diff --git a/tools/testing/selftests/net/ppp/config b/tools/testing/selftests/net/ppp/config
> index b45d25c5b970..8bc3b7c33d5c 100644
> --- a/tools/testing/selftests/net/ppp/config
> +++ b/tools/testing/selftests/net/ppp/config
> @@ -1,4 +1,6 @@
>  CONFIG_IPV6=y
> +CONFIG_L2TP=m
> +CONFIG_NETKIT=y
>  CONFIG_PACKET=y
>  CONFIG_PPP=m
>  CONFIG_PPP_ASYNC=m
> @@ -6,4 +8,5 @@ CONFIG_PPP_BSDCOMP=m
>  CONFIG_PPP_DEFLATE=m
>  CONFIG_PPPOE=m
>  CONFIG_PPPOE_HASH_BITS_4=y
> +CONFIG_PPPOL2TP=m
>  CONFIG_VETH=y
> diff --git a/tools/testing/selftests/net/ppp/pppol2tp.sh b/tools/testing/selftests/net/ppp/pppol2tp.sh
> new file mode 100755
> index 000000000000..5ddcc6c41c33
> --- /dev/null
> +++ b/tools/testing/selftests/net/ppp/pppol2tp.sh
> @@ -0,0 +1,93 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +
> +source ppp_common.sh
> +
> +NK_SERVER="nk0"
> +NK_CLIENT="nk1"
> +OUTER_IP_SERVER="172.16.1.1"
> +OUTER_IP_CLIENT="172.16.1.2"
> +
> +PPPOL2TP_DIR=$(mktemp -d /tmp/pppol2tp.XXXXXX)
> +
> +# shellcheck disable=SC2329
> +cleanup() {
> +	cleanup_all_ns
> +	rm -rf "$PPPOL2TP_DIR"
> +}
> +
> +trap cleanup EXIT
> +
> +require_command xl2tpd
> +ppp_common_init
> +modprobe -q l2tp_ppp
> +
> +# Create the netkit pair
> +ip -netns "$NS_CLIENT" link add "$NK_CLIENT" type netkit
> +ip -netns "$NS_CLIENT" link set "$NK_SERVER" netns "$NS_SERVER"
> +ip -netns "$NS_SERVER" link set "$NK_SERVER" up
> +ip -netns "$NS_CLIENT" link set "$NK_CLIENT" up
> +ip -netns "$NS_SERVER" address add dev "$NK_SERVER" "$OUTER_IP_SERVER" peer "$OUTER_IP_CLIENT"
> +ip -netns "$NS_CLIENT" address add dev "$NK_CLIENT" "$OUTER_IP_CLIENT" peer "$OUTER_IP_SERVER"

Is there a particular reason to create the test setup with a netkit pair
instead of the more standard veth pairs?

Thanks,
   Felix


  reply	other threads:[~2026-05-08 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  3:21 [PATCH net-next] selftests: net: add tests for PPPoL2TP Qingfang Deng
2026-05-08 17:26 ` Felix Maurer [this message]
2026-05-09  1:13   ` Qingfang Deng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af4czAjnz--nOUYf@thinkpad \
    --to=fmaurer@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=qingfang.deng@linux.dev \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox