From: Shuah Khan <skhan@linuxfoundation.org>
To: Antonio Quartulli <antonio@openvpn.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Donald Hunter <donald.hunter@gmail.com>,
Shuah Khan <shuah@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, sd@queasysnail.net,
ryazanov.s.a@gmail.com, Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH net-next v8 24/24] testing/selftest: add test tool and scripts for ovpn module
Date: Wed, 2 Oct 2024 16:35:54 -0600 [thread overview]
Message-ID: <1bd5d44c-4cbe-4514-99f3-31760e31a7f2@linuxfoundation.org> (raw)
In-Reply-To: <20241002-b4-ovpn-v8-24-37ceffcffbde@openvpn.net>
On 10/2/24 03:02, Antonio Quartulli wrote:
> The ovpn-cli tool can be compiled and used as selftest for the ovpn
> kernel module.
>
Does this test load ovpn module before running tests? If so does
it unload the modules after tests are complete?
> It implementes the netlink API and can thus be integrated in any
Spelling - implements
> script for more automated testing.
>
> Along with the tool, 2 scripts are added that perform basic
> functionality tests by means of network namespaces.
>
> The scripts can be performed in sequence by running run.sh
>
> Cc: shuah@kernel.org
> Cc: linux-kselftest@vger.kernel.org
> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
> ---
> MAINTAINERS | 1 +
> tools/testing/selftests/Makefile | 1 +
> tools/testing/selftests/net/ovpn/.gitignore | 2 +
> tools/testing/selftests/net/ovpn/Makefile | 18 +
> tools/testing/selftests/net/ovpn/config | 8 +
> tools/testing/selftests/net/ovpn/data-test-tcp.sh | 9 +
> tools/testing/selftests/net/ovpn/data-test.sh | 153 ++
> tools/testing/selftests/net/ovpn/data64.key | 5 +
> tools/testing/selftests/net/ovpn/float-test.sh | 118 ++
> tools/testing/selftests/net/ovpn/ovpn-cli.c | 1822 +++++++++++++++++++++
> tools/testing/selftests/net/ovpn/tcp_peers.txt | 5 +
> tools/testing/selftests/net/ovpn/udp_peers.txt | 5 +
> 12 files changed, 2147 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f753060d4e2467a786778ddd4f835861a603ce02..ffd997cc6a1f1fbc5bc954b585bc15ef7bf2486a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -17457,6 +17457,7 @@ T: git https://github.com/OpenVPN/linux-kernel-ovpn.git
> F: drivers/net/ovpn/
> F: include/uapi/linux/ovpn.h
> F: Documentation/netlink/spec/ovpn.yaml
> +F: tools/testing/selftests/net/ovpn/
>
> P54 WIRELESS DRIVER
> M: Christian Lamparter <chunkeey@googlemail.com>
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index b38199965f99014f3e2636fe8d705972f2c0d148..3ae2dd6492ca70d5e317c6e5b4e2560b060e3214 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -68,6 +68,7 @@ TARGETS += net/hsr
> TARGETS += net/mptcp
> TARGETS += net/netfilter
> TARGETS += net/openvswitch
> +TARGETS += net/ovpn
> TARGETS += net/packetdrill
> TARGETS += net/rds
> TARGETS += net/tcp_ao
> diff --git a/tools/testing/selftests/net/ovpn/.gitignore b/tools/testing/selftests/net/ovpn/.gitignore
> new file mode 100644
> index 0000000000000000000000000000000000000000..ee44c081ca7c089933659689303c303a9fa9713b
> --- /dev/null
> +++ b/tools/testing/selftests/net/ovpn/.gitignore
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +ovpn-cli
> diff --git a/tools/testing/selftests/net/ovpn/Makefile b/tools/testing/selftests/net/ovpn/Makefile
> new file mode 100644
> index 0000000000000000000000000000000000000000..65e23eb0ba86d31aa365b08a8c3468dc56a0d1a4
> --- /dev/null
> +++ b/tools/testing/selftests/net/ovpn/Makefile
> @@ -0,0 +1,18 @@
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (C) 2020-2024 OpenVPN, Inc.
> +#
> +CFLAGS = -Wall -I../../../../../usr/include
> +CFLAGS += $(shell pkg-config --cflags libnl-3.0 libnl-genl-3.0)
> +
> +LDFLAGS = -lmbedtls -lmbedcrypto
> +LDFLAGS += $(shell pkg-config --libs libnl-3.0 libnl-genl-3.0)
> +
> +ovpn-cli: ovpn-cli.c
> + $(CC) -o ovpn-cli ovpn-cli.c $(CFLAGS) $(LDFLAGS)
> +
> +TEST_PROGS = data-test.sh \
> + data-test-tcp.sh \
> + float-test.sh
> +TEST_GEN_FILES = ovpn-cli
Can you make sure "make kselftest-install" installs all
of the scripts and executables necessary to run this test?
thanks,
-- Shuah
next prev parent reply other threads:[~2024-10-02 22:35 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 9:02 [PATCH net-next v8 00/24] Introducing OpenVPN Data Channel Offload Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 01/24] netlink: add NLA_POLICY_MAX_LEN macro Antonio Quartulli
2024-10-04 12:58 ` Donald Hunter
2024-10-04 13:38 ` Jakub Kicinski
2024-10-04 14:41 ` Donald Hunter
2024-10-07 10:04 ` Antonio Quartulli
2024-10-07 15:53 ` Jakub Kicinski
2024-10-08 7:51 ` Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 02/24] net: introduce OpenVPN Data Channel Offload (ovpn) Antonio Quartulli
2024-10-02 11:08 ` kernel test robot
2024-10-02 9:02 ` [PATCH net-next v8 03/24] ovpn: add basic netlink support Antonio Quartulli
2024-10-02 14:13 ` kernel test robot
2024-10-04 16:13 ` Donald Hunter
2024-10-07 10:57 ` Antonio Quartulli
2024-10-07 15:32 ` Jiri Pirko
2024-10-08 8:01 ` Antonio Quartulli
2024-10-08 8:58 ` Jiri Pirko
2024-10-08 9:16 ` Antonio Quartulli
2024-10-08 12:52 ` Jiri Pirko
2024-10-08 13:21 ` Antonio Quartulli
2024-11-01 0:17 ` Sergey Ryazanov
2024-10-02 9:02 ` [PATCH net-next v8 04/24] ovpn: add basic interface creation/destruction/management routines Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 05/24] ovpn: implement interface creation/destruction via netlink Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 06/24] ovpn: keep carrier always on Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 07/24] ovpn: introduce the ovpn_peer object Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 08/24] ovpn: introduce the ovpn_socket object Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 09/24] ovpn: implement basic TX path (UDP) Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 10/24] ovpn: implement basic RX " Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 11/24] ovpn: implement packet processing Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 12/24] ovpn: store tunnel and transport statistics Antonio Quartulli
2024-10-03 9:20 ` kernel test robot
2024-10-02 9:02 ` [PATCH net-next v8 13/24] ovpn: implement TCP transport Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 14/24] ovpn: implement multi-peer support Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 15/24] ovpn: implement peer lookup logic Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 16/24] ovpn: implement keepalive mechanism Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 17/24] ovpn: add support for updating local UDP endpoint Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 18/24] ovpn: add support for peer floating Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 19/24] ovpn: implement peer add/dump/delete via netlink Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 20/24] ovpn: implement key add/del/swap " Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 21/24] ovpn: kill key and notify userspace in case of IV exhaustion Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 22/24] ovpn: notify userspace when a peer is deleted Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 23/24] ovpn: add basic ethtool support Antonio Quartulli
2024-10-02 9:02 ` [PATCH net-next v8 24/24] testing/selftest: add test tool and scripts for ovpn module Antonio Quartulli
2024-10-02 22:35 ` Shuah Khan [this message]
2024-10-04 9:50 ` Antonio Quartulli
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=1bd5d44c-4cbe-4514-99f3-31760e31a7f2@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=antonio@openvpn.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ryazanov.s.a@gmail.com \
--cc=sd@queasysnail.net \
--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