Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-17 Thread Corinna Vinschen
On Jul 17 17:41, Corinna Vinschen wrote: > On Jul 17 16:21, Corinna Vinschen wrote: > > On Jul 17 12:51, Jon Turney wrote: > > > On 17/07/2023 12:05, Corinna Vinschen wrote: > > > > diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc > > > > index f614e01c42f6..fceb9bda1806 100644 > > >

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-17 Thread Corinna Vinschen
On Jul 17 16:21, Corinna Vinschen wrote: > On Jul 17 12:51, Jon Turney wrote: > > On 17/07/2023 12:05, Corinna Vinschen wrote: > > > diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc > > > index f614e01c42f6..fceb9bda1806 100644 > > > --- a/winsup/cygwin/thread.cc > > > +++

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-17 Thread Corinna Vinschen
On Jul 17 16:04, Corinna Vinschen wrote: > On Jul 17 12:51, Jon Turney wrote: > > Perhaps there is a better way to write a test that async cancellation works > > in the absence of cancellation points, but it eludes me... > > Same here, so just go ahead. Actually, it's not just that. I think

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-17 Thread Corinna Vinschen
On Jul 17 12:51, Jon Turney wrote: > On 17/07/2023 12:05, Corinna Vinschen wrote: > > On Jul 14 20:57, Corinna Vinschen wrote: > > > What if Cygwin checks for a deferred cancellation in pthread::exit, > > > too? It needs to do this by its own, not calling pthread::testcancel, > > > otherwise

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-17 Thread Corinna Vinschen
On Jul 17 12:51, Jon Turney wrote: > On 14/07/2023 14:04, Jon Turney wrote: > > On 13/07/2023 19:53, Corinna Vinschen wrote: > > > > > > normally after 10 seconds. (See the commentary in pthread::cancel() > > > > > > in > > > > > > thread.cc, where it checks if the target thread is inside the >

Re: [PATCH 00/11] More testsuite fixes

2023-07-17 Thread Corinna Vinschen
Hi Jon, On Jul 17 12:58, Jon Turney wrote: > On 13/07/2023 12:38, Jon Turney wrote: > > > > cancel11: some funkiness I can't work out, causing the save/restoring > > signal handlers around system() to not > > work correctly > > So, the test here: is the SIGINT handle restored correctly if the

Re: [PATCH 00/11] More testsuite fixes

2023-07-17 Thread Jon Turney
On 13/07/2023 12:38, Jon Turney wrote: cancel11: some funkiness I can't work out, causing the save/restoring signal handlers around system() to not work correctly So, the test here: is the SIGINT handle restored correctly if the thread executing system() is cancelled. This test fails,

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-17 Thread Jon Turney
On 17/07/2023 12:05, Corinna Vinschen wrote: On Jul 14 20:57, Corinna Vinschen wrote: On Jul 14 14:04, Jon Turney wrote: On 13/07/2023 19:53, Corinna Vinschen wrote: Nevertheless, I think this is ok to do. The description of pthread_cancel contains this: Asynchronous cancelability means

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-17 Thread Jon Turney
On 14/07/2023 14:04, Jon Turney wrote: On 13/07/2023 19:53, Corinna Vinschen wrote: normally after 10 seconds. (See the commentary in pthread::cancel() in thread.cc, where it checks if the target thread is inside the kernel, and silently converts the cancellation into a deferred one)

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-17 Thread Corinna Vinschen
On Jul 14 20:57, Corinna Vinschen wrote: > On Jul 14 14:04, Jon Turney wrote: > > On 13/07/2023 19:53, Corinna Vinschen wrote: > > > > > Nevertheless, I think this is ok to do. The description of > > > > > pthread_cancel > > > > > contains this: > > > > > > > > > >Asynchronous cancelability