diff options
Diffstat (limited to 'tools/testing/selftests/bpf/test_maps.c')
-rw-r--r-- | tools/testing/selftests/bpf/test_maps.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c index 79601c81e169..36d6ac3f0c1c 100644 --- a/tools/testing/selftests/bpf/test_maps.c +++ b/tools/testing/selftests/bpf/test_maps.c | |||
@@ -438,6 +438,21 @@ static void test_arraymap_percpu_many_keys(void) | |||
438 | close(fd); | 438 | close(fd); |
439 | } | 439 | } |
440 | 440 | ||
441 | static void test_devmap(int task, void *data) | ||
442 | { | ||
443 | int next_key, fd; | ||
444 | __u32 key, value; | ||
445 | |||
446 | fd = bpf_create_map(BPF_MAP_TYPE_DEVMAP, sizeof(key), sizeof(value), | ||
447 | 2, 0); | ||
448 | if (fd < 0) { | ||
449 | printf("Failed to create arraymap '%s'!\n", strerror(errno)); | ||
450 | exit(1); | ||
451 | } | ||
452 | |||
453 | close(fd); | ||
454 | } | ||
455 | |||
441 | #define MAP_SIZE (32 * 1024) | 456 | #define MAP_SIZE (32 * 1024) |
442 | 457 | ||
443 | static void test_map_large(void) | 458 | static void test_map_large(void) |