mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-18 06:03:42 +03:00
test-unit-file: skip if unit_file_get_list returns permission denied
This commit is contained in:
parent
865cc19a34
commit
552c693eea
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user