Commit Graph

36 Commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
071ad3795c tests: use needs-threads instead of ignore-emscripten 2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
8a0310a0b1 tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
1abb93608f tests: cleanup tests/ui/process/issue-13304.rs
- Remove unnecessary `mut`, remove `#[allow(unused_mut)]`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
0cc392e5fa tests: cleanup tests/ui/process/sigpipe-should-be-ignored.rs
- Unwrap a must-use I/O result and remove `#![allow(unused_must_use)]`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
7eaa6ec8f7 tests: cleanup tests/ui/process/try-wait.rs
- Remove already stable feature gate and remove
  `#![allow(stable_features)]`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
c7c1e4d655 tests: cleanup tests/ui/process/issue-14456.rs
- Remove unnecessary `mut` and remove `#![allow(unused_mut)]`.
- Replace `ignore-*` with `needs-process`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
b617aae20e tests: cleanup tests/ui/process/process-panic-after-fork.rs
- Replace `ignore-windows` with `only-unix`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
a4a3acace6 tests: cleanup tests/ui/process/fds-are-cloexec.rs
- Replace `ignore-windows` with `only-unix`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
635a06b595 tests: cleanup tests/ui/process/process-exit.rs
- Remove unnecessary `#![allow(unused_imports)]`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
02c003b50e tests: cleanup tests/ui/process/issue-20091.rs
- Remove already stable feature gate and remove
  `#![allow(stable_features)]`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
83226094e7 tests: cleanup tests/ui/process/signal-exit-status.rs
- Replace `ignore-windows` -> `only-unix` since the test exercises Unix
  signals and `ExitStatus::code` behavior that's specific to Unix.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
许杰友 Jieyou Xu (Joe)
2632fdc298 tests: cleanup tests/ui/process/core-run-destroy.rs
- Remove redundant `#![allow(stable_features)]`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00
John Kåre Alsaker
4bf85c25ec Try to write the panic message with a single write_all call 2025-01-01 15:58:29 +01:00
Zalathar
835fbcbcab Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
Kornel
eadea7764e
Use c"lit" for CStrings without unwrap 2024-12-02 18:16:36 +00:00
Ralf Jung
c4cab8a15c bless tests for changed library path 2024-11-30 11:22:52 +01:00
Hood Chatham
1d6643c4f6 Fix most ui tests on emscripten target
To fix the linker errors, we need to set the output extension to `.js` instead
of `.wasm`. Setting the output to a `.wasm` file puts Emscripten into standalone
mode which is effectively a distinct target. We need to set the runner to be
`node` as well.

This fixes most of the ui tests. I fixed a few more tests with simple problems:
- `intrinsics/intrinsic-alignment.rs` and `structs-enums/rec-align-u64.rs` --
Two `#[cfg]` macros match for Emscripten so we got a duplicate definition of
`mod m`.
- `issues/issue-12699.rs` -- Seems to hang so I disabled it
- `process/process-sigpipe.rs` -- Not expected to work on Emscripten so I
disabled it
2024-10-15 14:25:55 +02:00
bjorn3
feeeb5c48e Bless tests 2024-08-02 11:34:54 +00:00
Zalathar
9aaa0c5867 Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
Jubilee Young
d89500843c Move 100 entries from tests/ui into subdirs
- Move super-fast-paren-parsing test into ui/parser
- Move stmt_expr_attrs test into ui/feature-gates
- Move macro tests into ui/macros
- Move global_asm tests into ui/asm
- Move env tests into ui/process
- Move xcrate tests into ui/cross-crate
- Move unop tests into ui/unop
- Move backtrace tests into ui/backtrace
- Move check-static tests into ui/statics
- Move expr tests into ui/expr
- Move optimization fuel tests into ui/fuel
- Move ffi attribute tests into ui/ffi-attrs
- Move suggestion tests into ui/suggestions
- Move main tests into ui/fn-main
- Move lint tests into ui/lint
- Move repr tests into ui/repr
- Move intrinsics tests into ui/intrinsics
- Move tool lint tests into ui/tool-attributes
- Move return tests into ui/return
- Move pattern tests into ui/patttern
- Move range tests into ui/range
- Move foreign-fn tests into ui/foreign
- Move orphan-check tests into ui/coherence
- Move inference tests into ui/inference
- Reduce ROOT_ENTRY_LIMIT
2024-05-20 19:55:59 -07:00
Ben Kimock
18b0a07d49 Handle a few more simple tests 2024-05-20 11:13:10 -04:00
Martin Nordholts
cde0cde151 Change SIGPIPE ui from #[unix_sigpipe = "..."] to -Zon-broken-pipe=...
In the stabilization attempt of `#[unix_sigpipe = "sig_dfl"]`, a concern
was raised related to using a language attribute for the feature: Long
term, we want `fn lang_start()` to be definable by any crate, not just
libstd. Having a special language attribute in that case becomes
awkward.

So as a first step towards towards the next stabilization attempt, this
PR changes the `#[unix_sigpipe = "..."]` attribute to a compiler flag
`-Zon-broken-pipe=...` to remove that concern, since now the language
is not "contaminated" by this feature.

Another point was also raised, namely that the ui should not leak
**how** it does things, but rather what the **end effect** is. The new
flag uses the proposed naming. This is of course something that can be
iterated on further before stabilization.
2024-05-02 19:48:29 +02:00
Ben Kimock
7457a0d441 Use the rustc_private libc less in tests 2024-04-15 08:54:11 -04:00
Alex Crichton
cf6d6050f7 Update test directives for wasm32-wasip1
* The WASI targets deal with the `main` symbol a bit differently than
  native so some `codegen` and `assembly` tests have been ignored.
* All `ignore-emscripten` directives have been updated to
  `ignore-wasm32` to be more clear that all wasm targets are ignored and
  it's not just Emscripten.
* Most `ignore-wasm32-bare` directives are now gone.
* Some ignore directives for wasm were switched to `needs-unwind`
  instead.
* Many `ignore-wasm32*` directives are removed as the tests work with
  WASI as opposed to `wasm32-unknown-unknown`.
2024-03-11 09:36:35 -07:00
Caio
2aab000105 Move tests 2024-03-03 16:30:48 -03:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
Matthew Jasper
982b49494e Remove revisions for THIR unsafeck
This is to make the diff when stabilizing it easier to review.
2024-01-05 09:30:27 +00:00
Mara Bos
4017c5c945 Fix tests. 2023-07-29 11:47:26 +02:00
Mara Bos
0e729404da Change default panic handler message format. 2023-07-29 11:42:50 +02:00
Martin Nordholts
075a6bbef9 Regression test println!() panic message on ErrorKind::BrokenPipe
No existing test failed if the [`panic!()`][1] of the `println!()`
family of functions was removed, or if its message was changed.

So add such a test.

[1] 104f4300cf/library/std/src/io/stdio.rs (L1007-L1009)
2023-07-26 13:41:39 +02:00
Urgau
b84c190b9a Allow newly uplifted invalid_from_utf8 lint 2023-05-27 00:18:28 +02:00
jyn
fff8503613
Rollup merge of #109379 - flba-eb:108596_fixtest_sigpipe, r=jyn514
Replace `yes` command by `while-echo` in test `tests/ui/process/process-sigpipe.rs`

The `yes` command is not available on all platforms.

Fixes #108596.

Inviting `@mvf` as he contributed to this patch. Thanks! This issue has been discussed in https://github.com/rust-lang/rust/pull/106673 but was moved to #108596 to get going.

CC `@gh-tr`

r? `@workingjubilee`
`@rustbot` label +O-neutrino

Notes about the comments https://github.com/rust-lang/rust/pull/106673#discussion_r1117324265:
- The `echo` command is `/proc/boot/echo` (not built-in)
- `/bin/sh` is a symlink to `/proc/boot/ksh`
```sh
# ls -l /bin/sh /proc/boot/ksh /proc/boot/echo
lrwxrwxrwx   1 root      root             14 Mar 20 07:52 /bin/sh -> /proc/boot/ksh
-r-xr-xr-x   1 root      root           9390 Sep 12  2022 /proc/boot/echo
-r-xr-xr-x   1 root      root         308114 Sep 12  2022 /proc/boot/ksh
```
2023-04-26 01:55:50 -05:00
Ben Kimock
9f17ede4ac Raise an aborting signal without UB 2023-03-28 21:37:15 -04:00
Florian Bartels
3970793579
Replace yes command by while-echo
The `yes` command is not available on all platforms.
2023-03-20 08:35:17 +01:00
Florian Bartels
3ce2cd059f
Add QNX Neutrino support to libstd
Co-authored-by: gh-tr <troach@qnx.com>
2023-02-28 15:59:47 +01:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00