惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
D
DataBreaches.Net
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
S
Secure Thoughts
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 最新话题
V2EX - 技术
V2EX - 技术
腾讯CDC
GbyAI
GbyAI
G
Google Developers Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
T
The Exploit Database - CXSecurity.com
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
Schneier on Security
Schneier on Security
Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
Help Net Security
Help Net Security
K
Kaspersky official blog
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
AI
AI
MongoDB | Blog
MongoDB | Blog
Scott Helme
Scott Helme
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
H
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
S
Security Affairs
TaoSecurity Blog
TaoSecurity Blog
The GitHub Blog
The GitHub Blog
Hacker News: Ask HN
Hacker News: Ask HN
Martin Fowler
Martin Fowler
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI

Rust Blog

Security Advisory for Cargo (CVE-2026-5223) | Rust Blog Security Advisory for Cargo (CVE-2026-5222) | Rust Blog Project goals update — April 2026 (end of 2025H2) | Rust Blog Rust is participating in Outreachy | Rust Blog Raising the baseline for the `nvptx64-nvidia-cuda` target | Rust Blog Announcing Google Summer of Code 2026 selected projects | Rust Blog Announcing Rust 1.95.0 | Rust Blog docs.rs: building fewer targets by default | Rust Blog Changes to WebAssembly targets and handling undefined symbols | Rust Blog Announcing Rust 1.94.1 | Rust Blog Security advisory for Cargo | Rust Blog What we heard about Rust's challenges | Rust Blog Call for Testing: Build Dir Layout v2 | Rust Blog Announcing rustup 1.29.0 | Rust Blog Announcing Rust 1.94.0 | Rust Blog 2025 State of Rust Survey Results | Rust Blog Rust debugging survey 2026 | Rust Blog Update on the October 15, 2018 incident on crates.io Announcing Rust 1.29.2 Announcing Rust 1.29 Announcing Rust 1.28 What is Rust 2018? Announcing Rust 1.27.2 Announcing Rust 1.27.1 Security Advisory for rustdoc Announcing Rust 1.27 Announcing Rust 1.26.2 Announcing Rust 1.26.1 Rust turns three Announcing Rust 1.26 The Rust Team All Hands in Berlin: a Recap Increasing Rust’s Reach 2018 Announcing Rust 1.25 Rust's 2018 roadmap Announcing Rust 1.24.1 Announcing Rust 1.24 The 2018 Rust Event Lineup Announcing Rust 1.23 New Year's Rust: A Call for Community Blogposts Rust in 2017: what we achieved Announcing Rust 1.22 (and 1.22.1) Fearless Concurrency in Firefox Quantum Announcing Rust 1.21 impl Future for Rust Rust 2017 Survey Results Announcing Rust 1.20 Announcing Rust 1.19 The 2017 Rust Conference Lineup Rust's 2017 roadmap, six months in Increasing Rust’s Reach Announcing Rust 1.18 Two years of Rust The Rust Libz Blitz Launching the 2017 State of Rust Survey Announcing Rust 1.17 Announcing Rust 1.16 Rust's language ergonomics initiative Announcing Rust 1.15.1 Rust's 2017 roadmap Announcing Rust 1.15 Announcing Rust 1.14 Announcing the First Underhanded Rust Contest Announcing Rust 1.13 Announcing Rust 1.12.1 Announcing Rust 1.12 Incremental Compilation Announcing Rust 1.11 Shape of errors to come The 2016 Rust Conference Lineup Announcing Rust 1.10 State of Rust Survey 2016 Announcing Rust 1.9 One year of Rust Taking Rust everywhere with rustup Launching the 2016 State of Rust Survey Cargo: predictable dependency management Introducing MIR Announcing Rust 1.8 Announcing Rust 1.7 Announcing Rust 1.6 Announcing Rust 1.5 Announcing Rust 1.4 Announcing Rust 1.3 Rust in 2016 Announcing Rust 1.2 Rust 1.1 stable, the Community Subteam, and RustCamp Announcing Rust 1.0 Abstraction without overhead: traits in Rust Rust Once, Run Everywhere Mixing matching, mutation, and moves in Rust Fearless Concurrency with Rust Announcing Rust 1.0 Beta Announcing Rust 1.0.0.alpha.2 Rust 1.0: status report and final timeline Announcing Rust 1.0 Alpha Rust 1.0: Scheduling the trains Yehuda Katz and Steve Klabnik are joining the Rust Core Team Cargo: Rust's community crate host Stability as a Deliverable Road to Rust 1.0
This Month in Our Test Infra: December 2024 | Inside Rust Blog
Jieyou Xu on behalf of the Bootstrap Team · 2025-01-10 · via Rust Blog

This Month in Our Test Infra: December 2024

Happy new year, dear reader! This is the last This Month in Our Test Infra issue for 2024.

This is a quick summary of the changes in the test infrastructure for the rust-lang/rust repository1 for December 2024.

As usual, if you encounter bugs or UX issues when using our test infrastructure, please file an issue. Bugs and papercuts can't be fixed if we don't know about them!

Thanks to everyone who contributed to our test infra!

Highlights

rustc-dev-guide is now a josh subtree!

Previously, rustc-dev-guide was a submodule inside rust-lang/rust, and updates to rustc-dev-guide had to be done in a separate PR against the rustc-dev-guide repository.

Now, thanks to @Kobzol's efforts (which included overcoming many unforeseen obstacles), rustc-dev-guide is now a josh subtree. This is a significant improvement for contribution workflows because it means that documentation updates to rustc-dev-guide can accompany the implementation change in rust-lang/rust in the same PR. The reduction in contribution friction also encourages rustc-dev-guide updates because you no longer have to author and maintain two separate PRs.

compiletest will now show the difference between normalized output and actual output for differing lines

Previously, it can be very difficult to tell when a ui test fails what the actual output is pre-normalization, as you would have to resort to --nocapture or similar.

Now, compiletest will also show the pre-normalization mismatched output lines on failure to make this easier to tell. Example output:

failures:

---- [ui] tests/ui/layout/enum.rs stdout ----
diff of stderr:

-	error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIGN }
+	error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN }
2	  --> $DIR/enum.rs:9:1
3	   |
4	LL | enum UninhabitedVariantAlign {

Note: some mismatched output was normalized before being compared
-	error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(8 bytes) }
-	  --> /home/jyn/src/rust2/tests/ui/layout/enum.rs:9:1
+	error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN }

compiletest now allows using a specific debugger when running debuginfo tests

For a long time, the tests/debuginfo test suite could only be successfully run if you had all the tested debuggers (being lldb, gdb, cdb). This is very annoying locally if:

  • One or more of these debuggers are not available or don't work locally2.
  • You just wanted to look at the test failures for a given debugger.

Now, you are able to run the tests/debuginfo test suite with a specific debugger, to only run the tests against that specified debugger. Example usage:

$ ./x test tests/debuginfo -- --debugger gdb

ui tests now support //@ forbid-output

ui tests can now use the //@ forbid-output: REGEX directive to check for a pattern which must not appear in the stderr. If the REGEX pattern is matched, then the ui test will fail.

Please consult rustc-dev-guide for more details.

./x test now accepts a --no-capture flag which will be forwarded to compiletest (and thus libtest)

Previously, if you wanted to pass the --nocapture flag through bootstrap, through compiletest, to the underlying libtest runner, on Linux you have to write:

$ ./x test tests/ui -- --nocapture

On native Windows msvc it's even worse, I recall having to write

PS> ./x test tests/ui -- -- --nocapture

Which is hard to discover and a contributor papercut3.

Now, you can just write

$ ./x test tests/ui --no-capture

and bootstrap will forward this flag as --nocapture to the underlying libtest.

Notable changes

This section is intended to be like a "compatibility notes" but for human test writers.

FileCheck-based test suites no longer predefine MSVC and NONMSVC FileCheck prefixes

In the current setup, compiletest will register a FileCheck custom prefix for each compiletest //@ revision. However, for historical reasons compiletest also predefined MSVC and NONMSVC FileCheck prefixes depending on the host. But this is very surprising for two reasons:

  1. It's "spooky action in a distance" because the user never declared these custom prefixes, and these prefixes are conditionally set based on the host. It's hard to debug too.
  2. If the user also wants to add their own //@ revision: MSVC NONMSVC revisions, because compiletest would pass --check-prefix for those names twice, this will cause FileCheck to report an error about duplicate prefixes.

Therefore, in compiletest: don't register predefined MSVC/NONMSVC FileCheck prefixes #134463 we no longer predefine these two FileCheck prefixes.

If you want the previous MSVC vs NONMSVC behavior, you will need to explicitly write out

//@ revisions: MSVC NONMSVC
//@[MSVC] only-windows-msvc
//@[NONMSVC] ignore-windows-msvc

normalize-{stderr,stdout}-test directives are renamed to normalize-{stderr,stdout}

Mostly a cleanup, the -test suffixes provide no additionally useful information, and only make these two normalize-* directives hard to discover.

normalize-{stderr,stdout}-test directives are now renamed to normalize-{stderr,stdout}. normalize-{stderr,stdout}-{32,64}bit directives remain unaffected.

compiletest will now deny usages of builtin FileCheck suffixes as revision names (for FileCheck-based test suites)

For FileCheck-based test suites (assembly, codegen, mir-opt), compiletest will register a custom FileCheck prefix for each compiletest //@ revision. However, FileCheck also has some builtin suffixes such as:

// COM:
// CHECK:
// CHECK-NEXT:
// CHECK-SAME:
// CHECK-EMPTY:
// CHECK-NOT:
// CHECK-COUNT:
// CHECK-DAG:
// CHECK-LABEL:

When combined, this previously meant that the compiletest revision + builtin FileCheck suffix constructions such as

// next:
// same-SAME:
// not-NOT:
// next-NEXT:
// not-SAME:

are permitted by compiletest, which are incredibly confusing.

As such, compiletest will now reject CHECK, COM, NEXT, SAME, EMPTY, NOT, COUNT, DAG, LABEL as revision names in FileCheck-based test suites.

PR listing

Improvements

Fixes

Cleanups

Documentation updates

  1. The test infra here refers to the test harness compiletest and supporting components in our build system bootstrap. This test infra is used mainly by rustc and rustdoc. Other tools like cargo, miri or rustfmt maintain their own test infra.

  2. For example, I keep having to debug the debugger like lldb when the older lldb versions keep complaining about ModuleNotFoundError: No module named '_lldb'.

  3. I don't know about you, but I can never for the life of me remember what the flag is called. I keep thinking it's --no-capture when currently libtest only accepts --nocapture. Thankfully T-testing-devex FCP'd to add the more conventional version --no-capture, looking forward to that. I can also never figure out how many -- dashes I need, I keep finding myself having to add more -- until it starts working.

  4. Nyehehehe