diff options
| author | Petr Mladek <[email protected]> | 2021-08-30 14:56:06 +0200 |
|---|---|---|
| committer | Petr Mladek <[email protected]> | 2021-08-30 14:56:06 +0200 |
| commit | 71af75b6929458d85f63c0649dc26d6f4c19729e (patch) | |
| tree | c05c57903424d8270f6b6f3ec3493791fdba4e5c /tools/testing/selftests/bpf/prog_tests/hashmap.c | |
| parent | fe8e3ee0d588566c1f44f28a555042ef50eba491 (diff) | |
| parent | bc17bed5fd73ef1a9aed39f3b0ea26936dad60b8 (diff) | |
Merge branch 'for-5.15-printk-index' into for-linus
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/hashmap.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/hashmap.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/hashmap.c b/tools/testing/selftests/bpf/prog_tests/hashmap.c index 428d488830c6..4747ab18f97f 100644 --- a/tools/testing/selftests/bpf/prog_tests/hashmap.c +++ b/tools/testing/selftests/bpf/prog_tests/hashmap.c @@ -48,8 +48,7 @@ static void test_hashmap_generic(void) struct hashmap *map; map = hashmap__new(hash_fn, equal_fn, NULL); - if (CHECK(IS_ERR(map), "hashmap__new", - "failed to create map: %ld\n", PTR_ERR(map))) + if (!ASSERT_OK_PTR(map, "hashmap__new")) return; for (i = 0; i < ELEM_CNT; i++) { @@ -267,8 +266,7 @@ static void test_hashmap_multimap(void) /* force collisions */ map = hashmap__new(collision_hash_fn, equal_fn, NULL); - if (CHECK(IS_ERR(map), "hashmap__new", - "failed to create map: %ld\n", PTR_ERR(map))) + if (!ASSERT_OK_PTR(map, "hashmap__new")) return; /* set up multimap: @@ -339,8 +337,7 @@ static void test_hashmap_empty() /* force collisions */ map = hashmap__new(hash_fn, equal_fn, NULL); - if (CHECK(IS_ERR(map), "hashmap__new", - "failed to create map: %ld\n", PTR_ERR(map))) + if (!ASSERT_OK_PTR(map, "hashmap__new")) goto cleanup; if (CHECK(hashmap__size(map) != 0, "hashmap__size", |