kselftest/cgroup: add cgroup destruction test
authorSuren Baghdasaryan <surenb@google.com>
Fri, 24 Jan 2020 11:40:17 +0000 (12:40 +0100)
committerTejun Heo <tj@kernel.org>
Wed, 12 Feb 2020 22:12:04 +0000 (17:12 -0500)
commit04189382c0be4e045d63a38b47f012a8f6c35edc
tree2f75996992399f5c941a8f53a42ca402b6eee70a
parentf43caa2adc96fc9c95fd77eef63cdff86ebf33cb
kselftest/cgroup: add cgroup destruction test

Add new test to verify that a cgroup with dead processes can be destroyed.
The test spawns a child process which allocates and touches 100MB of RAM
to ensure prolonged exit. Subsequently it kills the child, waits until
the cgroup containing the child is empty and destroys the cgroup.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
[mkoutny@suse.com: Fix typo in test_cgcore_destroy comment]
Acked-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/cgroup/test_core.c