public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Testsuite adjustment and relevant fix
@ 2023-07-19 12:41 Jon Turney
  2023-07-19 12:41 ` [PATCH 1/2] Cygwin: testsuite: Drop setting TDIRECTORY Jon Turney
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jon Turney @ 2023-07-19 12:41 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon Turney

[1/2] has the side effect of flipping test stat06 from working to failing.
[2/2] fixes that

When run with TDIRECTORY set, libltp just uses that directory and assumes
something else will clean it up.

When TDIRECTORY is not set, libltp creates a subdirectory under /tmp, and when
the test is completed, removes the expected files and verifies that the
directory is empty.

stat06 fails that check, because it creates the a file named "file" there, and
tries stat("file", -1), testing that it returns the expected value EFAULT.

"file" is removed, but lingers in the STATUS_DELETE_PENDING state until the
Windows handle which stat_worker() leaks when an exception occurs is closed
(when the processes exits).

Future work: It looks like similar problems might generically occur in similar
code througout syscalls.cc.

Jon Turney (2):
  Cygwin: testsuite: Drop setting TDIRECTORY
  Cygwin: Fix Windows file handle leak in stat("file", -1)

 winsup/cygwin/syscalls.cc              | 6 +++---
 winsup/testsuite/Makefile.am           | 8 --------
 winsup/testsuite/cygrun.c              | 5 +----
 winsup/testsuite/winsup.api/winsup.exp | 4 +---
 4 files changed, 5 insertions(+), 18 deletions(-)

-- 
2.39.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-21 12:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19 12:41 [PATCH 0/2] Testsuite adjustment and relevant fix Jon Turney
2023-07-19 12:41 ` [PATCH 1/2] Cygwin: testsuite: Drop setting TDIRECTORY Jon Turney
2023-07-19 12:41 ` [PATCH 2/2] Cygwin: Fix Windows file handle leak in stat("file", -1) Jon Turney
2023-07-19 15:33 ` [PATCH 0/2] Testsuite adjustment and relevant fix Corinna Vinschen
2023-07-20 12:55   ` Jon Turney
2023-07-20 15:14     ` Corinna Vinschen
2023-07-20 15:17       ` Corinna Vinschen
2023-07-21 12:26       ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).