[PATCH 01/11] Cygwin: testsuite: Setup test prereqs in 'installation' the tests run in

2023-07-13 Thread Jon Turney
Do some setup in the Cygwin 'installation' at testsuite/testinst/: * Ensure /tmp exists * Use BusyBox to provide executables needed by tests which use system() (sh, sleep, ls) This enables tests which use system(), or require /tmp to exist to pass. --- .github/workflows/cygwin.yml | 3 ++-

[PATCH 00/11] More testsuite fixes

2023-07-13 Thread Jon Turney
This gets us from : FAIL: cygload FAIL: devdsp.c FAIL: ltp/access05.c FAIL: ltp/fcntl07.c FAIL: ltp/symlink01.c FAIL: ltp/symlink03.c FAIL: ltp/umask03.c FAIL: pthread/cancel11.c FAIL: pthread/cancel3.c FAIL: pthread/cancel5.c FAIL: pthread/inherit1.c FAIL: pthread/priority1.c FAIL:

[PATCH 02/11] Cygwin: testsuite: Add a simple timeout mechanism

2023-07-13 Thread Jon Turney
Astonishingly, we don't have this already, so tests which hang just stop the testsuite dead in it's tracks... --- winsup/testsuite/cygrun.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/winsup/testsuite/cygrun.c b/winsup/testsuite/cygrun.c index

[PATCH 03/11] Cygwin: testsuite: Remove const from writable string in fcntl07b

2023-07-13 Thread Jon Turney
--- winsup/testsuite/winsup.api/ltp/fcntl07B.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/testsuite/winsup.api/ltp/fcntl07B.c b/winsup/testsuite/winsup.api/ltp/fcntl07B.c index 4e94ff267..db866fddd 100644 --- a/winsup/testsuite/winsup.api/ltp/fcntl07B.c +++

[PATCH 11/11] Cygwin: testsuite: Drop Adminstrator privileges while running tests

2023-07-13 Thread Jon Turney
Test access05 and symlink03 expect operations to fail which succeed when we have Adminstrator privileges. There's perhaps a bit of incoherency here: some XFAILed tests expect to run as root (so maybe we need the ability to selectively cygdrop?). --- .github/workflows/cygwin.yml | 1 +

[PATCH 10/11] Cygwin: testsuite: Minor fixes to umask03

2023-07-13 Thread Jon Turney
See ltp commits f32691e7, 923b23ff and b846e7bb --- winsup/testsuite/winsup.api/ltp/umask03.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/winsup/testsuite/winsup.api/ltp/umask03.c b/winsup/testsuite/winsup.api/ltp/umask03.c index

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

2023-07-13 Thread Jon Turney
On 13/07/2023 12:39, Jon Turney wrote: These tests async thread cancellation of a thread that doesn't have any cancellation points. Unfortunately, since 450f557f the async cancellation silently fails when the thread is inside the kernel function Sleep(), so it just exits normally after 10

Re: [PATCH] Cygwin: Update release/3.4.8 for latest commit

2023-07-13 Thread Corinna Vinschen
On Jul 12 22:36, Mark Geisert wrote: > --- > winsup/cygwin/release/3.4.8 | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/winsup/cygwin/release/3.4.8 b/winsup/cygwin/release/3.4.8 > index d1e34ce3c..3113be8cb 100644 > --- a/winsup/cygwin/release/3.4.8 > +++

[PATCH 06/11] Cygwin: testsuite: Also check direct call in systemcall

2023-07-13 Thread Jon Turney
Check direct call to system(), as well as one in a subprocess. (This is a lot easier to debug when it's completely broken by the environment the test is running in) --- winsup/testsuite/winsup.api/systemcall.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

[PATCH 07/11] Cygwin: testsuite: Fix for limited thread priority values

2023-07-13 Thread Jon Turney
Since commit 4b51e4c1, we return the actual thread priority, not what we originally stored in the thread attributes. Windows only supports 7 thread priority levels, which we map onto the 32 required by POSIX. So, only a subset of values will be returned exactly by by pthread_getschedparam()

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

2023-07-13 Thread Jon Turney
These tests async thread cancellation of a thread that doesn't have any cancellation points. Unfortunately, since 450f557f the async cancellation silently fails when the thread is inside the kernel function Sleep(), so it just exits normally after 10 seconds. (See the commentary in

[PATCH 04/11] Cygwin: testsuite: Skip devdsp test when no audio devices present

2023-07-13 Thread Jon Turney
--- winsup/testsuite/Makefile.am | 3 +++ winsup/testsuite/winsup.api/devdsp.c | 15 +++ 2 files changed, 18 insertions(+) diff --git a/winsup/testsuite/Makefile.am b/winsup/testsuite/Makefile.am index 11332eda2..60111a0aa 100644 --- a/winsup/testsuite/Makefile.am +++

[PATCH 05/11] Cygwin: testsuite: Just log result of second open of /dev/dsp

2023-07-13 Thread Jon Turney
Do not rate successful second open of /dev/dsp as an error, just log the result. Based on this patch by Gerd Spalink: https://cygwin.com/pipermail/cygwin-patches/2004q3/004848.html --- winsup/testsuite/winsup.api/devdsp.c | 20 ++-- 1 file changed, 6 insertions(+), 14

[PATCH 09/11] Cygwin: testsuite: Fix a buffer overflow in symlink01

2023-07-13 Thread Jon Turney
See ltp commit 44d51c3f --- winsup/testsuite/winsup.api/ltp/symlink01.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/testsuite/winsup.api/ltp/symlink01.c b/winsup/testsuite/winsup.api/ltp/symlink01.c index 54a24b87f..186a85b4e 100644 ---

[PATCH] Cygwin: pthread: Take note of schedparam in pthread_create

2023-07-13 Thread Jon Turney
Take note of schedparam in any pthread_attr_t passed to pthread_create. postcreate() (racily, after the thread is actually created), sets the scheduling priority if it's inherited, but precreate() doesn't store any scheduling priority explicitly set via a non-default attr to create, so

Re: [PATCH] Cygwin: pthread: Take note of schedparam in pthread_create

2023-07-13 Thread Corinna Vinschen
On Jul 13 14:14, Jon Turney wrote: > Take note of schedparam in any pthread_attr_t passed to pthread_create. > > postcreate() (racily, after the thread is actually created), sets the > scheduling priority if it's inherited, but precreate() doesn't store any > scheduling priority explicitly set

Re: [PATCH 00/11] More testsuite fixes

2023-07-13 Thread Corinna Vinschen
On Jul 13 12:38, Jon Turney wrote: > This gets us from : > > FAIL: cygload > FAIL: devdsp.c > FAIL: ltp/access05.c > FAIL: ltp/fcntl07.c > FAIL: ltp/symlink01.c > FAIL: ltp/symlink03.c > FAIL: ltp/umask03.c > FAIL: pthread/cancel11.c > FAIL: pthread/cancel3.c > FAIL: pthread/cancel5.c > FAIL:

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

2023-07-13 Thread Corinna Vinschen
On Jul 13 12:39, Jon Turney wrote: > These tests async thread cancellation of a thread that doesn't have any > cancellation points. > > Unfortunately, since 450f557f the async cancellation silently fails when > the thread is inside the kernel function Sleep(), so it just exits I'm not sure how

Re: [PATCH 09/11] Cygwin: testsuite: Fix a buffer overflow in symlink01

2023-07-13 Thread Corinna Vinschen
On Jul 13 12:39, Jon Turney wrote: > See ltp commit 44d51c3f Can you please add some text which helps the reader to understand the issue without having to refer to the ltp repo? Thanks, Corinna

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

2023-07-13 Thread Corinna Vinschen
On Jul 13 20:16, Corinna Vinschen wrote: > On Jul 13 12:39, Jon Turney wrote: > > These tests async thread cancellation of a thread that doesn't have any > > cancellation points. > > > > Unfortunately, since 450f557f the async cancellation silently fails when > > the thread is inside the kernel

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

2023-07-13 Thread Corinna Vinschen
On Jul 13 20:37, Corinna Vinschen wrote: > On Jul 13 20:16, Corinna Vinschen wrote: > > On Jul 13 12:39, Jon Turney wrote: > > > These tests async thread cancellation of a thread that doesn't have any > > > cancellation points. > > > > > > Unfortunately, since 450f557f the async cancellation

Re: [PATCH 10/11] Cygwin: testsuite: Minor fixes to umask03

2023-07-13 Thread Corinna Vinschen
On Jul 13 12:39, Jon Turney wrote: > See ltp commits f32691e7, 923b23ff and b846e7bb Ditto? Corinna