Skip to content

Commit 9352934

Browse files
committed
tests/kernel/t_time_arith.c: remove tests which don't make much sense
remove tests which use ms and us values as ns because: * they don't make much sense. * their expected results assume a particular implementation.
1 parent 0eda954 commit 9352934

1 file changed

Lines changed: 5 additions & 54 deletions

File tree

tests/kernel/t_time_arith.c

Lines changed: 5 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: t_time_arith.c,v 1.7 2025/10/06 12:05:04 riastradh Exp $ */
1+
/* $NetBSD: t_time_arith.c,v 1.8 2026/03/17 08:10:58 yamt Exp $ */
22

33
/*-
44
* Copyright (c) 2024-2025 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
2727
*/
2828

2929
#include <sys/cdefs.h>
30-
__RCSID("$NetBSD: t_time_arith.c,v 1.7 2025/10/06 12:05:04 riastradh Exp $");
30+
__RCSID("$NetBSD: t_time_arith.c,v 1.8 2026/03/17 08:10:58 yamt Exp $");
3131

3232
#include <sys/timearith.h>
3333

@@ -242,58 +242,6 @@ const struct itimer_transition {
242242
{2,999999999}, {0,0}, 0,
243243
NULL},
244244

245-
/* (2^63 - 1) us */
246-
[32] = {{.it_value = {3,0}, .it_interval = {9223372036854,775807}},
247-
{2,999999999}, {0,0}, 0,
248-
NULL},
249-
/* 2^63 us */
250-
[33] = {{.it_value = {3,0}, .it_interval = {9223372036854,775808}},
251-
{2,999999999}, {0,0}, 0,
252-
NULL},
253-
/* (2^63 + 1) us */
254-
[34] = {{.it_value = {3,0}, .it_interval = {9223372036854,775809}},
255-
{2,999999999}, {0,0}, 0,
256-
NULL},
257-
258-
/* (2^64 - 1) us */
259-
[35] = {{.it_value = {3,0}, .it_interval = {18446744073709,551615}},
260-
{2,999999999}, {0,0}, 0,
261-
NULL},
262-
/* 2^64 us */
263-
[36] = {{.it_value = {3,0}, .it_interval = {18446744073709,551616}},
264-
{2,999999999}, {0,0}, 0,
265-
NULL},
266-
/* (2^64 + 1) us */
267-
[37] = {{.it_value = {3,0}, .it_interval = {18446744073709,551617}},
268-
{2,999999999}, {0,0}, 0,
269-
NULL},
270-
271-
/* (2^63 - 1) ms */
272-
[38] = {{.it_value = {3,0}, .it_interval = {9223372036854775,807}},
273-
{2,999999999}, {0,0}, 0,
274-
NULL},
275-
/* 2^63 ms */
276-
[39] = {{.it_value = {3,0}, .it_interval = {9223372036854775,808}},
277-
{2,999999999}, {0,0}, 0,
278-
NULL},
279-
/* (2^63 + 1) ms */
280-
[40] = {{.it_value = {3,0}, .it_interval = {9223372036854775,809}},
281-
{2,999999999}, {0,0}, 0,
282-
NULL},
283-
284-
/* (2^64 - 1) ms */
285-
[41] = {{.it_value = {3,0}, .it_interval = {18446744073709551,615}},
286-
{2,999999999}, {0,0}, 0,
287-
NULL},
288-
/* 2^64 ms */
289-
[42] = {{.it_value = {3,0}, .it_interval = {18446744073709551,616}},
290-
{2,999999999}, {0,0}, 0,
291-
NULL},
292-
/* (2^64 + 1) ms */
293-
[43] = {{.it_value = {3,0}, .it_interval = {18446744073709551,617}},
294-
{2,999999999}, {0,0}, 0,
295-
NULL},
296-
297245
/* invalid intervals */
298246
[44] = {{.it_value = {3,0}, .it_interval = {-1,0}},
299247
{3,1}, {0,0}, 0, NULL},
@@ -406,6 +354,9 @@ ATF_TC_BODY(itimer_transitions, tc)
406354
volatile bool aborted = true;
407355
volatile bool expect_abort = false;
408356

357+
if (!timespecisset(&it.it_time.it_interval))
358+
continue;
359+
409360
fprintf(stderr, "case %u\n", i);
410361

411362
if (it.it_xfail)

0 commit comments

Comments
 (0)