[chrony-dev] [PATCH] test: extend frequency in ntp_adjtime() test |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] [PATCH] test: extend frequency in ntp_adjtime() test
- From: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Date: Mon, 31 Aug 2020 20:09:33 +1200
- Cc: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a1-4; h=Feedback-ID:X-Smtpcorp-Track:Message-Id:Date: Subject:To:From:Reply-To:Sender:List-Unsubscribe; bh=aNh2RLofwQss1FvPzajN7aqCEQuwEWTbYg11yOc0DNM=; b=Vw1/2Tid2DYlSNp8PXIqc1YNFk LHc/15fV+kJr/qsR8EOkRiXDX6GPVY2V+It1d9njMAg1WJrKxgVOu5dRD5YWSWexhdflZwotKiq+R iQqCS8yoSMY+Jhue/SB2O0lIFEaqpyx87Q+2+JNuxQZYp398wsoCuO9on+q5tnjf4+8ee7z0lu/lV YjMR40QMoGHHAhGw+YZOwvcPT35mfYSw4rQQR4KR/fcJTbl1l/8LDozyFV94Exu4JvB/d35t7FOp9 fF+XYjl32whlYN3sHw9fsh6Z+gshcDxfrha+IMtJ15r15eX8sAov3TYIoDyHp3+5/+zdl5O9qzS7t eOgot9Og==;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whatroute.net; i=@whatroute.net; q=dns/txt; s=s149811; t=1598861391; h=from : subject : to : message-id : date; bh=aNh2RLofwQss1FvPzajN7aqCEQuwEWTbYg11yOc0DNM=; b=cWZHfH9IuXTuJR4/9dMNLYPtcHp3yz4HiZXSPQBOOHg7064tX2HAtTSrot7sq3GHhH4HHZ JB5wGh302Edfzl0V/NwJn9oSYmgTTYtYtB7qh5X0hl+Hw7k0NSraHpAGA3DN35n8ppN6TYTF 3P8YwSC6g6caXIIeTvd/gb1BLH54CzGanljJ8jpXavdKb9Sb8OhWybi5xmIzZafN5spfSEV7 iiMvtIQdFu4omriANvxeZbkFXMmWwf/Myj/d12AAcAIwP0ISv2A06QuHFCmEwswdao4PV3EJ yHiItdNifUWQOG6yp2lmmw9OSnxtOZlUugFZ6FOKj4iKXwCMXee1kaLw==
- Feedback-id: 149811m:149811acx33YQ:149811sqHi6AjN3_
Extend the frequency range in the test to cover negative frequencies.
---
test/kernel/ntpadjtime.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/kernel/ntpadjtime.c b/test/kernel/ntpadjtime.c
index d6be154..4af96b4 100644
--- a/test/kernel/ntpadjtime.c
+++ b/test/kernel/ntpadjtime.c
@@ -52,15 +52,15 @@ test_freqrange(void)
printf("freq range:\n");
- for (i = 0; i <= 1000; i += 50) {
+ for (i = -1000; i <= 1000; i += 50) {
t.modes = MOD_FREQUENCY;
- t.freq = i << 16;
+ t.freq = i * (1 << 16);
printf("%4d ppm => ", i);
if (try_ntpadjtime(&t) < 0)
continue;
printf("%4ld ppm : ", t.freq / (1 << 16));
- printf("%s\n", t.freq == i << 16 ? "ok" : "fail");
+ printf("%s\n", t.freq == i * (1 << 16) ? "ok" : "fail");
}
}
--
2.24.3 (Apple Git-128)
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.