-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking Issue for moving UI tests for libstd into unit tests #76268
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Libs-Tracked
Libs issues that are tracked on the team's project board.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Comments
jyn514
added
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
A-testsuite
Area: The testsuite used to check the correctness of rustc
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
labels
Sep 3, 2020
CDirkx
added a commit
to CDirkx/rust
that referenced
this issue
Sep 3, 2020
These tests are about the standard library, not the compiler itself, thus should live in `library`, see rust-lang#76268.
CDirkx
added a commit
to CDirkx/rust
that referenced
this issue
Sep 3, 2020
CDirkx
added a commit
to CDirkx/rust
that referenced
this issue
Sep 3, 2020
CDirkx
added a commit
to CDirkx/rust
that referenced
this issue
Sep 3, 2020
CDirkx
added a commit
to CDirkx/rust
that referenced
this issue
Sep 3, 2020
CDirkx
added a commit
to CDirkx/rust
that referenced
this issue
Sep 3, 2020
CDirkx
added a commit
to CDirkx/rust
that referenced
this issue
Sep 4, 2020
Move: - `src\test\ui\consts\const-nonzero.rs` to `library\core` - `src\test\ui\consts\ascii.rs` to `library\core` - `src\test\ui\consts\cow-is-borrowed` to `library\alloc` Part of rust-lang#76268
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Move some Vec UI tests into alloc unit tests A bit of work towards rust-lang#76268, makes a number of the Vec UI tests that are simply running code into unit tests. Ensured that they are being run when testing liballoc locally.
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Make `Ipv4Addr` and `Ipv6Addr` const tests unit tests under `library` These tests are about the standard library, not the compiler itself, thus should live in `library`, see rust-lang#76268.
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Move various ui const tests to `library` Move: - `src\test\ui\consts\const-nonzero.rs` to `library\core` - `src\test\ui\consts\ascii.rs` to `library\core` - `src\test\ui\consts\cow-is-borrowed` to `library\alloc` Part of rust-lang#76268 r? @matklad
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Move some Vec UI tests into alloc unit tests A bit of work towards rust-lang#76268, makes a number of the Vec UI tests that are simply running code into unit tests. Ensured that they are being run when testing liballoc locally.
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Make `Ipv4Addr` and `Ipv6Addr` const tests unit tests under `library` These tests are about the standard library, not the compiler itself, thus should live in `library`, see rust-lang#76268.
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Move various ui const tests to `library` Move: - `src\test\ui\consts\const-nonzero.rs` to `library\core` - `src\test\ui\consts\ascii.rs` to `library\core` - `src\test\ui\consts\cow-is-borrowed` to `library\alloc` Part of rust-lang#76268 r? @matklad
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Move some Vec UI tests into alloc unit tests A bit of work towards rust-lang#76268, makes a number of the Vec UI tests that are simply running code into unit tests. Ensured that they are being run when testing liballoc locally.
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Make `Ipv4Addr` and `Ipv6Addr` const tests unit tests under `library` These tests are about the standard library, not the compiler itself, thus should live in `library`, see rust-lang#76268.
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Move various ui const tests to `library` Move: - `src\test\ui\consts\const-nonzero.rs` to `library\core` - `src\test\ui\consts\ascii.rs` to `library\core` - `src\test\ui\consts\cow-is-borrowed` to `library\alloc` Part of rust-lang#76268 r? @matklad
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Move some Vec UI tests into alloc unit tests A bit of work towards rust-lang#76268, makes a number of the Vec UI tests that are simply running code into unit tests. Ensured that they are being run when testing liballoc locally.
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Make `Ipv4Addr` and `Ipv6Addr` const tests unit tests under `library` These tests are about the standard library, not the compiler itself, thus should live in `library`, see rust-lang#76268.
matklad
added a commit
to matklad/rust
that referenced
this issue
Sep 4, 2020
Move various ui const tests to `library` Move: - `src\test\ui\consts\const-nonzero.rs` to `library\core` - `src\test\ui\consts\ascii.rs` to `library\core` - `src\test\ui\consts\cow-is-borrowed` to `library\alloc` Part of rust-lang#76268 r? @matklad
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Nov 5, 2020
Move f64::NAN ui tests into `library` This is a partial fix of rust-lang#76268. r? ```@matklad```
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Nov 5, 2020
…brary-core, r=jyn514 Move range in ui test to ops test in library/core Helps with rust-lang#76268 r? ````@matklad````
ayushmishra2005
pushed a commit
to ayushmishra2005/rust
that referenced
this issue
Nov 18, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Nov 24, 2020
Change ui test that are run-pass and that do not test the compiler to library tests Part of rust-lang#76268, these are some of the relevant ui tests I found that can be replaced by library tests. Note: this PR just moves the tests, I have not checked for any overlap between these tests and existing library tests. The only test I changed is `env_home_dir`, where I added code to restore the old home dir after testing. All moved tests: | ui test | library test file | test | | --- | --- | --- | | `const\ascii_ctype.rs` | `core\tests\ascii.rs` | `ascii_ctype_const` | | `const\const-str-ptr.rs` | `alloc\tests\str.rs` | `const_str_ptr` | | `assert-eq-trailing-comma.rs` | `core\tests\macros.rs` | `assert_eq_trailing_comma` | | `assert-escape.rs` | `core\tests\macros.rs` | `assert_escape` | | `assert-ne-trailing-comma.rs` | `core\tests\macros.rs` | `assert_ne_trailing_comma` | | `atomic-access-bool.rs` | `core\tests\atomic.rs` | `atomic_access_bool` | | `atomic-alignment.rs` | `core\tests\atomic.rs` | `atomic_alignment` | | `atomic-compare_exchange.rs` | `core\tests\atomic.rs` | `atomic_compare_exchange` | | ~~`atomic-print.rs`~~ | ~~`std\tests\process.rs`~~ | ~~`atomic_print`~~ | | `bool.rs` | `core\tests\bool.rs` | `test_bool` | | `bool_not.rs` | `core\tests\bool.rs` | `test_bool_not` | | `char_unicode.rs` | `core\tests\unicode.rs` | `version` | | `cmp-default.rs` | `core\tests\cmp.rs` | `cmp_default` | | `deref-mut-on-ref.rs` | `core\tests\ops.rs` | `deref_mut_on_ref` | | `deref-on-ref.rs` | `core\tests\ops.rs` | `deref_on_ref` | | `env-home-dir.rs` | `std\tests\env.rs` | `env_home_dir` | | ~~`env-vars.rs`~~ | ~~`std\tests\env.rs`~~ | ~~`env_vars`~~ | | `extend-for-unit.rs` | `core\tests\iter.rs` | `extend_for_unit` | | `offset_from.rs` | `core\tests\ptr.rs` | `offset_from` | | `option-ext.rs` | `core\tests\option.rs` | `option_ext` | | `result-opt-conversions.rs` | `core\tests\result.rs` | `result_opt_conversions` | | `sleep.rs` | `std\tests\thread.rs` | `sleep` | | ~~`try-wait.rs`~~ | ~~`std\tests\process.rs`~~ | ~~`try_wait`~~ | | `utf8.rs` | `alloc\tests\str.rs` | `utf8` | | `utf8_chars.rs` | `alloc\tests\str.rs` | `utf8_chars` | | `wrapping-int-api.rs` | `core\tests\num\wrapping.rs` | `wrapping_int_api` |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Nov 30, 2020
Change ui test that are run-pass and that do not test the compiler to library tests Part of rust-lang#76268, these are some of the relevant ui tests I found that can be replaced by library tests. Note: this PR just moves the tests, I have not checked for any overlap between these tests and existing library tests. The only test I changed is `env_home_dir`, where I added code to restore the old home dir after testing. All moved tests: | ui test | library test file | test | | --- | --- | --- | | `const\ascii_ctype.rs` | `core\tests\ascii.rs` | `ascii_ctype_const` | | `const\const-str-ptr.rs` | `alloc\tests\str.rs` | `const_str_ptr` | | `assert-eq-trailing-comma.rs` | `core\tests\macros.rs` | `assert_eq_trailing_comma` | | `assert-escape.rs` | `core\tests\macros.rs` | `assert_escape` | | `assert-ne-trailing-comma.rs` | `core\tests\macros.rs` | `assert_ne_trailing_comma` | | `atomic-access-bool.rs` | `core\tests\atomic.rs` | `atomic_access_bool` | | `atomic-alignment.rs` | `core\tests\atomic.rs` | `atomic_alignment` | | `atomic-compare_exchange.rs` | `core\tests\atomic.rs` | `atomic_compare_exchange` | | ~~`atomic-print.rs`~~ | ~~`std\tests\process.rs`~~ | ~~`atomic_print`~~ | | `bool.rs` | `core\tests\bool.rs` | `test_bool` | | `bool_not.rs` | `core\tests\bool.rs` | `test_bool_not` | | `char_unicode.rs` | `core\tests\unicode.rs` | `version` | | `cmp-default.rs` | `core\tests\cmp.rs` | `cmp_default` | | `deref-mut-on-ref.rs` | `core\tests\ops.rs` | `deref_mut_on_ref` | | `deref-on-ref.rs` | `core\tests\ops.rs` | `deref_on_ref` | | `env-home-dir.rs` | `std\tests\env.rs` | `env_home_dir` | | ~~`env-vars.rs`~~ | ~~`std\tests\env.rs`~~ | ~~`env_vars`~~ | | `extend-for-unit.rs` | `core\tests\iter.rs` | `extend_for_unit` | | `offset_from.rs` | `core\tests\ptr.rs` | `offset_from` | | `option-ext.rs` | `core\tests\option.rs` | `option_ext` | | `result-opt-conversions.rs` | `core\tests\result.rs` | `result_opt_conversions` | | `sleep.rs` | `std\tests\thread.rs` | `sleep` | | ~~`try-wait.rs`~~ | ~~`std\tests\process.rs`~~ | ~~`try_wait`~~ | | `utf8.rs` | `alloc\tests\str.rs` | `utf8` | | `utf8_chars.rs` | `alloc\tests\str.rs` | `utf8_chars` | | `wrapping-int-api.rs` | `core\tests\num\wrapping.rs` | `wrapping_int_api` |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Nov 30, 2020
…-core, r=jyn514 Remove const_fn_feature_flags test ## Overview Helps with rust-lang#76268 I found `const_fn_feature_flags` is targeting feature-gate and remove it. r? `@matklad`
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Nov 30, 2020
Move const ip in ui test to unit test Helps with rust-lang#76268 r? `@matklad`
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Dec 1, 2020
Change ui test that are run-pass and that do not test the compiler to library tests Part of rust-lang#76268, these are some of the relevant ui tests I found that can be replaced by library tests. Note: this PR just moves the tests, I have not checked for any overlap between these tests and existing library tests. The only test I changed is `env_home_dir`, where I added code to restore the old home dir after testing. All moved tests: | ui test | library test file | test | | --- | --- | --- | | `const\ascii_ctype.rs` | `core\tests\ascii.rs` | `ascii_ctype_const` | | `const\const-str-ptr.rs` | `alloc\tests\str.rs` | `const_str_ptr` | | `assert-eq-trailing-comma.rs` | `core\tests\macros.rs` | `assert_eq_trailing_comma` | | `assert-escape.rs` | `core\tests\macros.rs` | `assert_escape` | | `assert-ne-trailing-comma.rs` | `core\tests\macros.rs` | `assert_ne_trailing_comma` | | `atomic-access-bool.rs` | `core\tests\atomic.rs` | `atomic_access_bool` | | `atomic-alignment.rs` | `core\tests\atomic.rs` | `atomic_alignment` | | `atomic-compare_exchange.rs` | `core\tests\atomic.rs` | `atomic_compare_exchange` | | ~~`atomic-print.rs`~~ | ~~`std\tests\process.rs`~~ | ~~`atomic_print`~~ | | `bool.rs` | `core\tests\bool.rs` | `test_bool` | | `bool_not.rs` | `core\tests\bool.rs` | `test_bool_not` | | `char_unicode.rs` | `core\tests\unicode.rs` | `version` | | `cmp-default.rs` | `core\tests\cmp.rs` | `cmp_default` | | `deref-mut-on-ref.rs` | `core\tests\ops.rs` | `deref_mut_on_ref` | | `deref-on-ref.rs` | `core\tests\ops.rs` | `deref_on_ref` | | `env-home-dir.rs` | `std\tests\env.rs` | `env_home_dir` | | ~~`env-vars.rs`~~ | ~~`std\tests\env.rs`~~ | ~~`env_vars`~~ | | `extend-for-unit.rs` | `core\tests\iter.rs` | `extend_for_unit` | | `offset_from.rs` | `core\tests\ptr.rs` | `offset_from` | | `option-ext.rs` | `core\tests\option.rs` | `option_ext` | | `result-opt-conversions.rs` | `core\tests\result.rs` | `result_opt_conversions` | | `sleep.rs` | `std\tests\thread.rs` | `sleep` | | ~~`try-wait.rs`~~ | ~~`std\tests\process.rs`~~ | ~~`try_wait`~~ | | `utf8.rs` | `alloc\tests\str.rs` | `utf8` | | `utf8_chars.rs` | `alloc\tests\str.rs` | `utf8_chars` | | `wrapping-int-api.rs` | `core\tests\num\wrapping.rs` | `wrapping_int_api` |
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Dec 1, 2020
…-core, r=jyn514 Remove const_fn_feature_flags test ## Overview Helps with rust-lang#76268 I found `const_fn_feature_flags` is targeting feature-gate and remove it. r? `@matklad`
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Dec 1, 2020
Move const ip in ui test to unit test Helps with rust-lang#76268 r? `@matklad`
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Dec 1, 2020
Change ui test that are run-pass and that do not test the compiler to library tests Part of rust-lang#76268, these are some of the relevant ui tests I found that can be replaced by library tests. Note: this PR just moves the tests, I have not checked for any overlap between these tests and existing library tests. The only test I changed is `env_home_dir`, where I added code to restore the old home dir after testing. All moved tests: | ui test | library test file | test | | --- | --- | --- | | `const\ascii_ctype.rs` | `core\tests\ascii.rs` | `ascii_ctype_const` | | `const\const-str-ptr.rs` | `alloc\tests\str.rs` | `const_str_ptr` | | `assert-eq-trailing-comma.rs` | `core\tests\macros.rs` | `assert_eq_trailing_comma` | | `assert-escape.rs` | `core\tests\macros.rs` | `assert_escape` | | `assert-ne-trailing-comma.rs` | `core\tests\macros.rs` | `assert_ne_trailing_comma` | | `atomic-access-bool.rs` | `core\tests\atomic.rs` | `atomic_access_bool` | | `atomic-alignment.rs` | `core\tests\atomic.rs` | `atomic_alignment` | | `atomic-compare_exchange.rs` | `core\tests\atomic.rs` | `atomic_compare_exchange` | | ~~`atomic-print.rs`~~ | ~~`std\tests\process.rs`~~ | ~~`atomic_print`~~ | | `bool.rs` | `core\tests\bool.rs` | `test_bool` | | `bool_not.rs` | `core\tests\bool.rs` | `test_bool_not` | | `char_unicode.rs` | `core\tests\unicode.rs` | `version` | | `cmp-default.rs` | `core\tests\cmp.rs` | `cmp_default` | | `deref-mut-on-ref.rs` | `core\tests\ops.rs` | `deref_mut_on_ref` | | `deref-on-ref.rs` | `core\tests\ops.rs` | `deref_on_ref` | | `env-home-dir.rs` | `std\tests\env.rs` | `env_home_dir` | | ~~`env-vars.rs`~~ | ~~`std\tests\env.rs`~~ | ~~`env_vars`~~ | | `extend-for-unit.rs` | `core\tests\iter.rs` | `extend_for_unit` | | `offset_from.rs` | `core\tests\ptr.rs` | `offset_from` | | `option-ext.rs` | `core\tests\option.rs` | `option_ext` | | `result-opt-conversions.rs` | `core\tests\result.rs` | `result_opt_conversions` | | `sleep.rs` | `std\tests\thread.rs` | `sleep` | | ~~`try-wait.rs`~~ | ~~`std\tests\process.rs`~~ | ~~`try_wait`~~ | | `utf8.rs` | `alloc\tests\str.rs` | `utf8` | | `utf8_chars.rs` | `alloc\tests\str.rs` | `utf8_chars` | | `wrapping-int-api.rs` | `core\tests\num\wrapping.rs` | `wrapping_int_api` |
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Dec 1, 2020
…-core, r=jyn514 Remove const_fn_feature_flags test ## Overview Helps with rust-lang#76268 I found `const_fn_feature_flags` is targeting feature-gate and remove it. r? ``@matklad``
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Dec 1, 2020
Move const ip in ui test to unit test Helps with rust-lang#76268 r? ``@matklad``
Sounds good to me! |
Thank you everyone who helped fix this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Libs-Tracked
Libs issues that are tracked on the team's project board.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
This is a tracking issue for switching UI tests in
src/test/ui
which only test the standard library into unit tests.Rationale
This will:
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also uses as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Mentoring instructions (or rather, suggested workflow for contributors)
Please first leave a comment here stating that you want to work on file xxx.rs or module xxx, to make sure that this implements
Sync
.src/test/ui
that has both// run-pass
and a use of the standard library. The test also cannot use//~ WARN
or any other error annotations, since that is not supported by#[test]
. For more information about annotations see https://rustc-dev-guide.rust-lang.org/tests/adding.html#header_commands; if there is an annotation on the test that can't be replicated with#[test]
or#[cfg(...)]
, feel free to skip it.library/
. Add a#[test]
annotation so it will be run byx.py test library/std
. Make sure that it is actually being run - you can be sure by runningx.py test --stage 0 library/std --test-args name_of_the_new_test
and seeing at least one test run.If it is unclear whether
run-pass
exercises standard library or a particular facet of the compiler, you can look at the PR/commit that introduced the test. If it was introduced together with the stdlib API it exercises, then it definitely belongs tolibrary/
. If the test would still work with#![no_core]
, it's testing the compiler and not the standard library, and shouldn't be moved.Implementation history
For other candidates, see, for example, the tests in https://github.com/rust-lang/rust/blob/master/src/test/ui/consts/std/net/ipv6.rs.
Mentoring instructions for reviewers
I highly recommend
git show -w --reverse --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change <base>..
, where<base>
isgit merge-base origin/master <tip commit>
and<tip commit>
is the head of the branch.@matklad has volunteered to review PRs implementing this. Add
r? @matklad
to the PR description to automatically assign review to them.The text was updated successfully, but these errors were encountered: