On Tue, Feb 25, 2020 at 5:20 PM Forrest Chen <forrest0579@xxxxxxxxx> 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 <andrii.nakryiko@xxxxxxxxx> 于2020年2月26日周三 上午1:13写道: >> >> On Mon, Feb 24, 2020 at 11:20 PM Forrest Chen <forrest0579@xxxxxxxxx> wrote: >> > >> > > 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. >> >> > >> > Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> 于2020年2月25日周二 下午2:13写道: >> >> >> >> On Mon, Feb 24, 2020 at 8:47 PM Lingpeng Chen <forrest0579@xxxxxxxxx> wrote: >> >> > >> >> > adding selftest for new bpf helper function get_netns_id >> >> > >> >> > Signed-off-by: Lingpeng Chen <forrest0579@xxxxxxxxx> >> >> > Acked-by: Song Liu <songliubraving@xxxxxx> >> >> > --- >> >> >> >> 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? >> >> >> >> > .../selftests/bpf/progs/test_tcpbpf_kern.c | 11 +++++ >> >> > .../testing/selftests/bpf/test_tcpbpf_user.c | 46 ++++++++++++++++++- >> >> > 2 files changed, 56 insertions(+), 1 deletion(-) >> >> > [...]