From: Lennart Poettering Date: Fri, 22 Oct 2021 07:39:55 +0000 (+0200) Subject: test-networkd-address: fix clock type X-Git-Tag: v250-rc1~452 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0e914eaf86e2d10454f7b9dae1295d3f3213a49;p=thirdparty%2Fsystemd.git test-networkd-address: fix clock type The clock to use internally is clock_boottime_or_monotonic(), but the test used CLOCK_MONOTONIC. After one system suspend the test thus likely starts to fail. --- diff --git a/src/network/test-networkd-address.c b/src/network/test-networkd-address.c index 564c76f8483..46e8369abb4 100644 --- a/src/network/test-networkd-address.c +++ b/src/network/test-networkd-address.c @@ -16,7 +16,7 @@ static void test_FORMAT_LIFETIME(void) { log_info("/* %s */", __func__); - now_usec = now(CLOCK_MONOTONIC); + now_usec = now(clock_boottime_or_monotonic()); test_FORMAT_LIFETIME_one(now_usec, "for 0"); test_FORMAT_LIFETIME_one(usec_add(now_usec, 2 * USEC_PER_SEC - 1), "for 1s"); @@ -25,7 +25,7 @@ static void test_FORMAT_LIFETIME(void) { } int main(int argc, char *argv[]) { - test_setup_logging(LOG_INFO); + test_setup_logging(LOG_DEBUG); test_FORMAT_LIFETIME();