On Sun, Sep 25, 2022 at 9:51 PM Wang Yufen <wangyufen@xxxxxxxxxx> wrote: > > Convert some tests to use the preferred ASSERT_* macros instead of the > deprecated CHECK(). > > Wang Yufen (11): > bpf/selftests: convert sockmap_basic test to ASSERT_* macros > bpf/selftests: convert sockmap_ktls test to ASSERT_* macros > bpf/selftests: convert sockopt test to ASSERT_* macros > bpf/selftests: convert sockopt_inherit test to ASSERT_* macros > bpf/selftests: convert sockopt_multi test to ASSERT_* macros > bpf/selftests: convert sockopt_sk test to ASSERT_* macros > bpf/selftests: convert tcp_estats test to ASSERT_* macros > bpf/selftests: convert tcp_hdr_options test to ASSERT_* macros > bpf/selftests: convert tcp_rtt test to ASSERT_* macros > bpf/selftests: convert tcpbpf_user test to ASSERT_* macros > bpf/selftests: convert udp_limit test to ASSERT_* macros > > .../selftests/bpf/prog_tests/sockmap_basic.c | 87 ++++++++-------------- > .../selftests/bpf/prog_tests/sockmap_ktls.c | 39 +++------- > tools/testing/selftests/bpf/prog_tests/sockopt.c | 4 +- > .../selftests/bpf/prog_tests/sockopt_inherit.c | 30 ++++---- > .../selftests/bpf/prog_tests/sockopt_multi.c | 10 +-- > .../testing/selftests/bpf/prog_tests/sockopt_sk.c | 2 +- > .../testing/selftests/bpf/prog_tests/tcp_estats.c | 4 +- > .../selftests/bpf/prog_tests/tcp_hdr_options.c | 80 +++++++------------- > tools/testing/selftests/bpf/prog_tests/tcp_rtt.c | 13 ++-- > .../testing/selftests/bpf/prog_tests/tcpbpf_user.c | 32 +++----- > tools/testing/selftests/bpf/prog_tests/udp_limit.c | 18 ++--- > 11 files changed, 117 insertions(+), 202 deletions(-) > > -- > 1.8.3.1 > Thanks for the clean up! I've changed one ASSERT_OK(err && errno != ENOENT) to ASSERT_EQ(errno, ENOENT) in patch #1, that expresses the intent more directly. Please also keep in mind that patch prefix should (conventionally) be "selftests/bpf: ". I've fixed that for all patches while applying. We are down to: $ rg -w CHECK | wc -l 1186 09/28 17:36:39.381 andriin@devbig019:~/linux/tools/testing/selftests/bpf (master) $ rg -w CHECK_FAIL | wc -l 463 Some ways to go still, but slowly decreasing. Thank you for your contribution!