diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-10 20:55:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 20:55:20 +0200 |
commit | 651d47d14b987883c604468e87e0e1871554d213 (patch) | |
tree | 17e0abc907985fe44a6c4a3a9acde25fdc36646d /src/test/test-cgroup-mask.c | |
parent | b74023db06a0fae917c2e646a3c6ef307dbe1e57 (diff) | |
download | systemd-651d47d14b987883c604468e87e0e1871554d213.tar.gz |
tests: skip tests when cg_pid_get_path fails (#7033)
v2:
- cast the fstype_t type to ull, because it varies between arches.
Making it long long should be on the safe side.
Diffstat (limited to 'src/test/test-cgroup-mask.c')
-rw-r--r-- | src/test/test-cgroup-mask.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c index 02aae84152..6fd35c81dc 100644 --- a/src/test/test-cgroup-mask.c +++ b/src/test/test-cgroup-mask.c @@ -34,7 +34,11 @@ static int test_cgroup_mask(void) { FDSet *fdset = NULL; int r; - enter_cgroup_subroot(); + r = enter_cgroup_subroot(); + if (r == -ENOMEDIUM) { + puts("Skipping test: cgroupfs not available"); + return EXIT_TEST_SKIP; + } /* Prepare the manager. */ assert_se(set_unit_path(get_testdata_dir("")) >= 0); |