summaryrefslogtreecommitdiffstats
path: root/src/test/test-unit-name.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-10-10 20:55:20 +0200
committerGitHub <noreply@github.com>2017-10-10 20:55:20 +0200
commit651d47d14b987883c604468e87e0e1871554d213 (patch)
tree17e0abc907985fe44a6c4a3a9acde25fdc36646d /src/test/test-unit-name.c
parentMerge pull request #7003 from yuwata/enable-dynamic-user (diff)
downloadsystemd-651d47d14b987883c604468e87e0e1871554d213.tar.xz
systemd-651d47d14b987883c604468e87e0e1871554d213.zip
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-unit-name.c')
-rw-r--r--src/test/test-unit-name.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c
index 1992357e1b..858bbf8476 100644
--- a/src/test/test-unit-name.c
+++ b/src/test/test-unit-name.c
@@ -465,12 +465,16 @@ static void test_unit_name_path_unescape(void) {
int main(int argc, char* argv[]) {
_cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL;
- int rc = 0;
+ int r, rc = 0;
log_parse_environment();
log_open();
- enter_cgroup_subroot();
+ r = enter_cgroup_subroot();
+ if (r == -ENOMEDIUM) {
+ log_notice_errno(r, "Skipping test: cgroupfs not available");
+ return EXIT_TEST_SKIP;
+ }
assert_se(runtime_dir = setup_fake_runtime_dir());