Skip to content

Commit

Permalink
zdtm/static: debug cgroupv2_00
Browse files Browse the repository at this point in the history
Signed-off-by: Bui Quang Minh <[email protected]>
  • Loading branch information
minhbq-99 committed Jul 11, 2024
1 parent 6f92787 commit 1859e49
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/zdtm/static/cgroupv2_00.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ int main(int argc, char **argv)
{
char path[1024], aux[1024];
int ret = -1;
FILE *cgf;

test_init(argc, argv);

Expand Down Expand Up @@ -54,6 +55,16 @@ int main(int argc, char **argv)
if (write_value(path, aux))
goto out;

cgf = fopen("/proc/self/cgroup", "r");
if (cgf == NULL)
goto out;

while (fgets(aux, sizeof(aux), cgf)) {
test_msg("cgroup: %s\n", aux);
}

fclose(cgf);

test_daemon();
test_waitsig();

Expand Down

0 comments on commit 1859e49

Please sign in to comment.