diff --git a/test/unit/addrfilt.c b/test/unit/addrfilt.c index 3a21671..b236073 100644 --- a/test/unit/addrfilt.c +++ b/test/unit/addrfilt.c @@ -42,7 +42,7 @@ test_unit(void) TST_GetRandomAddress(&ip, IPADDR_INET6, -1); } - DEBUG_LOG(0, "address %s", UTI_IPToString(&ip)); + DEBUG_LOG("address %s", UTI_IPToString(&ip)); sub = random() % (maxsub + 1); diff --git a/test/unit/clientlog.c b/test/unit/clientlog.c index ee29936..51f3c9d 100644 --- a/test/unit/clientlog.c +++ b/test/unit/clientlog.c @@ -42,14 +42,14 @@ test_unit(void) TEST_CHECK(ARR_GetSize(records) == 16); for (i = 0; i < 500; i++) { - DEBUG_LOG(0, "iteration %d", i); + DEBUG_LOG("iteration %d", i); ts.tv_sec = (time_t)random() & 0x0fffffff; ts.tv_nsec = 0; for (j = 0; j < 1000; j++) { TST_GetRandomAddress(&ip, IPADDR_UNSPEC, i % 8 ? -1 : i / 8 % 9); - DEBUG_LOG(0, "address %s", UTI_IPToString(&ip)); + DEBUG_LOG("address %s", UTI_IPToString(&ip)); if (random() % 2) { index = CLG_LogNTPAccess(&ip, &ts); @@ -65,7 +65,7 @@ test_unit(void) } } - DEBUG_LOG(0, "records %d", ARR_GetSize(records)); + DEBUG_LOG("records %d", ARR_GetSize(records)); TEST_CHECK(ARR_GetSize(records) == 64); for (i = j = 0; i < 10000; i++) { @@ -76,7 +76,7 @@ test_unit(void) j++; } - DEBUG_LOG(0, "requests %u responses %u", i, j); + DEBUG_LOG("requests %u responses %u", i, j); TEST_CHECK(j * 4 < i && j * 6 > i); CLG_Finalise(); diff --git a/test/unit/hwclock.c b/test/unit/hwclock.c index 5b2406a..6f02ce0 100644 --- a/test/unit/hwclock.c +++ b/test/unit/hwclock.c @@ -39,7 +39,7 @@ test_unit(void) UTI_AddDoubleToTimespec(&start_hw_ts, TST_GetRandomDouble(0.0, 1e9), &start_hw_ts); UTI_AddDoubleToTimespec(&start_local_ts, TST_GetRandomDouble(0.0, 1e9), &start_local_ts); - DEBUG_LOG(0, "iteration %d", i); + DEBUG_LOG("iteration %d", i); freq = TST_GetRandomDouble(0.9, 1.1); jitter = TST_GetRandomDouble(10.0e-9, 1000.0e-9); diff --git a/test/unit/keys.c b/test/unit/keys.c index 9743b03..264285f 100644 --- a/test/unit/keys.c +++ b/test/unit/keys.c @@ -98,7 +98,7 @@ test_unit(void) KEY_Initialise(); for (i = 0; i < 100; i++) { - DEBUG_LOG(0, "iteration %d", i); + DEBUG_LOG("iteration %d", i); if (i) { generate_key_file(KEYFILE, keys); diff --git a/test/unit/ntp_core.c b/test/unit/ntp_core.c index 40ca03b..34a0682 100644 --- a/test/unit/ntp_core.c +++ b/test/unit/ntp_core.c @@ -249,7 +249,7 @@ test_unit(void) has_updated = 0; for (j = 0; j < 50; j++) { - DEBUG_LOG(0, "iteration %d, %d", i, j); + DEBUG_LOG("iteration %d, %d", i, j); interleaved = random() % 2; authenticated = random() % 2; diff --git a/test/unit/ntp_sources.c b/test/unit/ntp_sources.c index f55612d..f88d27a 100644 --- a/test/unit/ntp_sources.c +++ b/test/unit/ntp_sources.c @@ -47,7 +47,7 @@ test_unit(void) for (i = 0; i < 6; i++) { TEST_CHECK(ARR_GetSize(records) == 1); - DEBUG_LOG(0, "collision mod %u", 1U << i); + DEBUG_LOG("collision mod %u", 1U << i); for (j = 0; j < sizeof (addrs) / sizeof (addrs[0]); j++) { do { @@ -59,7 +59,7 @@ test_unit(void) if (!j) hash = UTI_IPToHash(&addrs[j].ip_addr); - DEBUG_LOG(0, "adding source %s hash %"PRIu32, UTI_IPToString(&addrs[j].ip_addr), + DEBUG_LOG("adding source %s hash %"PRIu32, UTI_IPToString(&addrs[j].ip_addr), UTI_IPToHash(&addrs[j].ip_addr) % (1U << i)); NSR_AddSource(&addrs[j], random() % 2 ? NTP_SERVER : NTP_PEER, ¶ms); @@ -79,7 +79,7 @@ test_unit(void) } for (j = 0; j < sizeof (addrs) / sizeof (addrs[0]); j++) { - DEBUG_LOG(0, "removing source %s", UTI_IPToString(&addrs[j].ip_addr)); + DEBUG_LOG("removing source %s", UTI_IPToString(&addrs[j].ip_addr)); NSR_RemoveSource(&addrs[j]); for (k = 0; k < sizeof (addrs) / sizeof (addrs[0]); k++) { diff --git a/test/unit/smooth.c b/test/unit/smooth.c index 0cc6a40..772f07e 100644 --- a/test/unit/smooth.c +++ b/test/unit/smooth.c @@ -40,7 +40,7 @@ test_unit(void) UTI_ZeroTimespec(&ts); SMT_Reset(&ts); - DEBUG_LOG(0, "iteration %d", i); + DEBUG_LOG("iteration %d", i); offset = (random() % 1000000 - 500000) / 1.0e6; freq = (random() % 1000000 - 500000) / 1.0e9; diff --git a/test/unit/sources.c b/test/unit/sources.c index 08ee20c..c9f3324 100644 --- a/test/unit/sources.c +++ b/test/unit/sources.c @@ -41,7 +41,7 @@ test_unit(void) REF_SetMode(REF_ModeIgnore); for (i = 0; i < 1000; i++) { - DEBUG_LOG(0, "iteration %d", i); + DEBUG_LOG("iteration %d", i); for (j = 0; j < sizeof (srcs) / sizeof (srcs[0]); j++) { TEST_CHECK(n_sources == j); @@ -51,7 +51,7 @@ test_unit(void) sel_options = i & random() & (SRC_SELECT_NOSELECT | SRC_SELECT_PREFER | SRC_SELECT_TRUST | SRC_SELECT_REQUIRE); - DEBUG_LOG(0, "added source %d options %d", j, sel_options); + DEBUG_LOG("added source %d options %d", j, sel_options); srcs[j] = SRC_CreateNewInstance(UTI_IPToRefid(&addr), SRC_NTP, sel_options, &addr, SRC_DEFAULT_MINSAMPLES, SRC_DEFAULT_MAXSAMPLES); SRC_UpdateReachability(srcs[j], 1); @@ -68,7 +68,7 @@ test_unit(void) delay = TST_GetRandomDouble(1.0e-6, 1.0e-1); disp = TST_GetRandomDouble(1.0e-6, 1.0e-1); - DEBUG_LOG(0, "source %d sample %d offset %f delay %f disp %f", j, k, + DEBUG_LOG("source %d sample %d offset %f delay %f disp %f", j, k, offset, delay, disp); SRC_AccumulateSample(srcs[j], &ts, offset, delay, disp, delay, disp, @@ -81,7 +81,7 @@ test_unit(void) double passed_lo = DBL_MAX, passed_hi = DBL_MIN; SRC_SelectSource(srcs[k]); - DEBUG_LOG(0, "source %d status %d", k, sources[k]->status); + DEBUG_LOG("source %d status %d", k, sources[k]->status); for (l = 0; l <= j; l++) { TEST_CHECK(sources[l]->status > SRC_OK && sources[l]->status <= SRC_SELECTED); @@ -114,7 +114,7 @@ test_unit(void) } } - DEBUG_LOG(0, "sources %d passed %d trusted %d/%d required %d/%d", j, passed, + DEBUG_LOG("sources %d passed %d trusted %d/%d required %d/%d", j, passed, trusted_passed, trusted, required_passed, required); TEST_CHECK(!trusted || !passed || (passed_lo >= trusted_lo && passed_hi <= trusted_hi));