Re: [PATCH v4 bpf-next 3/3] selftests/bpf: add selftest for get_netns_id helper
From: Andrii Nakryiko <hidden>
Date: 2020-02-26 04:35:29
Also in:
bpf
On Tue, Feb 25, 2020 at 5:20 PM Forrest Chen [off-list ref] wrote:
Got it. So I think we could first merge this and refactor the tcpbpf test(or maybe also some other tests) in another thread, is that ok with you?
Sure, as long as there is a follow up. Also, please make sure to reply inline.
Andrii Nakryiko [off-list ref] 于2020年2月26日周三 上午1:13写道:quoted
On Mon, Feb 24, 2020 at 11:20 PM Forrest Chen [off-list ref] wrote:quoted
quoted
It would be nice if this selftests becomes part of test_progs.You mean the whole tests of tcpbpf or only the changes I made in this test? If you mean the whole tests of tcpbpf, I think we could fire another thread to do this?Yeah, I meant entire tcpbpf test.quoted
Andrii Nakryiko [off-list ref] 于2020年2月25日周二 下午2:13写道:quoted
On Mon, Feb 24, 2020 at 8:47 PM Lingpeng Chen [off-list ref] wrote:quoted
adding selftest for new bpf helper function get_netns_id Signed-off-by: Lingpeng Chen <redacted> Acked-by: Song Liu <redacted> ---It would be nice if this selftests becomes part of test_progs. That way it would be exercised regularly, both by committers, as well as by automated CI in libbpf's Github repo. Using global variables and BPF skeleton would also clean up both BPF and user-space code. It seems like this test runs Python script for server, but doesn't seem like that server is doing anything complicated, so writing that in C shouldn't be a problem as well. Thoughts?quoted
.../selftests/bpf/progs/test_tcpbpf_kern.c | 11 +++++ .../testing/selftests/bpf/test_tcpbpf_user.c | 46 ++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-)
[...]