OSDN Git Service

selftests/bpf: fix error printing in test_devmap()
authorXiaozhou Liu <liuxiaozhou@bytedance.com>
Fri, 21 Dec 2018 09:35:11 +0000 (17:35 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 1 Jan 2019 12:48:59 +0000 (13:48 +0100)
As a simple fix, just print the correct map type.

Signed-off-by: Xiaozhou Liu <liuxiaozhou@bytedance.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_maps.c

index 9c79ee0..e2b9eee 100644 (file)
@@ -510,7 +510,7 @@ static void test_devmap(int task, void *data)
        fd = bpf_create_map(BPF_MAP_TYPE_DEVMAP, sizeof(key), sizeof(value),
                            2, 0);
        if (fd < 0) {
-               printf("Failed to create arraymap '%s'!\n", strerror(errno));
+               printf("Failed to create devmap '%s'!\n", strerror(errno));
                exit(1);
        }