test/scheduler: Don't fail if cgroups don't exist in move_cgroup_procs()
This shows a similar problem the a9614bf6e
was facing. Some cgroups,
especially under v2 + systemd, may have a very small scope, including
very limited number of processes (see comment in init_cpuset_cgroup()).
If they terminate, their cgroups are removed as well.
Change-Id: I0bfc69440f1e7841a7605bc34647f1092cc033aa
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11815
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
eb8655b2fe
commit
5d4ccc8325
@ -52,8 +52,9 @@ move_cgroup_procs() {
|
||||
local new_cgroup=$2
|
||||
local proc procs old_proc_interface new_proc_interface
|
||||
|
||||
[[ -e $sysfs_cgroup/$old_cgroup ]] || return 1
|
||||
[[ -e $sysfs_cgroup/$new_cgroup ]] || return 1
|
||||
# If target cgroups don't exist then there's nothing to do.
|
||||
[[ -e $sysfs_cgroup/$old_cgroup ]] || return 0
|
||||
[[ -e $sysfs_cgroup/$new_cgroup ]] || return 0
|
||||
|
||||
old_proc_interface=cgroup.procs
|
||||
new_proc_interface=cgroup.procs
|
||||
|
Loading…
Reference in New Issue
Block a user