diff options
author | Kay Sievers <kay@vrfy.org> | 2013-07-18 23:05:29 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-07-18 23:05:29 +0200 |
commit | f04ca8c214e02e58877e994e5d1fa29a6abe5157 (patch) | |
tree | 8380b0a49023f2c873799336b93842e879f49d13 | |
parent | util: add split_pair() for splitting foo=bar strings (diff) | |
download | systemd-f04ca8c214e02e58877e994e5d1fa29a6abe5157.tar.gz systemd-f04ca8c214e02e58877e994e5d1fa29a6abe5157.tar.bz2 systemd-f04ca8c214e02e58877e994e5d1fa29a6abe5157.zip |
tests: skip tests when executed without privileges but which require them
-rw-r--r-- | src/test/test-sched-prio.c | 2 | ||||
-rw-r--r-- | src/test/test-unit-name.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c index 509c75f42..1bbe86731 100644 --- a/src/test/test-sched-prio.c +++ b/src/test/test-sched-prio.c @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) { /* prepare the test */ assert_se(set_unit_path(TEST_DIR) >= 0); r = manager_new(SYSTEMD_USER, false, &m); - if (r == -EPERM) { + if (r == -EPERM || r == -EACCES) { puts("manager_new: Permission denied. Skipping test."); return EXIT_TEST_SKIP; } diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 2fa029488..6776ef085 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -124,7 +124,7 @@ static int test_unit_printf(void) { assert_se(asprintf(&root_uid, "%d", (int) root->pw_uid) > 0); r = manager_new(SYSTEMD_USER, false, &m); - if (r == -EPERM) { + if (r == -EPERM || r == -EACCES) { puts("manager_new: Permission denied. Skipping test."); return EXIT_TEST_SKIP; } |