NetBSD Problem Report #58914

From www@netbsd.org  Wed Dec 18 06:12:08 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 233021A9238
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 18 Dec 2024 06:12:08 +0000 (UTC)
Message-Id: <20241218061207.261051A923A@mollari.NetBSD.org>
Date: Wed, 18 Dec 2024 06:12:07 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: timerfd_settime(2) is missing itimespecfix
X-Send-Pr-Version: www-1.0

>Number:         58914
>Category:       kern
>Synopsis:       timerfd_settime(2) is missing itimespecfix
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 18 06:15:00 +0000 2024
>Last-Modified:  Sun Dec 22 23:20:01 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10
>Organization:
The FixBSD Timerfoundation
>Environment:
>Description:
1. The path from the timerfd_settime(2) syscall to the kernel subroutine itimer_settime(9) is missing an itimespecfix.
2. The kernel subroutine itimer_settime(9) is missing assertions of the invariants implied by itimespecfix.

Both timer_settime(2) and setitimer(2) sanitize their inputs appropriately, with itimespecfix and itimerfix respectively, but timerfd_settime(2) is missing that.
>How-To-Repeat:
run the python3.13.1 test suite
>Fix:
1. Call itimespecfix in do_timerfd_settime just like in dotimer_settime.
2. Add KASSERT(it->it_time.it_interval.tv_sec >= 0), KASSERT(it->it_time.it_interval.tv_nsec >= 0), KASSERT(it->it_time.it_interval.tv_nsec < 1000000000) to itimer_settime.
3. Do all of this last week so it goes out in the 10.1 release we already tagged...

>Audit-Trail:
From: Taylor R Campbell <riastradh@NetBSD.org>
To: Thomas Klausner <wiz@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/58914: timerfd_settime(2) is missing itimespecfix
Date: Wed, 18 Dec 2024 07:23:08 +0000

 This is a multi-part message in MIME format.
 --=_doTlMKKkYbLBtme6fab/51tYZGWhbizH

 Can you please try the attached patch?

 --=_doTlMKKkYbLBtme6fab/51tYZGWhbizH
 Content-Type: text/plain; charset="ISO-8859-1"; name="pr58914-timerfdfix"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="pr58914-timerfdfix.patch"

 # HG changeset patch
 # User Taylor R Campbell <riastradh@NetBSD.org>
 # Date 1734506499 0
 #      Wed Dec 18 07:21:39 2024 +0000
 # Branch trunk
 # Node ID e050d078726dabe394b8accea318c2caf71ef290
 # Parent  fdd2a8b62ce7ef83fb5433dbfd053c271728d8a2
 # EXP-Topic riastradh-pr58914-timerfdfix
 timerfd_settime(2): Sanitize inputs like timer_settime(2).

 PR kern/58914: timerfd_settime(2) is missing itimespecfix

 diff -r fdd2a8b62ce7 -r e050d078726d sys/kern/sys_timerfd.c
 --- a/sys/kern/sys_timerfd.c	Tue Dec 17 12:44:33 2024 +0000
 +++ b/sys/kern/sys_timerfd.c	Wed Dec 18 07:21:39 2024 +0000
 @@ -593,12 +593,16 @@ do_timerfd_settime(struct lwp *l, int fd
      const struct itimerspec *new_value, struct itimerspec *old_value,
      register_t *retval)
  {
 +	struct itimerspec value =3D *new_value;
  	file_t *fp;
  	int error;
 =20
  	if (flags & ~(TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET)) {
  		return EINVAL;
  	}
 +	if ((error =3D itimespecfix(&value.it_value)) !=3D 0 ||
 +	    (error =3D itimespecfix(&value.it_interval)) !=3D 0)
 +		return error;
 =20
  	if ((fp =3D fd_getfile(fd)) =3D=3D NULL) {
  		return EBADF;
 @@ -618,7 +622,7 @@ do_timerfd_settime(struct lwp *l, int fd
  	if (old_value !=3D NULL) {
  		*old_value =3D it->it_time;
  	}
 -	it->it_time =3D *new_value;
 +	it->it_time =3D value;
 =20
  	/*
  	 * If we've been passed a relative value, convert it to an

 --=_doTlMKKkYbLBtme6fab/51tYZGWhbizH--

From: Thomas Klausner <wiz@NetBSD.org>
To: Taylor R Campbell <riastradh@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/58914: timerfd_settime(2) is missing itimespecfix
Date: Wed, 18 Dec 2024 10:10:49 +0100

 On Wed, Dec 18, 2024 at 07:23:08AM +0000, Taylor R Campbell wrote:
 > Can you please try the attached patch?

 Thank you!  Before this, usually one run of the Python 3.13 test suite
 caused a panic. I've just finished three runs in a row without one.

 There's probably more to do in this corner of the code, since the
 Python self tests fail a lot:

 test_timerfd_TFD_TIMER_ABSTIME (test.test_os.TimerfdTests.test_timerfd_TFD_TIMER_ABSTIME) ... FAIL
 test_timerfd_initval (test.test_os.TimerfdTests.test_timerfd_initval) ... FAIL
 test_timerfd_interval (test.test_os.TimerfdTests.test_timerfd_interval) ... ok
 test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) ...
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-1, interval=0) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-1, interval=0) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-1, interval=0) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=1, interval=-1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=1, interval=-1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=1, interval=-1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-1, interval=-1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-1, interval=-1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-1, interval=-1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-0.1, interval=0) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-0.1, interval=0) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-0.1, interval=0) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=1, interval=-0.1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=1, interval=-0.1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=1, interval=-0.1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-0.1, interval=-0.1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-0.1, interval=-0.1) ... FAIL
   test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-0.1, interval=-0.1) ... FAIL
 test_timerfd_non_blocking (test.test_os.TimerfdTests.test_timerfd_non_blocking) ... ok
 test_timerfd_ns_TFD_TIMER_ABSTIME (test.test_os.TimerfdTests.test_timerfd_ns_TFD_TIMER_ABSTIME) ... FAIL
 test_timerfd_ns_initval (test.test_os.TimerfdTests.test_timerfd_ns_initval) ... FAIL
 test_timerfd_ns_interval (test.test_os.TimerfdTests.test_timerfd_ns_interval) ... ok
 test_timerfd_ns_poll (test.test_os.TimerfdTests.test_timerfd_ns_poll) ... ok
 test_timerfd_ns_select (test.test_os.TimerfdTests.test_timerfd_ns_select) ... FAIL
 test_timerfd_poll (test.test_os.TimerfdTests.test_timerfd_poll) ... ok
 test_timerfd_select (test.test_os.TimerfdTests.test_timerfd_select) ... FAIL


 The code is in Lib/test/test_os.py in the Python sources.


 ======================================================================
 FAIL: test_timerfd_TFD_TIMER_ABSTIME (test.test_os.TimerfdTests.test_timerfd_TFD_TIMER_ABSTIME)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4258, in test_timerfd_TFD_TIMER_ABSTIME
     self.assertAlmostEqual(next_expiration, offset, places=self.CLOCK_RES_PLACES)
     ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 1.009601955 != 1 within 3 places (0.00960195499999994 difference)


 Probably fixable by saying we're like android - comment from the test code:
     # 1 ms accuracy is reliably achievable on every platform except Android
     # emulators, where we allow 10 ms (gh-108277).



 ======================================================================
 FAIL: test_timerfd_initval (test.test_os.TimerfdTests.test_timerfd_initval)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4166, in test_timerfd_initval
     self.assertAlmostEqual(next_expiration, initial_expiration, places=self.CLOCK_RES_PLACES)
     ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 1734508557.9747748 != 0.25 within 3 places (1734508557.7247748 difference)


 Problem with the return value?

 A lot fail because we return ETIMEDOUT instead of EINVAL:

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-1, interval=0)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-1, interval=0)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-1, interval=0)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=1, interval=-1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=1, interval=-1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=1, interval=-1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-1, interval=-1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-1, interval=-1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-1, interval=-1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-0.1, interval=0)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-0.1, interval=0)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-0.1, interval=0)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=1, interval=-0.1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=1, interval=-0.1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=1, interval=-0.1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-0.1, interval=-0.1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-0.1, interval=-0.1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22

 ======================================================================
 FAIL: test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-0.1, interval=-0.1)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4205, in test_timerfd_negative
     self.assertEqual(context.exception.errno, errno.EINVAL)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 60 != 22



 Not sure about the remaining ones:


 ======================================================================
 FAIL: test_timerfd_ns_TFD_TIMER_ABSTIME (test.test_os.TimerfdTests.test_timerfd_ns_TFD_TIMER_ABSTIME)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4421, in test_timerfd_ns_TFD_TIMER_ABSTIME
     self.assertLess(abs(next_expiration_ns - offset_ns),  limit_error)
     ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 1845710 not less than 1000000

 ======================================================================
 FAIL: test_timerfd_ns_initval (test.test_os.TimerfdTests.test_timerfd_ns_initval)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4361, in test_timerfd_ns_initval
     self.assertEqual(interval_ns2, interval_ns)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: 10000000 != 1000000

 ======================================================================
 FAIL: test_timerfd_ns_select (test.test_os.TimerfdTests.test_timerfd_ns_select)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4436, in test_timerfd_ns_select
     self.assertEqual((rfd, wfd, xfd), ([], [], []))
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: Tuples differ: ([], [3], []) != ([], [], [])

 First differing element 1:
 [3]
 []

 - ([], [3], [])
 ?       -

 + ([], [], [])

 ======================================================================
 FAIL: test_timerfd_select (test.test_os.TimerfdTests.test_timerfd_select)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/scratch/lang/python313/work/Python-3.13.1/Lib/test/test_os.py", line 4271, in test_timerfd_select
     self.assertEqual((rfd, wfd, xfd), ([], [], []))
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: Tuples differ: ([], [3], []) != ([], [], [])

 First differing element 1:
 [3]
 []

 - ([], [3], [])
 ?       -

 + ([], [], [])

 ----------------------------------------------------------------------



 Thanks for the patch!
  Thomas

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58914 CVS commit: src/tests/lib/libc/sys
Date: Thu, 19 Dec 2024 20:10:49 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Dec 19 20:10:49 UTC 2024

 Modified Files:
 	src/tests/lib/libc/sys: t_timerfd.c

 Log Message:
 t_timerfd: Sprinkle additional tests of various edge cases.

 PR kern/58914: timerfd_settime(2) is missing itimespecfix


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/sys/t_timerfd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58914 CVS commit: src
Date: Thu, 19 Dec 2024 23:45:40 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Dec 19 23:45:39 UTC 2024

 Modified Files:
 	src/sys/kern: sys_timerfd.c
 	src/tests/lib/libc/sys: t_timerfd.c

 Log Message:
 timerfd_settime(2): Sanitize inputs like timer_settime(2).

 PR kern/58914: timerfd_settime(2) is missing itimespecfix


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 src/sys/kern/sys_timerfd.c
 cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/sys/t_timerfd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58914 CVS commit: src/sys/kern
Date: Sun, 22 Dec 2024 23:16:27 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Sun Dec 22 23:16:27 UTC 2024

 Modified Files:
 	src/sys/kern: kern_time.c

 Log Message:
 itimer_settime(9): Assert input is sane.

 Caller is responsible for validating/sanitizing.

 Prompted by:

 PR kern/58914: timerfd_settime(2) is missing itimespecfix


 To generate a diff of this commit:
 cvs rdiff -u -r1.223 -r1.224 src/sys/kern/kern_time.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.