Re: [chrony-dev] [PATCH v3 5/5] test/unit: add leapdb test

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Thu, Dec 07, 2023 at 01:17:16PM +1100, patrick.oppenlander@xxxxxxxxx wrote:
> diff --git a/test/unit/leapdb.c b/test/unit/leapdb.c

> +struct test_vector {
> +  time_t when;
> +  int tai_offset;
> +  NTP_Leap leap;
> +} tests[] = {
> +  /* From leap-seconds.list */
> +  {2272060800, 10, LEAP_Normal}, // 1 Jan 1972

Please use the classic C comment syntax /* */.

> +void
> +test_unit(void)
> +{
> +  char conf[][100] = {
> +    "leapsectz right/UTC",
> +    "leapseclist /usr/share/zoneinfo/leap-seconds.list"
> +  };

The test should not fail on non-glibc systems and when the list file is
missing. It should skip instead. 

-- 
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.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/