chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
865cc19
)
test-unit-file: skip if unit_file_get_list returns permission denied
author
Cristian RodrÃguez
<crrodriguez@opensuse.org>
Sat, 24 May 2014 16:16:42 +0000
(12:16 -0400)
committer
Lennart Poettering
<lennart@poettering.net>
Sun, 25 May 2014 03:17:01 +0000
(11:17 +0800)
src/test/test-unit-file.c
patch
|
blob
|
history
diff --git
a/src/test/test-unit-file.c
b/src/test/test-unit-file.c
index 63a8a7d076a397b98213a28c62ec2583e46c0947..48133428df393960214f1079cefc5242bbd20548 100644
(file)
--- 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);
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)
log_full(r == 0 ? LOG_INFO : LOG_ERR,
"unit_file_get_list: %s", strerror(-r));
if (r < 0)