Skip to content
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

Core dump file remains on disk after running t/08_core.t on FreeBSD #40

Open
jkeenan opened this issue Apr 22, 2022 · 1 comment
Open

Comments

@jkeenan
Copy link
Collaborator

jkeenan commented Apr 22, 2022

In the course of working on #39, I had occasion to install CPAN module BSD::Resource on the machines on which I had previously worked on IPC-System-Simple. Once I did so, test program t/08_core.t was no longer skipped. When it ran, it PASSed on both Linux and FreeBSD. However, on FreeBSD running that file deposited a core dump file in t/perl.core; no such core dump remained after running the test on Linux.

This was surprising. I peeked into t/08_core.t and saw this code:

# Core dumps on OS X are complicated. See GH #5.

BEGIN {
    if ($^O eq 'darwin') {
        plan skip_all => "Coredump tests skipped under OS X/Darwin";
    }
}

So at some point in the past, it was seen fit to skip the core tests on Darwin. (I don't currently have a working Mac.) Was this because t/perl.core was not cleaned up, or for some other reason? Should the prohibition against running coredump tests on Darwin be extended to FreeBSD which, in the long distant past, was an ancestor of Darwin? And against other OSes as well?

@pjf, do you have any thoughts about this?

@jkeenan
Copy link
Collaborator Author

jkeenan commented Apr 22, 2022

In the course of working on #39, I had occasion to install CPAN module BSD::Resource on the machines on which I had previously worked on IPC-System-Simple. Once I did so, test program t/08_core.t was no longer skipped. When it ran, it PASSed on both Linux and FreeBSD. However, on FreeBSD running that file deposited a core dump file in t/perl.core; no such core dump remained after running the test on Linux.

This was surprising. I peeked into t/08_core.t and saw this code:

# Core dumps on OS X are complicated. See GH #5.

BEGIN {
    if ($^O eq 'darwin') {
        plan skip_all => "Coredump tests skipped under OS X/Darwin";
    }
}

So at some point in the past, it was seen fit to skip the core tests on Darwin. (I don't currently have a working Mac.) Was this because t/perl.core was not cleaned up, or for some other reason?

I located #5, in which the rationale for skipping t/08_core.t was presented, viz., on Darwin core dumps are deposited in a weird location that the test program would have to jump through hoops to identify.

This logic would clearly not apply on FreeBSD; the core dump occurs exactly where you would expect it to. So the question then becomes: Why is the core dump being "cleaned up" on Linux but not on FreeBSD?

[snip]
@pjf, do you have any thoughts about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant