Skip to content

Enhance CI script to check for core file generation and improve logging in corefile extraction process. #2571

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

Closed

Conversation

chaitanyarahalkar
Copy link

This pull request enhances the core file testing in the CI workflow to properly validate that pwntools can handle core dumps. It addresses two key issues:

  • CI Test Improvement: The original test would run regardless of whether a core file was actually generated. The updated test now fails explicitly if no core file is found in any of the expected locations. This ensures that the CI properly validates the core file handling functionality.
  • Better Debugging: Added more detailed logging to the systemd_coredump_corefile method in corefile.py to provide better diagnostics when core file extraction fails. This will make it easier to troubleshoot issues with core file handling in different environments.
    These changes will help ensure that the core file handling functionality in pwntools (including the systemd-coredump support added in PR Add support for coredumps which are stored using systemd-coredump #1181) works correctly and is properly tested in the CI pipeline.

Target Branch

  • Dev

@chaitanyarahalkar
Copy link
Author

I guess CI tests would fail in this case? Might need to add an exception to the PR

@peace-maker
Copy link
Member

The manual list of locations checked in CI doesn't include the systemd one. It's weird to duplicate the location logic in the shell snippet in CI and the python code. Maybe it's better to run the corefilefinder instead? Don't we test similar things in the doctests?

@Arusekk Arusekk linked an issue Apr 2, 2025 that may be closed by this pull request
@peace-maker
Copy link
Member

The doctests in the Corefile class test finding the corefile in the CI runner already, so the step in the ci.yml appears to be left over debugging code for when it didn't work? Maybe the ulimit -c unlimited is still required for the tests later, but it isn't critical for this step to fail early. Sorry for wasting your time, but after looking at the situation, I don't think any action is required.

@peace-maker peace-maker closed this Jul 4, 2025
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

Successfully merging this pull request may close these issues.

Investigate "Testing Corefiles" section not showing core file in CI
2 participants