Skip to content

Commit

Permalink
selftests: cgroup: Make cg_create() use 0755 for permission instead o…
Browse files Browse the repository at this point in the history
…f 0644

0644 is an odd perm to create a cgroup which is a directory. Use the regular
0755 instead. This is necessary for euid switching test case.

Reviewed-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Tejun Heo committed Jan 6, 2022
1 parent e574576 commit b09c2ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/cgroup/cgroup_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ int cg_find_unified_root(char *root, size_t len)

int cg_create(const char *cgroup)
{
return mkdir(cgroup, 0644);
return mkdir(cgroup, 0755);
}

int cg_wait_for_proc_count(const char *cgroup, int count)
Expand Down

0 comments on commit b09c2ba

Please sign in to comment.