blob: 18289348153189d01543b02b2222e765481e0ee4 [file] [log] [blame]
Andrew Geissler062316f2020-05-15 14:19:14 -05001From 4cd12df48b83cef9cc7d6b80b128afbf68746718 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 14 Mar 2020 07:31:34 -0700
4Subject: [PATCH] selftest/bpf: Use CHECK macro instead of RET_IF
5
6backporting 634efb750435d0a489dc58477d4fcb88b2692942 causes build
7failures because RET_IF is defined in 7ee0d4e97b889c0478af9c1a6e5af658b181423f
8but that is not backported
9
10Upstream-Status: Submitted
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Cc: Jakub Sitnicki <jakub@cloudflare.com>
13Cc: Alexei Starovoitov <ast@kernel.org>
14Signed-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
19diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/selftests/bpf/test_select_reuseport.c
20index 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--
392.26.0
40