diff options
author | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2014-05-24 12:16:42 -0400 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-25 11:17:01 +0800 |
commit | 552c693eea399e8e32ffb8c9302aaffeb520427d (patch) | |
tree | 61dbaaaad62952a3bf1f1700dbc8cee988cc51b3 /src/test | |
parent | 865cc19a34cd9a3ff98a7b3754747f4904f56faa (diff) |
test-unit-file: skip if unit_file_get_list returns permission denied
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-unit-file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index 63a8a7d076..48133428df 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -48,6 +48,12 @@ static int test_unit_file_get_set(void) { assert(h); r = unit_file_get_list(UNIT_FILE_SYSTEM, NULL, h); + + if (r == -EPERM || r == -EACCES) { + printf("Skipping test: unit_file_get_list: %s", strerror(-r)); + return EXIT_TEST_SKIP; + } + log_full(r == 0 ? LOG_INFO : LOG_ERR, "unit_file_get_list: %s", strerror(-r)); if (r < 0) |