summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/test-ndisc-ra.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-09-05 09:51:39 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-09-20 21:01:14 +0200
commiteca280c8c099a0cfe90b47ed9b37d356c507535e (patch)
treee382a248c913415b5cde7e9bf62b003a5f6ef7bc /src/libsystemd-network/test-ndisc-ra.c
parenttreewide: split commandline into command line (diff)
downloadsystemd-eca280c8c099a0cfe90b47ed9b37d356c507535e.tar.xz
systemd-eca280c8c099a0cfe90b47ed9b37d356c507535e.zip
sd-radv: make sd_radv always take timespan in usec
Diffstat (limited to 'src/libsystemd-network/test-ndisc-ra.c')
-rw-r--r--src/libsystemd-network/test-ndisc-ra.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsystemd-network/test-ndisc-ra.c b/src/libsystemd-network/test-ndisc-ra.c
index 18004f6466..6f4619943c 100644
--- a/src/libsystemd-network/test-ndisc-ra.c
+++ b/src/libsystemd-network/test-ndisc-ra.c
@@ -193,15 +193,15 @@ TEST(radv) {
assert_se(sd_radv_set_rdnss(NULL, 0, NULL, 0) < 0);
assert_se(sd_radv_set_rdnss(ra, 0, NULL, 0) >= 0);
assert_se(sd_radv_set_rdnss(ra, 0, NULL, 128) < 0);
- assert_se(sd_radv_set_rdnss(ra, 600, &test_rdnss, 0) >= 0);
- assert_se(sd_radv_set_rdnss(ra, 600, &test_rdnss, 1) >= 0);
+ assert_se(sd_radv_set_rdnss(ra, 600 * USEC_PER_SEC, &test_rdnss, 0) >= 0);
+ assert_se(sd_radv_set_rdnss(ra, 600 * USEC_PER_SEC, &test_rdnss, 1) >= 0);
assert_se(sd_radv_set_rdnss(ra, 0, &test_rdnss, 1) >= 0);
assert_se(sd_radv_set_rdnss(ra, 0, NULL, 0) >= 0);
assert_se(sd_radv_set_dnssl(ra, 0, NULL) >= 0);
- assert_se(sd_radv_set_dnssl(ra, 600, NULL) >= 0);
+ assert_se(sd_radv_set_dnssl(ra, 600 * USEC_PER_SEC, NULL) >= 0);
assert_se(sd_radv_set_dnssl(ra, 0, (char **)test_dnssl) >= 0);
- assert_se(sd_radv_set_dnssl(ra, 600, (char **)test_dnssl) >= 0);
+ assert_se(sd_radv_set_dnssl(ra, 600 * USEC_PER_SEC, (char **)test_dnssl) >= 0);
ra = sd_radv_unref(ra);
assert_se(!ra);
@@ -273,8 +273,8 @@ TEST(ra) {
assert_se(sd_radv_set_hop_limit(ra, 64) >= 0);
assert_se(sd_radv_set_managed_information(ra, true) >= 0);
assert_se(sd_radv_set_other_information(ra, true) >= 0);
- assert_se(sd_radv_set_rdnss(ra, 60, &test_rdnss, 1) >= 0);
- assert_se(sd_radv_set_dnssl(ra, 60, (char **)test_dnssl) >= 0);
+ assert_se(sd_radv_set_rdnss(ra, 60 * USEC_PER_SEC, &test_rdnss, 1) >= 0);
+ assert_se(sd_radv_set_dnssl(ra, 60 * USEC_PER_SEC, (char **)test_dnssl) >= 0);
for (unsigned i = 0; i < ELEMENTSOF(prefix); i++) {
sd_radv_prefix *p;