Skip to content
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

Add test for warning-free builds of core under no_global_oom_handling #110652

Merged
merged 1 commit into from
Apr 30, 2023

Conversation

ojeda
Copy link
Contributor

@ojeda ojeda commented Apr 21, 2023

tests/run-make/alloc-no-oom-handling tests that alloc under no_global_oom_handling builds and is warning-free.

Do the same for core to prevent issues such as [1].

Link: #110649 [1]

@rustbot
Copy link
Collaborator

rustbot commented Apr 21, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 21, 2023
@ojeda
Copy link
Contributor Author

ojeda commented Apr 21, 2023

@dpaoliello @Ericson2314

@dpaoliello
Copy link
Contributor

Could we do the equivalent of cargo check (I believe it would be adding --emit=dep-info,metadata to the command line) to speed these tests up?

@rust-log-analyzer

This comment has been minimized.

@ojeda ojeda force-pushed the core-no_global_oom_handling-test branch from 46b36fd to fccca0a Compare April 23, 2023 19:35
@ojeda
Copy link
Contributor Author

ojeda commented Apr 23, 2023

Could we do the equivalent of cargo check (I believe it would be adding --emit=dep-info,metadata to the command line) to speed these tests up?

Good idea, but that is probably best as an independent PR (changing both tests).

Why would we need dep-info? In fact, we would not even need the metadata to be actually written, but I am not sure what is the best way to ask rustc to really just check without outputs (and emitting to /dev/null does not work due to the temps and -Ztemps-dir does not seem to change that).

@rust-log-analyzer

This comment has been minimized.

@ojeda ojeda force-pushed the core-no_global_oom_handling-test branch from fccca0a to 592e8a4 Compare April 23, 2023 23:52
…m_handling`

`tests/run-make/alloc-no-oom-handling` tests that `alloc` under
`no_global_oom_handling` builds and is warning-free.

Do the same for `core` to prevent issues such as [1].

Link: rust-lang#110649 [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
@ojeda ojeda force-pushed the core-no_global_oom_handling-test branch from 592e8a4 to 3938541 Compare April 23, 2023 23:56
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-14 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests/run-make/core-no-oom-handling stdout ----

error: make failed
status: exit status: 2
command: cd "/checkout/tests/run-make/core-no-oom-handling" && AR="ar" CC="cc -ffunction-sections -fdata-sections -fPIC -m64" CXX="c++ -ffunction-sections -fdata-sections -fPIC -m64" HOST_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/usr/lib/llvm-14/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwp engine executionengine extensions filecheck frontendopenacc frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit orcshared orctargetprocess passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils ve veasmparser vecodegen vectorize vedesc vedisassembler veinfo webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" LLVM_FILECHECK="/usr/lib/llvm-14/bin/FileCheck" NODE="/usr/bin/node" PYTHON="/usr/bin/python3" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUST_BUILD_STAGE="stage2-x86_64-unknown-linux-gnu" RUST_DEMANGLER="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/rust-demangler" S="/checkout" TARGET="x86_64-unknown-linux-gnu" TARGET_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" TMPDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/core-no-oom-handling/core-no-oom-handling" "make"
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/core-no-oom-handling/core-no-oom-handling:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/core-no-oom-handling/core-no-oom-handling -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/core-no-oom-handling/core-no-oom-handling  --edition=2021 -Dwarnings --crate-type=rlib ../../../library/core/src/lib.rs --sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/core-no-oom-handling/core-no-oom-handling/fakeroot --cfg no_global_oom_handling
--- stderr -------------------------------
--- stderr -------------------------------
error[E0425]: cannot find function `provide_sorted_batch` in this scope
    --> ../../../library/core/src/slice/sort.rs:1227:15
     |
1227 |         end = provide_sorted_batch(v, start, end, is_less);

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.

@ojeda
Copy link
Contributor Author

ojeda commented Apr 24, 2023

After #110649 lands this one can too.

@Mark-Simulacrum
Copy link
Member

--emit=metadata is currently your best bet, we don't have a great alternative option today. Emitting the files itself should be pretty cheap I think, so I wouldn't worry too much about that.

r=me with the needed commit landed to fix this (approved that, so should happen soon)

@ojeda
Copy link
Contributor Author

ojeda commented Apr 24, 2023

Thanks Mark! I will send a PR to change the tests to --emit=metadata then; and I will create an issue for the check-only for rustc (or try to find if there is one created already).

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

Sounds good. I think there is likely to not be much appetite for yet another emission kind, particularly if the gains are minimal (as I expect they will be).

@bors
Copy link
Contributor

bors commented Apr 29, 2023

📌 Commit 3938541 has been approved by Mark-Simulacrum

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 Apr 29, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#110586 (Fix Unreadable non-UTF-8 output on localized MSVC)
 - rust-lang#110652 (Add test for warning-free builds of `core` under `no_global_oom_handling`)
 - rust-lang#110973 (improve error notes for packed struct reference diagnostic)
 - rust-lang#110981 (Move most rustdoc-ui tests into subdirectories)
 - rust-lang#110983 (rustdoc: Get `repr` information through `AdtDef` for foreign items)
 - rust-lang#110984 (Do not resolve anonymous lifetimes in consts to be static.)
 - rust-lang#110997 (Improve internal field comments on `slice::Iter(Mut)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e4daa81 into rust-lang:master Apr 30, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 30, 2023
@ojeda ojeda deleted the core-no_global_oom_handling-test branch April 30, 2023 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants