aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/cgroup
diff options
context:
space:
mode:
authorRoman Gushchin <guro@fb.com>2019-04-19 10:03:05 -0700
committerTejun Heo <tj@kernel.org>2019-04-19 11:26:49 -0700
commitff9fb7cb515b32ac8d479b086c7c8c565d6905fb (patch)
treebb6b90abd92d808f0532137a6abc04a57cab4a66 /tools/testing/selftests/cgroup
parentcgroup: cgroup v2 freezer (diff)
downloadlinux-dev-ff9fb7cb515b32ac8d479b086c7c8c565d6905fb.tar.xz
linux-dev-ff9fb7cb515b32ac8d479b086c7c8c565d6905fb.zip
kselftests: cgroup: don't fail on cg_kill_all() error in cg_destroy()
If the cgroup destruction races with an exit() of a belonging process(es), cg_kill_all() may fail. It's not a good reason to make cg_destroy() fail and leave the cgroup in place, potentially causing next test runs to fail. Signed-off-by: Roman Gushchin <guro@fb.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: kernel-team@fb.com Cc: linux-kselftest@vger.kernel.org
Diffstat (limited to 'tools/testing/selftests/cgroup')
-rw-r--r--tools/testing/selftests/cgroup/cgroup_util.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/testing/selftests/cgroup/cgroup_util.c b/tools/testing/selftests/cgroup/cgroup_util.c
index 14c9fe284806..eba06f94433b 100644
--- a/tools/testing/selftests/cgroup/cgroup_util.c
+++ b/tools/testing/selftests/cgroup/cgroup_util.c
@@ -227,9 +227,7 @@ int cg_destroy(const char *cgroup)
retry:
ret = rmdir(cgroup);
if (ret && errno == EBUSY) {
- ret = cg_killall(cgroup);
- if (ret)
- return ret;
+ cg_killall(cgroup);
usleep(100);
goto retry;
}