-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Port rust-lang/backtrace
's cpp_smoke_test
to rust-lang/rust
test suite
#136695
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These should eventually be cleaned up, but let's add a helper for the immediate need of porting the `cpp_smoke_test` test.
This test exercises the `backtrace` submodule included under the `library/` tree, which should be the `backtrace` that is used and thus transitively shipped with the standard library. The `cpp_smoke_test` was disabled in the `backtrace` repo many years ago. This is seemingly because the test failed years ago due to C++ symbol demangling troubles in `cpp_demangle` (which are now fixed; see <gimli-rs/cpp_demangle#73>). Note that this test is disabled on Windows MSVC because I couldn't get it to work locally: - At MSVC `-O1`, the test fails because there are no backtrace symbols. - At MSVC `-O0`, the test fails because both the C++ templated trampolined symbol has a different signature (w/ a `__cdecl`) and also `cpp_trampoline` is missing. Co-authored-by: Pyrode <[email protected]>
Tagging |
@bors try |
In all honesty, maybe smoke this test even over at rust-lang/backtrace lmao |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 7, 2025
Port `rust-lang/backtrace`'s `cpp_smoke_test` to `rust-lang/rust` test suite Ports https://github.com/rust-lang/backtrace-rs/tree/e33eaac8caf46d0d3cc57f8d152529e8b7ae1b78/crates/cpp_smoke_test to the main repo. I can't say I'm 100% convinced by the value of this test living in the main repo for several reasons: 1. This test (or at least the actual `cpp_smoke_test.rs` is **extremely** fragile. It's sensitive to debuginfo levels AND optimizations. On `x86_64-unknown-linux-gnu`, the C++ file **must** be compiled with **exactly** `-O1`. No more, no less, or else the backtrace symbol names do not line up in symbol count or name. 2. I could not get this test to work on Windows MSVC, no matter which combination of debuginfo levels and optimization levels I tried. Note that I have not tried other targets, e.g. Apple friends, which may fail for yet other reasons. Possibly supersedes rust-lang#136182. r? `@ChrisDenton` (or `@workingjubilee)` try-job: x86_64-apple-1 try-job: aarch64-apple
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-backtrace
Area: Backtraces
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
S-experimental
Status: Ongoing experiment that does not require reviewing and won't be merged in its current state.
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ports https://github.com/rust-lang/backtrace-rs/tree/e33eaac8caf46d0d3cc57f8d152529e8b7ae1b78/crates/cpp_smoke_test to the main repo.
I can't say I'm 100% convinced by the value of this test living in the main repo for several reasons:
cpp_smoke_test.rs
is extremely fragile. It's sensitive to debuginfo levels AND optimizations. Onx86_64-unknown-linux-gnu
, the C++ file must be compiled with exactly-O1
. No more, no less, or else the backtrace symbol names do not line up in symbol count or name.backtrace
-the-submodule, and does not actually exercise through thestd::backtrace
interfaces (asstd::backtrace
is missing some key APIs to make this test possible).Note that I have not tried other targets, e.g. Apple friends, which may fail for yet other reasons.
Possibly supersedes #136182.
r? @ChrisDenton (or @workingjubilee)
try-job: x86_64-apple-1
try-job: aarch64-apple