-
Notifications
You must be signed in to change notification settings - Fork 76
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
want core files from CI test failures #34
Comments
I've been trying to use I've applied this patch:
Here's where I used it:
From this, we can see that it did compile the integration test |
@davepacheco I've found a way to do this, but it aborts the process right after the failed test. I know that sounds like an obvious point, but it means that we'd only get information about the first test that fails. If that's a reasonable solution, then I can put up a PR for this. |
Thanks for looking into this. Personally I do prefer this tradeoff because if there are any failures, whether on the main branch or locally in development, you pretty much want to fix them -- the core file is more useful to me in that context than knowing how many other tests failed. I think this is probably not a popular opinion but I'd like to try it. |
Failing fast is a reasonable tradeoff, I agree. Is the goal here to actually generate the core file? Or is it to debug the process in general, either when it fails or post-mortem? In CI, the core file seems like a great idea, since post-mortem is the only option. But if you're developing locally, there's a way to attach the debugger at the right point without going through the core file. Point LLDB at the actual executable, for example: I'm happy to put up a PR that implements panic-and-dump approach, but I want to make sure it'll solve the right problem. |
Ideally, it would |
Last time I looked at this, I wrote a detailed summary of panics and core files in Rust that's available internal to Oxide. |
After some experimentation, it seems like there's not a great solution here. I've included some relevant notes here, but there's not an obvious path for now. Ideally, we'd like tests that fail to call One option we've explored is using the In theory, the option
which should modify the There are other options, such as writing our own Until a better way forward presents itself, this issue is probably on the back burner. |
Writing this down for my own future self: from my past notes and this testing, I think the closest thing to what I'd want given the pieces available today is to use the |
It would be really helpful if when tests failed as a result of a panic (e.g., assertion failure), we had a core file from the process.
On the Rust side, you didn't use to be able to set
panic = "abort"
in tests (well, you could, but it wouldn't do anything). But it seems that there's an experimental flag "panic-abort-tests". I have not played with this enough to see how it works, or if it works.On the GitHub CI side, it's possible to upload artifacts including core files:
https://docs.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts
The text was updated successfully, but these errors were encountered: