[PATCH] Cygwin: testsuite: test relative path to exe after addchdir.

Jeremy Drake cygwin@jdrake.com
Fri Jun 27 17:00:12 GMT 2025


On Fri, 27 Jun 2025, Corinna Vinschen wrote:

> On Jun 26 13:29, Jeremy Drake via Cygwin-patches wrote:
> > This is apparently relative to the new cwd, but my implementation is
> > currently treating it as relative to the parent's cwd, so it's worth
> > testing.
> >
> > Signed-off-by: Jeremy Drake <cygwin@jdrake.com>
> > ---
> >  winsup/testsuite/winsup.api/posix_spawn/errors.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/winsup/testsuite/winsup.api/posix_spawn/errors.c b/winsup/testsuite/winsup.api/posix_spawn/errors.c
> > index 38563441f3..2fc3217bc0 100644
> > --- a/winsup/testsuite/winsup.api/posix_spawn/errors.c
> > +++ b/winsup/testsuite/winsup.api/posix_spawn/errors.c
> > @@ -15,6 +15,7 @@ void cleanup_tmpfile (void)
> >
> >  int main (void)
> >  {
> > +  posix_spawn_file_actions_t fa;
> >    pid_t pid;
> >    int fd;
> >    char *childargv[] = {"ls", NULL};
> > @@ -53,5 +54,12 @@ int main (void)
> >        posix_spawn (&pid, tmpsub, NULL, NULL, childargv, environ));
> >  #endif
> >
> > +  /* expected ENOENT: relative path after chdir */
> > +  errCode (posix_spawn_file_actions_init (&fa));
> > +  errCode (posix_spawn_file_actions_addchdir_np (&fa, "/tmp"));
>
> _np?  This is POSIX issue 8 now without the trailing _np.
> Cygwin supports that already.

I am also making sure these tests work on Linux (except the new win32
one), and that doesn't seem to have the functions without the _np suffix.


More information about the Cygwin-patches mailing list