linux-stable/tools
Roman Gushchin d5506591d5 selftests/bpf: add auto-detach test
Add a kselftest to cover bpf auto-detachment functionality.
The test creates a cgroup, associates some resources with it,
attaches a couple of bpf programs and deletes the cgroup.

Then it checks that bpf programs are going away in 5 seconds.

Expected output:
  $ ./test_cgroup_attach
  #override:PASS
  #multi:PASS
  #autodetach:PASS
  test_cgroup_attach:PASS

On a kernel without auto-detaching:
  $ ./test_cgroup_attach
  #override:PASS
  #multi:PASS
  #autodetach:FAIL
  test_cgroup_attach:FAIL

Signed-off-by: Roman Gushchin <guro@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-05-28 09:30:02 -07:00
..
accounting
arch treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
bpf tools: bpftool: make -d option print debug output from verifier 2019-05-28 11:03:26 +02:00
build treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cgroup
crypto
debugging
firewire
firmware
gpio
hv
iio Merge 5.0-rc6 into staging-next 2019-02-11 09:25:01 +01:00
include tools: bpf: sync uapi header bpf.h 2019-05-24 18:58:37 -07:00
io_uring tools/io_uring: remove IOCQE_FLAG_CACHEHIT 2019-04-08 10:48:50 -06:00
kvm/kvm_stat
laptop
leds
lib libbpf: add bpf_object__load_xattr() API function to pass log_level 2019-05-28 11:03:26 +02:00
memory-model tools/memory-model: Add support for synchronize_srcu_expedited() 2019-04-04 13:48:34 -07:00
nfsd
objtool treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
pci perf/core improvements and fixes: 2019-05-18 10:24:43 +02:00
pcmcia
perf treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
power treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
scripts
spi treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
testing selftests/bpf: add auto-detach test 2019-05-28 09:30:02 -07:00
thermal/tmon
time
usb treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
virtio treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
vm tools/vm/slabinfo: clean up usage menu debug items 2019-03-05 21:07:20 -08:00
wmi treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile