Commit Graph

32 Commits

Author SHA1 Message Date
roblabla
4971e997e5 Fix switch_stdout_to on Windows7
The switch_stdout_to test was broken on Windows7, as the test
infrastructure would refuse to delete the temporary test folder because
the switch-stdout-output file we redirected the stdout to was still
opened.

To fix this issue, we make switch_stdout_to return the previous handle,
and add a new switch_stdout_to call at the end of the test to return the
stdio handles to their original state. The handle the second
switch_stdout_to returns will be automatically closed, which should
allow the temporary test folder to be deleted properly.
2023-10-31 09:50:07 +01:00
ShE3py
f8a2f31ae4
Add data race test to std::env::{get, set} 2023-08-20 21:50:45 +02:00
Matthias Krüger
68dc159241
Rollup merge of #114172 - fortanix:raoul/fix_process-spawning_test, r=workingjubilee
Fix issue_15149 test for the SGX target

PR https://github.com/rust-lang/rust/pull/112390 moved tests to std. Unfortunately, this caused the `issue_15149` test to be enabled for the SGX target. This is incorrect as the SGX target does not support the `env::current_exe()` call.
2023-07-29 06:13:07 +02:00
Raoul Strackx
8548689af2 Fix issue_15149 test for the SGX target 2023-07-28 14:48:06 +02:00
Raoul Strackx
9454916c84 Fix switch-stdout test for none unix/windows platforms 2023-07-28 13:54:07 +02:00
MoskalykA
48e7f3e313 Have a better file name than just the issue id 2023-07-26 15:07:57 +02:00
MoskalykA
4227c0a406 Make Unix or Windows mandatory for the switch-stdout.rs test 2023-06-07 21:51:57 +02:00
MoskalykA
2f093c67ea Move two tests from tests/ui/std to library/std/tests 2023-06-07 18:40:25 +02:00
Michael Howell
b537c1f175 std: mark common functions in test crate pub(crate)
This is not a library, so there's no reason for them to be `pub`.
Without doing this, compiling the test crates causes private dep
lint errors:

      error: type `PathBuf` from private dependency 'std' in public interface
        --> library/std/tests/common/mod.rs:26:5
         |
      26 |     pub fn join(&self, path: &str) -> PathBuf {
         |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = note: `-D exported-private-dependencies` implied by `-D warnings`

      error: type `Path` from private dependency 'std' in public interface
        --> library/std/tests/common/mod.rs:31:5
         |
      31 |     pub fn path(&self) -> &Path {
         |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

      error: could not compile `std` (test "create_dir_all_bare") due to 2 previous errors

This happens because Cargo passes `--extern 'priv:std=...` when
compiling the test crate.

I'm not sure if these warnings are desirable or not. They seem correct
in a very pedantic way (the dependency on `std` is not marked public,
since it's implicit), but also pointless (the test crate is not an API,
so who cares what it does).
2023-05-25 08:15:04 -07:00
Michael Howell
64025bb168 bootstrap: enable Cargo public-dependency feature for libstd 2023-05-25 08:13:23 -07:00
Kisaragi Marine
a4014f08a7
std: remove test for arm's crypto feature
please see https://github.com/rust-lang/rust/pull/110285#issuecomment-1521201953 for more details
2023-05-08 19:09:12 +09:00
Chris Denton
0f221cc034
Exclude SGX from create_dir_all_bare test
And emscripten too.
2023-02-21 18:33:20 +00:00
Chris Denton
9b18b4440a
Make create_dir_all_bare an std integration test
Moving `create_dir_all` out of `ui-fulldeps` is complicated by the fact it sets the current directory. This means it can't be a unit test. Instead, move it to its own integration test.
2023-02-21 18:33:19 +00:00
Yuki Okushi
4b4aeae359
Rollup merge of #105784 - yanns:update_stdarch, r=Amanieu
update stdarch

This will allow using miri on simd instructions
https://github.com/rust-lang/stdarch/issues/1347#issuecomment-1353664361
2023-01-27 12:57:53 +09:00
Yann Simon
2e8162a0b0 fix alphabetical sort 2023-01-26 11:09:32 +01:00
Yann Simon
a499862948 remove avx512 prefix for gfni, vaes and vpclmulqdq 2023-01-26 11:01:44 +01:00
Thom Chiovoloni
a4bf36e87b
Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00
jonathanCogan
72067c77bd Replace libstd, libcore, liballoc in docs. 2022-12-30 14:00:40 +01:00
Lukas Markeffsky
fdf6cc34b2 delete more cfg(bootstrap) 2022-12-28 09:18:43 -05:00
nils
b00cb04037
Sort target features alphabetically 2022-10-14 22:01:18 +02:00
Jubilee Young
b807d5970b Fold aarch64 feature +fp into +neon
Arm's FEAT_FP and Feat_AdvSIMD describe the same thing on AArch64:
The Neon unit, which handles both floating point and SIMD instructions.
Moreover, a configuration for AArch64 must include both or neither.
Arm says "entirely proprietary" toolchains may omit floating point:
https://developer.arm.com/documentation/102374/0101/Data-processing---floating-point
In the Programmer's Guide for Armv8-A, Arm says AArch64 can have
both FP and Neon or neither in custom implementations:
https://developer.arm.com/documentation/den0024/a/AArch64-Floating-point-and-NEON

In "Bare metal boot code for Armv8-A", enabling Neon and FP
is just disabling the same trap flag:
https://developer.arm.com/documentation/dai0527/a

In an unlikely future where "Neon and FP" become unrelated,
we can add "[+-]fp" as its own feature flag.
Until then, we can simplify programming with Rust on AArch64 by
folding both into "[+-]neon", which is valid as it supersets both.

"[+-]neon" is retained for niche uses such as firmware, kernels,
"I just hate floats", and so on.
2022-03-22 15:14:33 -07:00
Adam Gemmell
102a0ffd37 Move is_aarch64_feature_detected! to simd_aarch64 feature and stabilise 2022-02-10 15:24:13 +00:00
Amanieu d'Antras
2188c551cd Move unstable is_{arch}_feature_detected! macros to std::arch 2022-01-28 09:51:46 +00:00
Adam Gemmell
e817b50541 Update aarch64 runtime feature detection tests 2021-08-03 12:07:56 +00:00
Adam Gemmell
d3737a6607 Remove test for crypto feature ahead of its removal 2021-05-19 16:13:52 +01:00
Jethro Beekman
9703bb8192 Fix SGX CI, take 3
Broken in #79038
2020-12-07 15:22:34 +01:00
Jethro Beekman
b787d723fc Fix SGX CI
Broken in #79038
2020-12-01 18:15:00 +01:00
Christiaan Dirkx
be554c4101 Make ui test that are run-pass and do not test the compiler itself library tests 2020-11-30 02:47:32 +01:00
DevJPM
3daa93f555 Updated documentation, x86 feature detection testing, and removed LLVM 9 exclusive features
Updated the added documentation in llvm_util.rs to note which copies of LLVM need to be inspected.
Removed avx512bf16 and avx512vp2intersect because they are unsupported before LLVM 9 with the build with external LLVM 8 being supported
Re-introduced detection testing previously removed for un-requestable features tsc and mmx
2020-10-26 08:36:14 +01:00
DevJPM
cd95e939bb Removed movbe from run-time-detect
`movbe` seems to not be a run-time detectable feature on x86.
It has thus been removed from the list.
It was only commented out to ease comparison against the full list.
2020-10-25 17:27:22 +01:00
DevJPM
9feb567399 Updated the list of white-listed target features for x86
This PR both adds in-source documentation on what to look out for
when adding a new (X86) feature set and adds all that are detectable at run-time in Rust stable
as of 1.27.0.

This should only enable the use of the corresponding LLVM intrinsics.
Actual intrinsics need to be added separately in rust-lang/stdarch.

It also re-orders the run-time-detect test statements to be more consistent
with the actual list of intrinsics whitelisted and removes underscores not present
in the actual names (which might be mistaken as being part of the name)
2020-10-25 17:06:40 +01:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00