Re: [PATCH V2 bpf-next 2/2] selftests/bpf: add selftest for bpf_task_get_cgroup

2024-03-18 Thread Jose Fernandez
On 24/03/18 10:58AM, Jiri Olsa wrote: > On Sat, Mar 16, 2024 at 10:22:41AM -0600, Jose Fernandez wrote: > > SNIP > > > +void test_task_get_cgroup(void) > > +{ > > + struct test_task_get_cgroup *skel; > > + int err, fd; > > + pid_t pid; > > + __u64 cgroup_id, expected_cgroup_id; > > + co

Re: [PATCH V2 bpf-next 2/2] selftests/bpf: add selftest for bpf_task_get_cgroup

2024-03-18 Thread Jiri Olsa
On Sat, Mar 16, 2024 at 10:22:41AM -0600, Jose Fernandez wrote: SNIP > +void test_task_get_cgroup(void) > +{ > + struct test_task_get_cgroup *skel; > + int err, fd; > + pid_t pid; > + __u64 cgroup_id, expected_cgroup_id; > + const struct timespec req = { > + .tv_se

Re: [PATCH V2 bpf-next 2/2] selftests/bpf: add selftest for bpf_task_get_cgroup

2024-03-17 Thread Alexei Starovoitov
On Sun, Mar 17, 2024 at 8:10 PM Ratheesh Kannoth wrote: > > On 2024-03-16 at 21:52:41, Jose Fernandez (jo...@netflix.com) wrote: > > This patch adds a selftest for the `bpf_task_get_cgroup` kfunc. The test > > focuses on the use case of obtaining the cgroup ID of the previous task > > in a `sched_

Re: [PATCH V2 bpf-next 2/2] selftests/bpf: add selftest for bpf_task_get_cgroup

2024-03-17 Thread Ratheesh Kannoth
On 2024-03-16 at 21:52:41, Jose Fernandez (jo...@netflix.com) wrote: > This patch adds a selftest for the `bpf_task_get_cgroup` kfunc. The test > focuses on the use case of obtaining the cgroup ID of the previous task > in a `sched_switch` tracepoint. > > The selftest involves creating a test cgrou

[PATCH V2 bpf-next 2/2] selftests/bpf: add selftest for bpf_task_get_cgroup

2024-03-16 Thread Jose Fernandez
This patch adds a selftest for the `bpf_task_get_cgroup` kfunc. The test focuses on the use case of obtaining the cgroup ID of the previous task in a `sched_switch` tracepoint. The selftest involves creating a test cgroup, attaching a BPF program that utilizes the `bpf_task_get_cgroup` during a `s