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

Migrate run-make/rustdoc-io-error to rmake.rs #124807

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented May 6, 2024

Part of #121876.

r? @jieyouxu

try-job: armhf-gnu

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 6, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 6, 2024

Some changes occurred in run-make tests.

cc @jieyouxu

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels May 6, 2024
permissions.set_readonly(false);
fs::set_permissions(&out_dir, permissions).unwrap();

#[cfg(not(windows))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason assert_eq!(output.status.code().unwrap(), 1); is non-Windows? Basic r/w permissions are available on Windows too right? Does rustdoc behave differently on Windows for a non-modifiable output directory?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I couldn't ensure the exact error code value on Windows (I don't have windows) so for now I only check that it fails whatever the OS, and if it's unix, then I check the error code is 1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could try editing PR CI to enable some Windows runners in PR CI and see if the error code is the same on Windows

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original test was running fine on Windows so I suppose it's fine to just check the error code whatever the platform.

@GuillaumeGomez
Copy link
Member Author

Removed the cfg. As mentioned above, I think it'll be fine since the original test was checking for this error code and was running on windows as well.

@jieyouxu
Copy link
Contributor

jieyouxu commented May 8, 2024

Removed the cfg. As mentioned above, I think it'll be fine since the original test was checking for this error code and was running on windows as well.

Actually, the original test never ran on Windows 😄

@GuillaumeGomez
Copy link
Member Author

Note for myself: should reduce coding while attending conferences. ^^'

Let's make a trybuild to ensure it's ok, and otherwise let's see what windows actually return.

@bors try

@bors
Copy link
Contributor

bors commented May 8, 2024

⌛ Trying commit 6a614ad with merge f88ce61...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
…ror, r=<try>

Migrate `run-make/rustdoc-io-error` to `rmake.rs`

Part of rust-lang#121876.

r? `@jieyouxu`
@bors
Copy link
Contributor

bors commented May 8, 2024

☀️ Try build successful - checks-actions
Build commit: f88ce61 (f88ce618eb7b8dd4bb9a7d3614b26c544d2c10e1)

@GuillaumeGomez
Copy link
Member Author

Seems like windows is happy so let's go! :D

@bors r=jieyouxu rollup

@bors
Copy link
Contributor

bors commented May 9, 2024

📌 Commit 6a614ad has been approved by jieyouxu

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 May 9, 2024
@bors
Copy link
Contributor

bors commented May 9, 2024

☔ The latest upstream changes (presumably #124916) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 9, 2024
@GuillaumeGomez
Copy link
Member Author

Rebased.

@bors r=jieyouxu rollup

@bors
Copy link
Contributor

bors commented May 10, 2024

📌 Commit ab1a67e has been approved by jieyouxu

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 10, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 10, 2024
…error, r=jieyouxu

Migrate `run-make/rustdoc-io-error` to `rmake.rs`

Part of rust-lang#121876.

r? `@jieyouxu`
@bors
Copy link
Contributor

bors commented May 14, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 14, 2024
@jieyouxu
Copy link
Contributor

The backtrace (lol):

2024-05-14T20:14:03.7056804Z thread 'main' panicked at /checkout/tests/run-make/rustdoc-io-error/rmake.rs:36:9:
2024-05-14T20:14:03.7057384Z Expected status code to be 1, found 0
2024-05-14T20:14:03.7057748Z stack backtrace:
2024-05-14T20:14:03.7058020Z    0: rust_begin_unwind
2024-05-14T20:14:03.7058353Z    1: core::panicking::panic_fmt
2024-05-14T20:14:03.7058686Z    2: rmake::main
2024-05-14T20:14:03.7059011Z    3: core::ops::function::FnOnce::call_once
2024-05-14T20:14:03.7059621Z note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@jieyouxu
Copy link
Contributor

Right, you'll have to set backtrace on Rustdoc's Command I think?

@GuillaumeGomez
Copy link
Member Author

Let's put it everywhere. 😈

@GuillaumeGomez
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented May 15, 2024

⌛ Trying commit 24580e8 with merge b5c0268...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2024
…ror, r=<try>

Migrate `run-make/rustdoc-io-error` to `rmake.rs`

Part of rust-lang#121876.

r? `@jieyouxu`

try-job: armhf-gnu
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 15, 2024

💔 Test failed - checks-actions

@GuillaumeGomez
Copy link
Member Author

So there is no other output. It just succeeds at rendering docs in a read-only folder. Dark magic.

@GuillaumeGomez
Copy link
Member Author

Seems like I removed some improvements I did to the permissions setting. Should be fixed. Let's see the ICE this time.

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2024
…ror, r=<try>

Migrate `run-make/rustdoc-io-error` to `rmake.rs`

Part of rust-lang#121876.

r? `@jieyouxu`

try-job: armhf-gnu
@bors
Copy link
Contributor

bors commented May 15, 2024

⌛ Trying commit ff47f47 with merge e6d0345...

@rust-log-analyzer
Copy link
Collaborator

The job armhf-gnu 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/rustdoc-io-error stdout ----

error: rmake recipe failed to complete
status: exit status: 101
command: cd "/checkout/tests/run-make/rustdoc-io-error" && env -u CARGO_MAKEFLAGS -u MAKEFLAGS -u MFLAGS -u RUSTFLAGS AR="arm-linux-gnueabihf-ar" CC="arm-linux-gnueabihf-gcc" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv6 -marm -mfpu=vfp" CXX="arm-linux-gnueabihf-g++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv6 -marm -mfpu=vfp" HOST_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIBRARY_PATH="/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-tools-bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets 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 codegentypes core coroutines coverage csky cskyasmparser cskycodegen cskydesc cskydisassembler cskyinfo debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipstdpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo 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 objcopy object objectyaml option orcdebugging orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi textapibinaryreader transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray" LLVM_FILECHECK="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" PYTHON="/usr/bin/python3" REMOTE_TEST_CLIENT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_LINKER="arm-linux-gnueabihf-gcc" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUST_BUILD_STAGE="stage2-arm-unknown-linux-gnueabihf" S="/checkout" TARGET="arm-unknown-linux-gnueabihf" TARGET_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-unknown-linux-gnueabihf/lib" TARGET_RPATH_ENV="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-io-error/rustdoc-io-error:/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" TMPDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-io-error/rustdoc-io-error" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-io-error/rustdoc-io-error/rmake"
--- stderr -------------------------------
=== STDOUT ===

=== STDERR ===

@bors
Copy link
Contributor

bors commented May 15, 2024

💔 Test failed - checks-actions

@GuillaumeGomez
Copy link
Member Author

Still same outcome. I have no idea what's wrong with this target...

@jieyouxu

This comment was marked as off-topic.

@GuillaumeGomez
Copy link
Member Author

rustdoc isn't ICEing, it's the panic/assert from rmake.rs which is.

@jieyouxu
Copy link
Contributor

rustdoc isn't ICEing, it's the panic/assert from rmake.rs which is.

I'm a complete idiot, I saw exit status: 101 and immediately assumed something ICE'd. It's actually failing because it's succeeding unexpectedly (lol)

Expected status code to be 1, found 0

@jieyouxu
Copy link
Contributor

In that case, I think it's reasonable to change the assertion to not match on exit code == 1, but instead just check that exit code != 101 (for rustdoc's exit code).

@GuillaumeGomez
Copy link
Member Author

I'm not sure it will work since we want to ensure rustdoc returned an error, but worth trying I suppose...

@bors
Copy link
Contributor

bors commented May 18, 2024

☔ The latest upstream changes (presumably #125254) made this pull request unmergeable. Please resolve the merge conflicts.

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 S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants