From c368c3c2fe99b80e3981392807680a9d11087290 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 19 Aug 2026 09:42:36 -0400 Subject: [PATCH 1/2] Remove patch not needed anymore --- .github/workflows/ci.yaml | 3 -- ...erocopy-extern-in-rusttestlib-kernel.patch | 38 ------------------- 2 files changed, 41 deletions(-) delete mode 100644 0002-Path-qualify-zerocopy-extern-in-rusttestlib-kernel.patch diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 162d585..74f314c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -93,9 +93,6 @@ jobs: # TODO: remove if this patch is indeed not necessary. (It seems the patch is now included upstream.) # - run: git -C linux apply ../ci/x86-boot-Use-std-gnu11-to-fix-build-with-GCC-15.patch - # TODO: remove when fixed upstream. - - run: git -C linux apply ../ci/0002-Path-qualify-zerocopy-extern-in-rusttestlib-kernel.patch - # Setup: `busybox`. - run: | git clone --depth 1 -b 1_30_1 https://github.com/mirror/busybox diff --git a/0002-Path-qualify-zerocopy-extern-in-rusttestlib-kernel.patch b/0002-Path-qualify-zerocopy-extern-in-rusttestlib-kernel.patch deleted file mode 100644 index 2bf3607..0000000 --- a/0002-Path-qualify-zerocopy-extern-in-rusttestlib-kernel.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antoni Boucher -Date: Mon, 20 Jul 2026 00:00:00 -0500 -Subject: [PATCH] rust: path-qualify the zerocopy extern in rusttestlib-kernel - -Since nightly-2025-11-23 the Rust sysroot ships a precompiled `zerocopy` -crate (`libzerocopy-.rmeta`). `rusttestlib-kernel` builds the kernel -crate as a host test library with a bare `--extern zerocopy` and -`-L rust/test`, so rustc finds two candidates for the crate -- the -in-tree `rust/test/libzerocopy.rlib` and the sysroot one -- and fails: - - error[E0464]: multiple candidates for `rmeta` dependency `zerocopy` found - -The other rules that name `zerocopy` are unaffected: the rustdoc/doctest -rules pass `--sysroot=/dev/null`, and `rusttest-macros` only pulls -`zerocopy` in transitively through `--extern kernel`, which rustc -resolves unambiguously by crate hash. - -Point the direct dependency at the in-tree rlib so the sysroot copy is -never considered. This only shows up with a recent toolchain, which the -GCC backend uses (rustc_codegen_gcc pins nightly-2026-07-14); the LLVM -backend still builds against an older nightly without the sysroot crate. ---- - rust/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rust/Makefile b/rust/Makefile ---- a/rust/Makefile -+++ b/rust/Makefile -@@ -342,7 +342,7 @@ rusttestlib-pin_init: $(src)/pin-init/src/lib.rs rusttestlib-macros \ - rusttestlib-kernel: private rustc_target_flags = --extern ffi \ - --extern build_error --extern macros --extern pin_init \ - --extern bindings --extern uapi \ -- --extern zerocopy --extern zerocopy_derive -+ --extern zerocopy=$(objtree)/$(obj)/test/libzerocopy.rlib --extern zerocopy_derive - rusttestlib-kernel: $(src)/kernel/lib.rs rusttestlib-bindings rusttestlib-uapi \ - rusttestlib-build_error rusttestlib-pin_init $(obj)/$(libmacros_name) \ - $(obj)/bindings.o rusttestlib-zerocopy rusttestlib-zerocopy_derive FORCE From a7e6dfebdd5b848da344b4b6ad8c75ef7d260b13 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 19 Aug 2026 10:20:18 -0400 Subject: [PATCH 2/2] Increase doctest number --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 74f314c..e1a4028 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -258,7 +258,7 @@ jobs: # Print the result line for debugging. grep -E '\] ok [0-9]+ rust_doctests_kernel$' qemu-stdout || true - grep '] ok 8 rust_doctests_kernel$' qemu-stdout + grep '] ok 11 rust_doctests_kernel$' qemu-stdout - run: python ci/check_panics.py qemu-stdout