1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

Merge pull request #3011 from evverx/dont-silently-skip-test-namespace

tests: don't silently skip `test-namespace`
This commit is contained in:
Ronny Chevalier 2016-04-11 13:51:51 +01:00
commit 6c006ed487

View File

@ -69,8 +69,10 @@ static void test_netns(void) {
int r, n = 0; int r, n = 0;
siginfo_t si; siginfo_t si;
if (geteuid() > 0) if (geteuid() > 0) {
return; log_info("Skipping test: not root");
exit(EXIT_TEST_SKIP);
}
assert_se(socketpair(AF_UNIX, SOCK_DGRAM, 0, s) >= 0); 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]; char boot_id[SD_ID128_STRING_MAX];
_cleanup_free_ char *x = NULL, *y = NULL, *z = NULL, *zz = NULL; _cleanup_free_ char *x = NULL, *y = NULL, *z = NULL, *zz = NULL;
log_parse_environment();
log_open();
assert_se(sd_id128_get_boot(&bid) >= 0); assert_se(sd_id128_get_boot(&bid) >= 0);
sd_id128_to_string(bid, boot_id); sd_id128_to_string(bid, boot_id);