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

Test back::x86_64::get_target_strs on a 64-bit Windows machine #2398

Closed
catamorphism opened this issue May 17, 2012 · 7 comments
Closed

Test back::x86_64::get_target_strs on a 64-bit Windows machine #2398

catamorphism opened this issue May 17, 2012 · 7 comments
Labels
A-codegen Area: Code generation A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. O-windows Operating system: Windows

Comments

@catamorphism
Copy link
Contributor

The data_layout field in the record that get_target_strs returns has a FIXME that says "Test this, copied from Linux".

@ghost ghost assigned graydon May 17, 2012
@pnkfelix
Copy link
Member

pnkfelix commented May 2, 2013

I do not know much about LLVM, so I was mystified by these strings when I first looked at them.

(Looking at the LLVM source did not help, as the parameter names might make one think that these data layouts are just strings representing triples. Not true.)

But here is the LLVM docs on the format, which I found enlightening: http://llvm.org/docs/LangRef.html#data-layout

(Of course, this does not actually tell us whether we are selecting the right values on Windows, which is the whole point of this bug.)

@pnkfelix
Copy link
Member

pnkfelix commented May 2, 2013

(Also, we do already use llvm::LLVMSetTarget(llmod, buf) to pass in the target triple, which I infer could be sufficient... do we want/need to be maintaining these data layout strings? On all targets? Or should we switch to a model were we only call setDataLayout in specific cases where we determine it is necessary?)

@pnkfelix
Copy link
Member

pnkfelix commented May 2, 2013

(Then again, comments like this make me think that its better to let sleeping dogs lie, in case LLVM does happen to actually use this for optimizations we rely on. I guess I need to do more digging, or trust that the code works and focus just on the goal at hand: Testing windows.)

@emberian
Copy link
Member

Triage bump

@metajack
Copy link
Contributor

triage bump. nothing to add.

@dguenther
Copy link
Contributor

Does this still need a FIXME? I'm not an LLVM expert, but I did a bit of searching and found that the datalayout is the same as what's used in LLVM tests for target triple x86_64-pc-win32 ([1] [2] [3]).

@thestinger
Copy link
Contributor

This works fine and is being tested.

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
[cargo-miri] support nextest

Add the ability to run `cargo miri nextest list` and `cargo miri nextest run`.

[cargo-nextest](https://nexte.st) is a new test runner for Rust maintained mostly by myself. It has several new features, but the most relevant to miri is the fact that it runs [each test in its own process](https://nexte.st/book/how-it-works.html#the-nextest-model). This gives miri users better leak detection (rust-lang/miri#1481) for free, for example.

See nextest-rs/nextest#181 for discussion, including comments by `@eddyb` and `@RalfJung.`

Future work might be to have miri read [the list of tests](https://docs.rs/nextest-metadata/latest/nextest_metadata/struct.TestListSummary.html) (or [test binaries](https://docs.rs/nextest-metadata/latest/nextest_metadata/struct.BinaryListSummary.html)) generated by `nextest list`. `@eddyb` thinks that might be useful.

I tested `cargo miri nextest run` against smallvec, and it worked great.

Note: Running tests out of archives is currently broken, as the comment in run-test.py explains.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

7 participants