selftests: cgroup: Simplify task self migration

Simplify task migration by being oblivious about its PID during
migration. This allows to easily migrate individual threads as well.
This change brings no functional change and prepares grounds for thread
granularity migrating tests.

Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Michal Koutný
2019-10-04 12:57:41 +02:00
committed by Tejun Heo
parent 9a3284fad4
commit 58c9f75b86
3 changed files with 15 additions and 7 deletions

View File

@@ -701,7 +701,7 @@ static int proc_check_stopped(int pid)
char buf[PAGE_SIZE];
int len;
len = proc_read_text(pid, "stat", buf, sizeof(buf));
len = proc_read_text(pid, 0, "stat", buf, sizeof(buf));
if (len == -1) {
debug("Can't get %d stat\n", pid);
return -1;