diff options
Diffstat (limited to 'samples/bpf/test_cgrp2_attach2.c')
| -rw-r--r-- | samples/bpf/test_cgrp2_attach2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/samples/bpf/test_cgrp2_attach2.c b/samples/bpf/test_cgrp2_attach2.c index d7b68ef5ba79..0bb6507256b7 100644 --- a/samples/bpf/test_cgrp2_attach2.c +++ b/samples/bpf/test_cgrp2_attach2.c | |||
| @@ -77,7 +77,7 @@ static int test_foo_bar(void) | |||
| 77 | 77 | ||
| 78 | /* Create cgroup /foo, get fd, and join it */ | 78 | /* Create cgroup /foo, get fd, and join it */ |
| 79 | foo = create_and_get_cgroup(FOO); | 79 | foo = create_and_get_cgroup(FOO); |
| 80 | if (!foo) | 80 | if (foo < 0) |
| 81 | goto err; | 81 | goto err; |
| 82 | 82 | ||
| 83 | if (join_cgroup(FOO)) | 83 | if (join_cgroup(FOO)) |
| @@ -94,7 +94,7 @@ static int test_foo_bar(void) | |||
| 94 | 94 | ||
| 95 | /* Create cgroup /foo/bar, get fd, and join it */ | 95 | /* Create cgroup /foo/bar, get fd, and join it */ |
| 96 | bar = create_and_get_cgroup(BAR); | 96 | bar = create_and_get_cgroup(BAR); |
| 97 | if (!bar) | 97 | if (bar < 0) |
| 98 | goto err; | 98 | goto err; |
| 99 | 99 | ||
| 100 | if (join_cgroup(BAR)) | 100 | if (join_cgroup(BAR)) |
| @@ -298,19 +298,19 @@ static int test_multiprog(void) | |||
| 298 | goto err; | 298 | goto err; |
| 299 | 299 | ||
| 300 | cg1 = create_and_get_cgroup("/cg1"); | 300 | cg1 = create_and_get_cgroup("/cg1"); |
| 301 | if (!cg1) | 301 | if (cg1 < 0) |
| 302 | goto err; | 302 | goto err; |
| 303 | cg2 = create_and_get_cgroup("/cg1/cg2"); | 303 | cg2 = create_and_get_cgroup("/cg1/cg2"); |
| 304 | if (!cg2) | 304 | if (cg2 < 0) |
| 305 | goto err; | 305 | goto err; |
| 306 | cg3 = create_and_get_cgroup("/cg1/cg2/cg3"); | 306 | cg3 = create_and_get_cgroup("/cg1/cg2/cg3"); |
| 307 | if (!cg3) | 307 | if (cg3 < 0) |
| 308 | goto err; | 308 | goto err; |
| 309 | cg4 = create_and_get_cgroup("/cg1/cg2/cg3/cg4"); | 309 | cg4 = create_and_get_cgroup("/cg1/cg2/cg3/cg4"); |
| 310 | if (!cg4) | 310 | if (cg4 < 0) |
| 311 | goto err; | 311 | goto err; |
| 312 | cg5 = create_and_get_cgroup("/cg1/cg2/cg3/cg4/cg5"); | 312 | cg5 = create_and_get_cgroup("/cg1/cg2/cg3/cg4/cg5"); |
| 313 | if (!cg5) | 313 | if (cg5 < 0) |
| 314 | goto err; | 314 | goto err; |
| 315 | 315 | ||
| 316 | if (join_cgroup("/cg1/cg2/cg3/cg4/cg5")) | 316 | if (join_cgroup("/cg1/cg2/cg3/cg4/cg5")) |
