linux/tools
Claudio d863cb03fc Add cgroup core selftests
This commit adds tests for some of the core functionalities
of cgroups v2.

The commit adds tests for some core principles of croup V2 API:

- test_cgcore_internal_process_constraint

  Tests internal process constraint.
  You can't add a pid to a domain parent if a controller is enabled.

- test_cgcore_top_down_constraint_enable

   Tests that you can't enable a controller on a child if it's not enabled
   on the parent.

- test_cgcore_top_down_constraint_disable

  Tests that you can't disable a controller on a parent if it's
  enabled in a child.

- test_cgcore_no_internal_process_constraint_on_threads

  Tests that there's no internal process constrain on threaded cgroups.
  You can add threads/processes on a parent with a controller enabled.

- test_cgcore_parent_becomes_threaded

  Tests that when a child becomes threaded the parent type becomes
  domain threaded.

- test_cgcore_invalid_domain

  In a situation like:

  A (domain threaded) - B (threaded) - C (domain)

  it tests that C can't be used until it is turned into a threaded cgroup.
  The "cgroup.type" file will report "domain (invalid)" in these cases.
  Operations which fail due to invalid topology use EOPNOTSUPP as the errno.

- test_cgcore_populated

  In a situation like:

  A(0) - B(0) - C(1)
         \ D(0)

  It tests that A, B and C's "populated" fields would be 1 while D's 0.
  It tests that after the one process in C is moved to root, A,B and C's
  "populated" fields would flip to "0" and file modified events will
  be generated on the "cgroup.events" files of both cgroups.

Signed-off-by: Claudio Zumbo <claudioz@fb.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Roman Gushchin <guro@fb.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: kernel-team@fb.com
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-08-09 09:12:45 -06:00
..
accounting License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arch tools/headers: Pick up latest kernel ABIs 2018-06-26 08:43:14 +02:00
bpf tools: bpftool: remember to close the libbpf object after prog load 2018-06-21 23:07:13 +02:00
build Kbuild: fix # escaping in .cmd files for future Make 2018-04-11 00:03:02 +09:00
cgroup tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
firewire License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gpio Linux 4.16-rc5 2018-03-18 17:48:59 +01:00
hv tools: hv: include string.h in hv_fcopy_daemon 2018-03-06 09:57:16 -08:00
iio tools: iio: iio_generic_buffer: allow continuous looping 2018-05-20 14:55:58 +01:00
include tools/headers: Pick up latest kernel ABIs 2018-06-26 08:43:14 +02:00
kvm/kvm_stat tools/kvm_stat: Remove unused function 2018-03-28 22:47:06 +02:00
laptop tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
leds tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
lib docs: Fix some broken references 2018-06-15 18:10:01 -03:00
memory-model tools/memory-model: Add reference for 'Simplifying ARM concurrency' 2018-05-15 08:11:19 +02:00
nfsd License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
objtool objtool: Support GCC 8 '-fnoreorder-functions' 2018-07-02 09:42:11 +02:00
pci License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pcmcia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf perf/urgent fixes: 2018-06-26 08:37:57 +02:00
power Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2018-06-21 00:37:04 +02:00
scripts Kbuild: fix # escaping in .cmd files for future Make 2018-04-11 00:03:02 +09:00
spi tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
testing Add cgroup core selftests 2018-08-09 09:12:45 -06:00
thermal/tmon tools/thermal: tmon: fix for segfault 2018-03-27 09:51:23 +02:00
time
usb usbip: usbip_detach: fix to check for invalid ports 2018-05-31 12:44:39 +02:00
virtio sg: remove ->sg_magic member 2018-06-29 08:48:06 -06:00
vm mm: mark pages in use for page tables 2018-06-07 17:34:37 -07:00
wmi tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
Makefile platform-drivers-x86 for v4.15-1 2017-11-18 10:26:57 -08:00