diff options
Diffstat (limited to 'tools/testing/selftests/bpf')
-rw-r--r-- | tools/testing/selftests/bpf/test_maps.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c index 5a8e069e64fa..14cea869235b 100644 --- a/tools/testing/selftests/bpf/test_maps.c +++ b/tools/testing/selftests/bpf/test_maps.c @@ -1163,6 +1163,7 @@ static void test_map_in_map(void) struct bpf_map_info info = {}; __u32 len = sizeof(info); __u32 id = 0; + libbpf_print_fn_t old_print_fn; obj = bpf_object__open(MAPINMAP_PROG); @@ -1250,12 +1251,16 @@ static void test_map_in_map(void) goto out_map_in_map; } + old_print_fn = libbpf_set_print(NULL); + err = bpf_object__load(obj); if (!err) { printf("Loading obj supposed to fail\n"); goto out_map_in_map; } + libbpf_set_print(old_print_fn); + /* Iterate over all maps to check whether the internal map * ("mim.internal") has been destroyed. */ |