aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-07-26 17:32:07 -0700
committerDavid S. Miller <davem@davemloft.net>2017-07-29 14:13:20 -0700
commit81f6bf81270ce1052b5cd4d60b9edc40cd5ceefa (patch)
tree17a303f64acc325b3a4d5d4baa029ab11d532383 /tools/testing/selftests
parentMerge branch 'moxa-Fix-style-issues' (diff)
downloadlinux-dev-81f6bf81270ce1052b5cd4d60b9edc40cd5ceefa.tar.xz
linux-dev-81f6bf81270ce1052b5cd4d60b9edc40cd5ceefa.zip
bpf: testing: fix devmap tests
Apparently through one of my revisions of the initial patches series I lost the devmap test. We can add more testing later but for now lets fix the simple one we have. Fixes: 546ac1ffb70d "bpf: add devmap, a map for storing net device references" Reported-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests')
-rw-r--r--tools/testing/selftests/bpf/test_maps.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c
index 36d6ac3f0c1c..c991ab69a720 100644
--- a/tools/testing/selftests/bpf/test_maps.c
+++ b/tools/testing/selftests/bpf/test_maps.c
@@ -440,7 +440,7 @@ static void test_arraymap_percpu_many_keys(void)
static void test_devmap(int task, void *data)
{
- int next_key, fd;
+ int fd;
__u32 key, value;
fd = bpf_create_map(BPF_MAP_TYPE_DEVMAP, sizeof(key), sizeof(value),
@@ -620,6 +620,8 @@ static void run_all_tests(void)
test_arraymap_percpu_many_keys();
+ test_devmap(0, NULL);
+
test_map_large();
test_map_parallel();
test_map_stress();