Re: [chrony-dev] [PATCH] macOS 11.0 (Big Sur) beta - Bug in implementation of ntp_adjtime() |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] macOS 11.0 (Big Sur) beta - Bug in implementation of ntp_adjtime()
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Mon, 31 Aug 2020 09:01:17 +0200
- Authentication-results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlichvar@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598857283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kxVNlqsJYLNXspLG7RHF4Km0HpI+/7hvk0JY7drmFtk=; b=AF1OLA2IlQZvVMdD4jT830/YbIFbbWhXwJSgw1QmogfPhd/ytS2U6A9kRn86UzRv4KXeR0 yr8R75Gwm1ib+5gCz3Qjd4F1k9xE81xfQdyf+/8HOo9vty30QdS1H/RbQB1Ga3RWwwUZRi oTrVWepPKg4yK+dT//uD4tpi429vKMQ=
On Sun, Aug 30, 2020 at 09:49:22AM +1200, Bryan Christianson wrote:
> macOS 11.0 (Big Sur) beta incorrectly returns timex.freq as an unsigned number. This patch is a workaround for the bug and should be removed when Apple fix the problem (assuming they will). The patch also extends the ntpadjtime test to cover negative frequencies.
> ---
> sys_timex.c | 23 +++++++++++++++++++++--
> test/kernel/ntpadjtime.c | 2 +-
Can you please split it into two patches, e.g. "test: extend
frequency in ntp_adjtime() test", and "sys_timex: add workaround for
broken ntp_adjtime() on macOS"?
> +static inline double
> +txc_freq(const struct timex *txc)
No need for the inline keyword (it's ok to rely on the compiler to
inline automatically when appropriate) and please find a bit more
descriptive name for the function, e.g. "convert_timex_frequency".
Thanks,
--
Miroslav Lichvar
--
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.