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
104104 BPF_MAP_TYPE_LPM_TRIE,
105105 BPF_MAP_TYPE_ARRAY_OF_MAPS,
106106 BPF_MAP_TYPE_HASH_OF_MAPS,
107+ BPF_MAP_TYPE_DEVMAP,
107108 };
108109
109110 enum 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
440440
441441 static void test_devmap(int task, void *data)
442442 {
443− int next_key, fd;
443+ int fd;
444444 __u32 key, value;
445445
446446 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
620620
621621 test_arraymap_percpu_many_keys();
622622
623+ test_devmap(0, NULL);
624+
623625 test_map_large();
624626 test_map_parallel();
625627 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