develooper Front page | perl.perl5.porters | Postings from April 2018

[perl #133156] dist/PathTools/t/cwd_enoent.t fails to clean up afteritself on certain platforms

Thread Next
James E Keenan
April 26, 2018 20:58
[perl #133156] dist/PathTools/t/cwd_enoent.t fails to clean up afteritself on certain platforms
Message ID:
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #133156]
# in the subject line of all future correspondence about this issue. 
# <URL: >

On 04/26/2018 03:33 AM, H.Merijn Brand wrote 
to list:

On HP-UX and AIX I see two annoying leftovers on the system after smoke
runs. That does not happen on Linux

1. On /tmp (or $TMPDIR) there are a lot of folders that have a subfolder

    $ cd /tmp
    $ rm -rf ??????????/testdir
    $ rmdir ??????????

2. Shared memory is not cleaned up, causing the resources to run out

    $ ipcs -ma |\
      perl -nE'm/^m\s+(\d+)\s.*merijn\s+[a-z]+\s+0\s/ and say "-m $1"' |\
      xargs ipcrm

In subsequent discussion in that thread and on IRC, we diagnosed the 
problem to dist/PathTools/t/cwd_enoent.t.  This test file ends with a 
chdir into a tempdir created by File::Temp::tempdir(CLEANUP => 1) -- 
unusual, but necessary (as I found out during debugging) to exercise the 
point of the whole test file.  Nonetheless, that "dangling" temporary 
directory is not getting cleaned up upon exit on certain platforms.

Tux proposes the patch attached, which apparently resolves the problems 
on the platforms he's concerned about and does no harm on Linux. 
Available for smoking in branch smoke-me/jkeenan/tux/cwd_enoent.

Since we're in code freeze, I'm posting an RT and requesting permission 
to apply it to blead.

Thank you very much.
Jim Keenan

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About