selftest/bpf: fix backported test_select_reuseport selftest changes
authorAndrii Nakryiko <andriin@fb.com>
Sat, 16 May 2020 00:40:17 +0000 (17:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:20:40 +0000 (08:20 +0200)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/bpf/test_select_reuseport.c

index 079d0f5a29091db8b1764f23811a2e5df8182a5e..7e4c91f2238d36d92ff69ba9870d0c1781bedd90 100644 (file)
@@ -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++)