diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-10-22 09:39:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-10-22 13:29:12 +0200 |
commit | e0e914eaf86e2d10454f7b9dae1295d3f3213a49 (patch) | |
tree | 1b4b36f100af1837de4c8a761be0df82a081a83a /src/network/test-networkd-address.c | |
parent | sd-boot: Be more precise about secure boot modes (diff) | |
download | systemd-e0e914eaf86e2d10454f7b9dae1295d3f3213a49.tar.xz systemd-e0e914eaf86e2d10454f7b9dae1295d3f3213a49.zip |
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.
Diffstat (limited to 'src/network/test-networkd-address.c')
-rw-r--r-- | src/network/test-networkd-address.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/test-networkd-address.c b/src/network/test-networkd-address.c index 564c76f848..46e8369abb 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(); |