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
From:
James E Keenan
Date:
April 26, 2018 20:58
Subject:
[perl #133156] dist/PathTools/t/cwd_enoent.t fails to clean up afteritself on certain platforms
Message ID:
rt-4.0.24-12660-1524776295-1912.133156-75-0@perl.org
# 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: https://rt.perl.org/Ticket/Display.html?id=133156 >


On 04/26/2018 03:33 AM, H.Merijn Brand wrote 
(https://www.nntp.perl.org/group/perl.perl5.porters/2018/04/msg250757.html) 
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
    "testdir"

    $ 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About