-
Notifications
You must be signed in to change notification settings - Fork 13.3k
SGX target: fix std unit tests #59136
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @KodrAus (rust_highfive has picked a reviewer for you, use r? to override) |
These tests currently fail:
I'm still investigating whether this is a bug in the SGX sys implemenation, or a bug in the tests. The cause is that the SGX |
3c387cb
to
33b41b7
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
33b41b7
to
8bdb2eb
Compare
These last two tests are addressed in #59147 |
☔ The latest upstream changes (presumably #59226) made this pull request unmergeable. Please resolve the merge conflicts. |
8bdb2eb
to
32bcff1
Compare
@@ -3801,7 +3801,7 @@ mod tests { | |||
}); | |||
); | |||
|
|||
if cfg!(unix) { | |||
if cfg!(unix) || cfg!(all(target_env = "sgx", target_vendor = "fortanix")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me all other places check target_env, but only in this file target_vendor too is checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other places where target_vendor
is used already, like https://github.com/rust-lang/rust/blob/master/src/libstd/sys_common/mod.rs#L54
I choose all(target_vendor = "fortanix", target_env = "sgx")
or target_env = "sgx"
on a best-effort basis depending on the particular functionality. However, since there are no upstream targets that are all(not(target_vendor = "fortanix"), target_env = "sgx")
, I can't really say with certainty that the conditions are correct everywhere.
@bors r+ |
📌 Commit 32bcff1 has been approved by |
SGX target: fix std unit tests This fixes some tests and some code in the SGX sys implementation to make the `std` unit test suite pass. rust-lang#59009 must be merged first.
⌛ Testing commit 32bcff1 with merge 73daa8197fb59d29fe452cef646f82aa2d94d6b3... |
💔 Test failed - status-appveyor |
Testing std stage1 (i686-pc-windows-msvc -> i686-pc-windows-msvc)
Compiling std v0.0.0 (C:\projects\rust\src\libstd)
[RUSTC-TIMING] run_time_detect test:true 1.188
[RUSTC-TIMING] env test:true 1.890
error[E0433]: failed to resolve: use of undeclared type or module `os`
--> src\libstd\net\tcp.rs:1575:36
|
1575 | fn render_inner(addr: &dyn os::windows::io::AsRawSocket) -> impl fmt::Debug {
| ^^ use of undeclared type or module `os`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`. |
32bcff1
to
f229422
Compare
Fixed |
@bors r+ |
📌 Commit f229422 has been approved by |
SGX target: fix std unit tests This fixes some tests and some code in the SGX sys implementation to make the `std` unit test suite pass. #59009 must be merged first.
☀️ Test successful - checks-travis, status-appveyor |
This fixes some tests and some code in the SGX sys implementation to make the
std
unit test suite pass.#59009 must be merged first.