[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181130234745.6756-6-guro@fb.com>
Date: Fri, 30 Nov 2018 15:47:43 -0800
From: Roman Gushchin <guroan@...il.com>
To: Tejun Heo <tj@...nel.org>, Oleg Nesterov <oleg@...hat.com>
Cc: Dan Carpenter <dan.carpenter@...cle.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
cgroups@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-team@...com,
Roman Gushchin <guro@...com>, Shuah Khan <shuah@...nel.org>,
linux-kselftest@...r.kernel.org
Subject: [PATCH v4 5/7] 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@...com>
Cc: Shuah Khan <shuah@...nel.org>
Cc: Tejun Heo <tj@...nel.org>
Cc: kernel-team@...com
Cc: linux-kselftest@...r.kernel.org
---
tools/testing/selftests/cgroup/cgroup_util.c | 4 +---
1 file changed, 1 insertion(+), 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;
}
--
2.17.2
Powered by blists - more mailing lists