[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1bd5d44c-4cbe-4514-99f3-31760e31a7f2@linuxfoundation.org>
Date: Wed, 2 Oct 2024 16:35:54 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Antonio Quartulli <antonio@...nvpn.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Donald Hunter <donald.hunter@...il.com>,
Shuah Khan <shuah@...nel.org>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, sd@...asysnail.net, ryazanov.s.a@...il.com,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH net-next v8 24/24] testing/selftest: add test tool and
scripts for ovpn module
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@...nel.org
> Cc: linux-kselftest@...r.kernel.org
> Signed-off-by: Antonio Quartulli <antonio@...nvpn.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@...glemail.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
Powered by blists - more mailing lists