aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Gushchin <[email protected]>2019-04-19 10:03:05 -0700
committerTejun Heo <[email protected]>2019-04-19 11:26:49 -0700
commitff9fb7cb515b32ac8d479b086c7c8c565d6905fb (patch)
treebb6b90abd92d808f0532137a6abc04a57cab4a66
parent76f969e8948d82e78e1bc4beb6b9465908e74873 (diff)
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 <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Cc: Shuah Khan <[email protected]> Cc: [email protected] Cc: [email protected]
-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;
}