Ticket #121 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

t/pmc/eval.t test10 fails on cygwin

Reported by: rurban Owned by: rurban
Priority: normal Milestone: 0.9.0
Component: none Version:
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform: cygwin

Description (last modified by rurban) (diff)

The "eval.get_string - same file" fails on cygwin with Permission denied. It writes twice a temp pbc file, load_bytecode it and remove in the middle.
I guess that load_bytecode leaves a handle open, therefore rm or open > fail with Permission denied.

On unices this will not fail because you can unlink open files, only on windows not. And I believe Windows is right here.

While debugging this test I see:

cd /tmp
ls -al
??????????? ? ? ? ? ? HhY9ocQ3wA.pbc
ls -al *.pbc
ls: cannot access HhY9ocQ3wA.pbc: No such file or directory

Note that cygwin has special code to circumvent unlink on open files, it deferes unlink until process end. And at the end of parrot this file is deleted.

But the problem seems to be bigger, because load_bytecode should not leave a handle open.

Attachments

trac121-t-pmc-eval.patch Download (485 bytes) - added by rurban 6 years ago.
eval_xx.pir Download (1.0 KB) - added by rurban 6 years ago.
This test fails differently: the 2nd load_bytecode fail silently
eval_win_32.patch Download (1.6 KB) - added by chromatic 6 years ago.
Explicitly close the temporary file, so that the OS will really close it.

Change History

Changed 6 years ago by rurban

Changed 6 years ago by rurban

This test fails differently: the 2nd load_bytecode fail silently

Changed 6 years ago by rurban

  • status changed from new to assigned
  • owner set to rurban

Changed 6 years ago by rurban

  • description modified (diff)

Changed 6 years ago by rurban

  • description modified (diff)

Changed 6 years ago by rurban

  • status changed from assigned to closed
  • patch set to applied
  • resolution set to fixed
  • milestone set to 0.9.0

Fixed by r35098 (MSWin32) and r35149 (cygwin)

Changed 6 years ago by chromatic

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 6 years ago by chromatic

TODOing a test is *not* a fix. Please don't close tickets that aren't fixed.

Changed 6 years ago by chromatic

Explicitly close the temporary file, so that the OS will really close it.

Changed 6 years ago by rurban

  • status changed from reopened to closed
  • resolution set to fixed

Really fixed now with r36642.

Changed 6 years ago by allison

Except that you only half applied chromatic's patch, which also fixed the test. Remaining changes (to t/pmc/eval.t) applied in r37425.

Note: See TracTickets for help on using tickets.