* [LTP] [PATCH 1/1] netns_netlink: Check ip tuntap support
@ 2021-05-12 10:07 Petr Vorel
2021-05-12 9:58 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2021-05-12 10:07 UTC (permalink / raw)
To: ltp
11b1fea9d removed ip version check. Although check shouldn't be needed
because version 100519 (v2.6.34) is old enough, add check.
Instead of parsing ip version just try run 'ip tuntap'.
Fixes: ("netns_netlink: Rewrite into new API")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi Cyril,
feel free to reject this as most of the distros having that old kernel
will also have too old toolchain to compile recent LTP
(tst_netdevice.c:218:44: error: use of undeclared identifier
'IFA_FLAGS').
Kind regards,
Petr
testcases/kernel/containers/netns/netns_netlink.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/testcases/kernel/containers/netns/netns_netlink.c b/testcases/kernel/containers/netns/netns_netlink.c
index 1e8e78fc5..ab56afb99 100644
--- a/testcases/kernel/containers/netns/netns_netlink.c
+++ b/testcases/kernel/containers/netns/netns_netlink.c
@@ -36,11 +36,19 @@
#include <sched.h>
#include "tst_test.h"
+#include "tst_cmd.h"
#include "tst_safe_macros.h"
#include "lapi/namespaces_constants.h"
#define MAX_TRIES 1000
+static void setup(void)
+{
+ if (tst_cmd((const char *const []){"ip", "tuntap", NULL}, "/dev/null",
+ NULL, TST_CMD_PASS_RETVAL | TST_CMD_TCONF_ON_MISSING))
+ tst_brk(TCONF, "ip missing tuntap support");
+}
+
static void child_func(void)
{
int fd, len, event_found, tries;
@@ -114,6 +122,7 @@ static void test_netns_netlink(void)
static struct tst_test test = {
+ .setup = setup,
.test_all = test_netns_netlink,
.needs_checkpoints = 1,
.needs_tmpdir = 1,
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [LTP] [PATCH 1/1] netns_netlink: Check ip tuntap support
2021-05-12 10:07 [LTP] [PATCH 1/1] netns_netlink: Check ip tuntap support Petr Vorel
@ 2021-05-12 9:58 ` Cyril Hrubis
2021-05-12 13:26 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2021-05-12 9:58 UTC (permalink / raw)
To: ltp
Hi!
> 11b1fea9d removed ip version check. Although check shouldn't be needed
> because version 100519 (v2.6.34) is old enough, add check.
>
> Instead of parsing ip version just try run 'ip tuntap'.
What is the exact problem here? Missing tuntap support in ip before
v2.6.34?
The v2.6.34 was released in 2010 and v2.6.32 in 2009, so unless someone
reports breakage during pre-release testing I wouldn't bother.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH 1/1] netns_netlink: Check ip tuntap support
2021-05-12 9:58 ` Cyril Hrubis
@ 2021-05-12 13:26 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-05-12 13:26 UTC (permalink / raw)
To: ltp
Hi Cyril,
> Hi!
> > 11b1fea9d removed ip version check. Although check shouldn't be needed
> > because version 100519 (v2.6.34) is old enough, add check.
> > Instead of parsing ip version just try run 'ip tuntap'.
> What is the exact problem here? Missing tuntap support in ip before
> v2.6.34?
Yes.
> The v2.6.34 was released in 2010 and v2.6.32 in 2009, so unless someone
> reports breakage during pre-release testing I wouldn't bother.
Sure, let's keep it as a backup if anybody complains. I suppose nobody bothers.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-12 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-12 10:07 [LTP] [PATCH 1/1] netns_netlink: Check ip tuntap support Petr Vorel
2021-05-12 9:58 ` Cyril Hrubis
2021-05-12 13:26 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox