Skip to content

Move some std tests from tests/ui-fulldeps into library/std #108233

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

Merged
merged 4 commits into from
Feb 25, 2023

Conversation

ChrisDenton
Copy link
Member

@ChrisDenton ChrisDenton commented Feb 19, 2023

This allows them to be tested normally along with other ./x test std tests. Moving rename_directory is simple enough but create_dir_all_bare needed to be an std integration test.

Additionally, some tests that I couldn't move atm have instead been placed in an std subdirectory. These tests include ones that do fun things with processes or that intentionally abort the test process.

r? libs

@ChrisDenton ChrisDenton added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Feb 19, 2023
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 19, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 19, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@ChrisDenton ChrisDenton force-pushed the move-std-tests branch 3 times, most recently from 20ea81b to 87cd7f8 Compare February 19, 2023 12:33
@thomcc
Copy link
Member

thomcc commented Feb 20, 2023

LGTM

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 20, 2023

📌 Commit 87cd7f8 has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 20, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 20, 2023
Move some std tests from `tests/ui-fulldeps` into `library/std`

This allows them to be tested normally along with other `./x test std` tests. Moving `rename_directory` is simple enough but `create_dir_all_bare` needed to be an std integration test.

Additionally, some tests that I couldn't move atm have instead been placed in an `std` subdirectory. These tests include ones that do fun things with processes or that intentionally abort the test process.

r? libs
@ChrisDenton
Copy link
Member Author

ChrisDenton commented Feb 20, 2023

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 20, 2023
@matthiaskrgr
Copy link
Member

@bors rollup=iffy

@ChrisDenton ChrisDenton force-pushed the move-std-tests branch 2 times, most recently from 1d2ae2b to e8d3491 Compare February 20, 2023 13:48
@raoulstrackx
Copy link
Contributor

This PR breaks our CI for the SGX platform as file system support is lacking (see sys/sgx/mod.rs:20-21. Using filesystem functions result in:

13:54:01 test create_dir_all_bare ... FAILED
13:54:01 
13:54:01 failures:
13:54:01 
13:54:01 ---- create_dir_all_bare stdout ----
13:54:01 thread 'create_dir_all_bare' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Unsupported, message: "operation not supported on SGX yet" }', library/std/tests/create_dir_all_bare.rs:14:33
13:54:01 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Can we cancel the merge and avoid running such tests on the SGX platform?

@ChrisDenton
Copy link
Member Author

It's already been cancelled. I'll add an exclusion.

@raoulstrackx
Copy link
Contributor

Great! Much appreciated @ChrisDenton !

@ChrisDenton ChrisDenton added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 21, 2023
@the8472
Copy link
Member

the8472 commented Feb 21, 2023

Additionally, some tests that I couldn't move atm have instead been placed in an std subdirectory. These tests include ones that do fun things with processes or that intentionally abort the test process.

Maybe we could add a [[bin]] to std and calling it from an integration test for those?

std has had a `TempDir` implementation for a long time now.
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.
@ChrisDenton
Copy link
Member Author

Maybe we could add a [[bin]] to std and calling it from an integration test for those?

Maybe. But I'm not really sure how that would work with the build system.

@thomcc
Copy link
Member

thomcc commented Feb 22, 2023

My r+ stands, feel free to r=me when ready.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 22, 2023
@ChrisDenton
Copy link
Member Author

@bors r=thomcc

@bors
Copy link
Collaborator

bors commented Feb 22, 2023

📌 Commit 0f221cc has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 22, 2023
@bors
Copy link
Collaborator

bors commented Feb 22, 2023

⌛ Testing commit 0f221cc with merge a019e3ef6d28f152af34bedd49dd46bdba9ce82f...

@bors
Copy link
Collaborator

bors commented Feb 22, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 22, 2023
@ChrisDenton
Copy link
Member Author

@bors retry error building LLVM on i686-mingw-2

This PR should not affect building LLVM in any way.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 22, 2023
@rust-log-analyzer

This comment was marked as outdated.

@bors
Copy link
Collaborator

bors commented Feb 25, 2023

⌛ Testing commit 0f221cc with merge 26c9868...

@bors
Copy link
Collaborator

bors commented Feb 25, 2023

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing 26c9868 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 25, 2023
@bors bors merged commit 26c9868 into rust-lang:master Feb 25, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 25, 2023
@ChrisDenton ChrisDenton deleted the move-std-tests branch February 25, 2023 13:49
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (26c9868): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.9% [1.8%, 2.0%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.1% [-6.2%, -4.1%] 6
All ❌✅ (primary) - - 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants