Skip to content

samples, bpf: Refactor; Add automated tests for cgroups

Sargun Dhillon netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2samples, bpf: Refactor test_current_task_under_cgroup - separate out helperssamples/bpf/Makefile samples/bpf/cgroup_helpers.c samples/bpf/cgroup_helpers.h +1 more+218 -851 reply
2/2samples, bpf: Add automated test for cgroup filter attachmentssamples/bpf/Makefile samples/bpf/test_cgrp2_attach2.c+134 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAlexei Starovoitov
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/2] samples, bpf: Refactor; Add automated tests for cgroups

These two patches are around refactoring out some old, reusable code from the existing test_current_task_under_cgroup_user test, and adding a new, automated test.

There is some generic cgroupsv2 setup & cleanup code, given that most environment still don't have it setup by default. With this code, we're able to pretty easily add an automated test for future cgroupsv2 functionality.

Sargun Dhillon (2):
samples, bpf: Refactor test_current_task_under_cgroup - separate out
helpers
samples, bpf: Add automated test for cgroup filter attachments

 samples/bpf/Makefile                              |   4 +-
 samples/bpf/cgroup_helpers.c                      | 177 ++++++++++++++++++++++
 samples/bpf/cgroup_helpers.h                      |  16 ++
 samples/bpf/test_cgrp2_attach2.c                  | 132 ++++++++++++++++
 samples/bpf/test_current_task_under_cgroup_user.c | 108 +++----------
 5 files changed, 352 insertions(+), 85 deletions(-)
 create mode 100644 samples/bpf/cgroup_helpers.c
 create mode 100644 samples/bpf/cgroup_helpers.h
 create mode 100644 samples/bpf/test_cgrp2_attach2.c
Signature · 1 line
2.7.4