Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: net: reuseport_bpf_numa: don't fail if no numa support

The reuseport_bpf_numa test case fails there's no numa support. The
test shouldn't fail if there's no support it should be skipped.

Fixes: 3c2c3c16aaf6 ("reuseport, bpf: add test case for bpf_get_numa_node_id")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

authored by

Anders Roxell and committed by
Daniel Borkmann
1a2b80ec a6837d26

+3 -1
+3 -1
tools/testing/selftests/net/reuseport_bpf_numa.c
··· 23 23 #include <unistd.h> 24 24 #include <numa.h> 25 25 26 + #include "../kselftest.h" 27 + 26 28 static const int PORT = 8888; 27 29 28 30 static void build_rcv_group(int *rcv_fd, size_t len, int family, int proto) ··· 231 229 int *rcv_fd, nodes; 232 230 233 231 if (numa_available() < 0) 234 - error(1, errno, "no numa api support"); 232 + ksft_exit_skip("no numa api support\n"); 235 233 236 234 nodes = numa_max_node() + 1; 237 235