Re: [PATCH v2 bpf-next 2/2] selftests: bpf: Add a new test for bare tracepoints

2021-01-19 Thread Qais Yousef
Hi Yonghong On 01/18/21 09:48, Yonghong Song wrote: > The original patch code: > > +static int trigger_module_test_write(int write_sz) > +{ > + int fd, err; > + char *buf = malloc(write_sz); > + > + if (!buf) > + return -ENOMEM; > + > + memset(buf, 'a', write_sz); > +

Re: [PATCH v2 bpf-next 2/2] selftests: bpf: Add a new test for bare tracepoints

2021-01-18 Thread Yonghong Song
On 1/18/21 4:18 AM, Qais Yousef wrote: On 01/16/21 18:11, Yonghong Song wrote: On 1/16/21 10:21 AM, Qais Yousef wrote: Reuse module_attach infrastructure to add a new bare tracepoint to check we can attach to it as a raw tracepoint. Signed-off-by: Qais Yousef --- .../bpf/bpf_testmod/b

Re: [PATCH v2 bpf-next 2/2] selftests: bpf: Add a new test for bare tracepoints

2021-01-18 Thread Qais Yousef
On 01/16/21 18:11, Yonghong Song wrote: > > > On 1/16/21 10:21 AM, Qais Yousef wrote: > > Reuse module_attach infrastructure to add a new bare tracepoint to check > > we can attach to it as a raw tracepoint. > > > > Signed-off-by: Qais Yousef > > --- > > .../bpf/bpf_testmod/bpf_testmod-events

Re: [PATCH v2 bpf-next 2/2] selftests: bpf: Add a new test for bare tracepoints

2021-01-16 Thread Yonghong Song
On 1/16/21 10:21 AM, Qais Yousef wrote: Reuse module_attach infrastructure to add a new bare tracepoint to check we can attach to it as a raw tracepoint. Signed-off-by: Qais Yousef --- .../bpf/bpf_testmod/bpf_testmod-events.h | 6 + .../selftests/bpf/bpf_testmod/bpf_testmod.c

[PATCH v2 bpf-next 2/2] selftests: bpf: Add a new test for bare tracepoints

2021-01-16 Thread Qais Yousef
Reuse module_attach infrastructure to add a new bare tracepoint to check we can attach to it as a raw tracepoint. Signed-off-by: Qais Yousef --- .../bpf/bpf_testmod/bpf_testmod-events.h | 6 + .../selftests/bpf/bpf_testmod/bpf_testmod.c | 21 ++- .../selftests/bpf/bpf_tes