Thread (28 messages) 28 messages, 2 authors, 2024-06-27

Re: [PATCH net-next v4 25/25] testing/selftest: add test tool and scripts for ovpn module

From: Antonio Quartulli <antonio@openvpn.net>
Date: 2024-06-27 06:44:26

Hi,

On 25/06/2024 17:14, Jakub Kicinski wrote:
On Mon, 24 Jun 2024 13:31:22 +0200 Antonio Quartulli wrote:
quoted
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -67,6 +67,7 @@ TARGETS += net/openvswitch
  TARGETS += net/tcp_ao
  TARGETS += net/netfilter
  TARGETS += nsfs
+TARGETS += ovpn
why not net/ovpn ? I don't mind, but non-networking people will have
harder time placing ovpn on their mental map without it being under
net/.
I just put the ovpn folder next to wireguard, hoping it was the right 
thing to do :-D

But it makes sense to move it to net/. Will do.
quoted
  TARGETS += perf_events
  TARGETS += pidfd
  TARGETS += pid_namespace
diff --git a/tools/testing/selftests/ovpn/Makefile b/tools/testing/selftests/ovpn/Makefile
new file mode 100644
index 000000000000..edd0d7ff8a12
--- /dev/null
+++ b/tools/testing/selftests/ovpn/Makefile
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: GPL-2.0+ OR MIT
+# 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
+
+TEST_PROGS = run.sh
Could you list the scripts individually under TEST_PROGS?
Maybe add a wrapper for the script that needs to be run with an arg?
Doing so will integrate with kselftest better and let us track each
script individually in CI, rather than have one "ovpn / run" test case..
This was my shortcut, because I needed to call the same script twice 
with different arguments. So it was easier to use a wrapper script.

But I'll look into how to properly achieve that without using a wrapper.

Will send v5 shortly then.

Cheers,


-- 
Antonio Quartulli
OpenVPN Inc.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help