summaryrefslogtreecommitdiff
path: root/src/test/test-namespace.c
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2016-04-11 13:51:51 +0100
committerRonny Chevalier <chevalier.ronny@gmail.com>2016-04-11 13:51:51 +0100
commit6c006ed48717be9c9952288ec42003a114a58871 (patch)
treed4e2040396b693718333f063d0788b705f027b17 /src/test/test-namespace.c
parent14b662590144571985897855f9973f16e386e0ce (diff)
parentd2528deb44222f9bd57239e5bbaf5998e9a2469a (diff)
Merge pull request #3011 from evverx/dont-silently-skip-test-namespace
tests: don't silently skip `test-namespace`
Diffstat (limited to 'src/test/test-namespace.c')
-rw-r--r--src/test/test-namespace.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c
index 0b2f9e9173..ff9f35cecd 100644
--- a/src/test/test-namespace.c
+++ b/src/test/test-namespace.c
@@ -69,8 +69,10 @@ static void test_netns(void) {
int r, n = 0;
siginfo_t si;
- if (geteuid() > 0)
- return;
+ if (geteuid() > 0) {
+ log_info("Skipping test: not root");
+ exit(EXIT_TEST_SKIP);
+ }
assert_se(socketpair(AF_UNIX, SOCK_DGRAM, 0, s) >= 0);
@@ -124,6 +126,9 @@ int main(int argc, char *argv[]) {
char boot_id[SD_ID128_STRING_MAX];
_cleanup_free_ char *x = NULL, *y = NULL, *z = NULL, *zz = NULL;
+ log_parse_environment();
+ log_open();
+
assert_se(sd_id128_get_boot(&bid) >= 0);
sd_id128_to_string(bid, boot_id);