[systemd-commits] src/test

Lennart Poettering lennart at kemper.freedesktop.org
Sat May 24 20:17:12 PDT 2014


 src/test/test-unit-file.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 552c693eea399e8e32ffb8c9302aaffeb520427d
Author: Cristian Rodríguez <crrodriguez at opensuse.org>
Date:   Sat May 24 12:16:42 2014 -0400

    test-unit-file: skip if unit_file_get_list returns permission denied

diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index 63a8a7d..4813342 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)



More information about the systemd-commits mailing list