Skip to content

Commit

Permalink
selftests: net: reuseport_bpf_numa: don't fail if no numa support
Browse files Browse the repository at this point in the history
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: 3c2c3c1 ("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>
  • Loading branch information
Anders Roxell authored and Daniel Borkmann committed May 23, 2018
1 parent a6837d2 commit 1a2b80e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/testing/selftests/net/reuseport_bpf_numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <unistd.h>
#include <numa.h>

#include "../kselftest.h"

static const int PORT = 8888;

static void build_rcv_group(int *rcv_fd, size_t len, int family, int proto)
Expand Down Expand Up @@ -229,7 +231,7 @@ int main(void)
int *rcv_fd, nodes;

if (numa_available() < 0)
error(1, errno, "no numa api support");
ksft_exit_skip("no numa api support\n");

nodes = numa_max_node() + 1;

Expand Down

0 comments on commit 1a2b80e

Please sign in to comment.