New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
t/spec/S16-io/eof.t is unportably assuming that /proc/1/comm exists #5527
Comments
From @nwc10$ ./perl6-m -Ilib t/spec/S16-io/eof.t # Looks like you planned 2 tests, but ran 1 It's assuming both that process 1 exists, and that /proc/1 for it contains a file comm. (I *think* that the assumption about process 1 is bad. Certainly on Solaris with Zones, the init process may not have pid 1. Perl 5 had a failing regression test until we removed the assumption that process 1 exists. I don't know if every Linux virtualisation system ensures that PID 1 exists. It would be safer to test the /proc entry for the current process ID) On this CentOS system there is a process 1, and its directory in /proc but it doesn't have a comm: $ ls /proc/1/ I don't know what file would be safer. Maybe mem? Nicholas Clark |
From @geekosaurOn Wed, Aug 3, 2016 at 3:12 PM, Nicholas Clark <perl6-bugs-followup@perl.org
None of them. There's no guarantee that /proc exists (non-SVR4 commercial -- |
The RT System itself - Status changed from 'new' to 'open' |
From @nwc10On Wed, Aug 03, 2016 at 03:15:49PM -0400, Brandon Allbery wrote:
Sorry, wasn't clear (and *I* definitely confused things by mentioning Solaris my $procfile = '/proc/1/comm'; ... but it seems that it's not portable between different Linux variants. I was mentioning Zones in the context of "we discovered that it's not actually Your comments about /proc generally are useful for us all to keep in mind. Nicholas Clark |
From cuong.manhle.vn@gmail.comHi, I'm the one who add this test. First of all, this test only run on Linux, so we're safe to assume that The second, `/proc/<pid>/comm` is only available since Linux 2.6.33. I Thanks. Cuong Manh Le |
From cuong.manhle.vn@gmail.comHi, I create a PR to fix this issue: Raku/roast#159 The test now picks the first readable file under `/proc/1`. Thanks. Cuong Manh Le |
From @smlsThe PR was merged long ago. Closing the ticket. |
@smls - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128831 (status was 'resolved')
Searchable as RT128831$
The text was updated successfully, but these errors were encountered: