Toke Høiland-Jørgensen <toke@xxxxxxxxxx> writes: > Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> writes: > >> On Thu, Apr 8, 2021 at 12:57 PM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: >>> >>> Extend the fexit_bpf2bpf test to check that the info for the bpf_link >>> returned by the kernel matches the expected values. >>> >>> While we're updating the test, change existing uses of CHEC() to use the >>> much easier to read ASSERT_*() macros. >>> >>> Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> >>> --- >> >> Just a minor nit below. Looks good, thanks. >> >> Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> >> >>> .../selftests/bpf/prog_tests/fexit_bpf2bpf.c | 50 +++++++++++++++---- >>> 1 file changed, 39 insertions(+), 11 deletions(-) >>> >>> diff --git a/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c b/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c >>> index 5c0448910426..019a46d8e98e 100644 >>> --- a/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c >>> +++ b/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c >>> @@ -57,11 +57,13 @@ static void test_fexit_bpf2bpf_common(const char *obj_file, >>> bool run_prog, >>> test_cb cb) >>> { >>> + __u32 duration = 0, retval, tgt_prog_id, info_len; >> >> if not CHECK() is used, duration shouldn't be needed anymore > > Oh, and duration is still needed for bpf_prog_test_run(), so I'll keep > that; but removing it did make the compiler point out that I missed one > CHECK() at the beginning of the function when converting, so will fix > that instead :) Argh, no, bpf_prog_test_run() will accept a NULL pointer for duration; sorry for the noise! -Toke