History

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.

John Fastabend committed 9 years ago

Commit 81f6bf81 parent e9e38072 files · +4 −1Browse files

Unified · Split

2 files
  1. tools/include/uapi/linux/bpf.h +1 −0
  2. tools/testing/selftests/bpf/test_maps.c +3 −1
tools/include/uapi/linux/bpf.h+1−0
@@ -104,6 +104,7 @@ enum bpf_map_type { · 103 unmodified lines
104 BPF_MAP_TYPE_LPM_TRIE,104 BPF_MAP_TYPE_LPM_TRIE,
105 BPF_MAP_TYPE_ARRAY_OF_MAPS,105 BPF_MAP_TYPE_ARRAY_OF_MAPS,
106 BPF_MAP_TYPE_HASH_OF_MAPS,106 BPF_MAP_TYPE_HASH_OF_MAPS,
107 BPF_MAP_TYPE_DEVMAP,
107};108};
108 109
109enum bpf_prog_type {110enum bpf_prog_type {
tools/testing/selftests/bpf/test_maps.c+3−1
@@ -440,7 +440,7 @@ static void test_arraymap_percpu_many_keys(void) · 439 unmodified lines
440 440
441static void test_devmap(int task, void *data)441static void test_devmap(int task, void *data)
442{442{
443 int next_key, fd;443 int fd;
444 __u32 key, value;444 __u32 key, value;
445 445
446 fd = bpf_create_map(BPF_MAP_TYPE_DEVMAP, sizeof(key), sizeof(value),446 fd = bpf_create_map(BPF_MAP_TYPE_DEVMAP, sizeof(key), sizeof(value),
@@ -620,6 +620,8 @@ static void run_all_tests(void) · 173 unmodified lines
620 620
621 test_arraymap_percpu_many_keys();621 test_arraymap_percpu_many_keys();
622 622
623 test_devmap(0, NULL);
624
623 test_map_large();625 test_map_large();
624 test_map_parallel();626 test_map_parallel();
625 test_map_stress();627 test_map_stress();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t