Andrew Geissler | 062316f | 2020-05-15 14:19:14 -0500 | [diff] [blame^] | 1 | From 4cd12df48b83cef9cc7d6b80b128afbf68746718 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 14 Mar 2020 07:31:34 -0700 |
| 4 | Subject: [PATCH] selftest/bpf: Use CHECK macro instead of RET_IF |
| 5 | |
| 6 | backporting 634efb750435d0a489dc58477d4fcb88b2692942 causes build |
| 7 | failures because RET_IF is defined in 7ee0d4e97b889c0478af9c1a6e5af658b181423f |
| 8 | but that is not backported |
| 9 | |
| 10 | Upstream-Status: Submitted |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | Cc: Jakub Sitnicki <jakub@cloudflare.com> |
| 13 | Cc: Alexei Starovoitov <ast@kernel.org> |
| 14 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> |
| 15 | --- |
| 16 | tools/testing/selftests/bpf/test_select_reuseport.c | 4 ++-- |
| 17 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 18 | |
| 19 | diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/selftests/bpf/test_select_reuseport.c |
| 20 | index 079d0f5a2909..7e4c91f2238d 100644 |
| 21 | --- a/tools/testing/selftests/bpf/test_select_reuseport.c |
| 22 | +++ b/tools/testing/selftests/bpf/test_select_reuseport.c |
| 23 | @@ -668,12 +668,12 @@ static void cleanup_per_test(void) |
| 24 | |
| 25 | for (i = 0; i < NR_RESULTS; i++) { |
| 26 | err = bpf_map_update_elem(result_map, &i, &zero, BPF_ANY); |
| 27 | - RET_IF(err, "reset elem in result_map", |
| 28 | + CHECK(err, "reset elem in result_map", |
| 29 | "i:%u err:%d errno:%d\n", i, err, errno); |
| 30 | } |
| 31 | |
| 32 | err = bpf_map_update_elem(linum_map, &zero, &zero, BPF_ANY); |
| 33 | - RET_IF(err, "reset line number in linum_map", "err:%d errno:%d\n", |
| 34 | + CHECK(err, "reset line number in linum_map", "err:%d errno:%d\n", |
| 35 | err, errno); |
| 36 | |
| 37 | for (i = 0; i < REUSEPORT_ARRAY_SIZE; i++) |
| 38 | -- |
| 39 | 2.26.0 |
| 40 | |