diff mbox series

[5.4,2/2] selftest/bpf: fix backported test_select_reuseport selftest changes

Message ID 20200516004018.3500869-2-andriin@fb.com
State Not Applicable
Delegated to: BPF Maintainers
Headers show
Series [5.4,1/2] libbpf: Extract and generalize CPU mask parsing logic | expand

Commit Message

Andrii Nakryiko May 16, 2020, 12:40 a.m. UTC
Fix up RET_IF as CHECK macro to make selftests compile again.

Fixes: b911c5e8686a ("selftests: bpf: Reset global state between reuseport test runs")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/testing/selftests/bpf/test_select_reuseport.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

gregkh@linuxfoundation.org May 18, 2020, 5:07 p.m. UTC | #1
On Fri, May 15, 2020 at 05:40:17PM -0700, Andrii Nakryiko wrote:
> Fix up RET_IF as CHECK macro to make selftests compile again.
> 
> Fixes: b911c5e8686a ("selftests: bpf: Reset global state between reuseport test runs")
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
>  tools/testing/selftests/bpf/test_select_reuseport.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Both now applied, thanks!

greg k-h
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/selftests/bpf/test_select_reuseport.c
index 079d0f5a2909..7e4c91f2238d 100644
--- a/tools/testing/selftests/bpf/test_select_reuseport.c
+++ b/tools/testing/selftests/bpf/test_select_reuseport.c
@@ -668,12 +668,12 @@  static void cleanup_per_test(void)
 
 	for (i = 0; i < NR_RESULTS; i++) {
 		err = bpf_map_update_elem(result_map, &i, &zero, BPF_ANY);
-		RET_IF(err, "reset elem in result_map",
+		CHECK(err, "reset elem in result_map",
 		       "i:%u err:%d errno:%d\n", i, err, errno);
 	}
 
 	err = bpf_map_update_elem(linum_map, &zero, &zero, BPF_ANY);
-	RET_IF(err, "reset line number in linum_map", "err:%d errno:%d\n",
+	CHECK(err, "reset line number in linum_map", "err:%d errno:%d\n",
 	       err, errno);
 
 	for (i = 0; i < REUSEPORT_ARRAY_SIZE; i++)