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 thumb-none-qemu to rmake #128639

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

folkertdev
Copy link
Contributor

@folkertdev folkertdev commented Aug 4, 2024

tracking issue: #121876

I think this one is actually simpler than #128636, we invoke cargo run with the right target and see if the expected result appears.

r? @jieyouxu

try-job: armhf-gnu
try-job: dist-various-1
try-job: test-various

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 4, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 4, 2024

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

//! $ ./x.py clean
//! $ ./x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi tests/run-make
//!
//! For supported targets, see `example/.cargo/config`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

that file notes that some targets are not quite accurate because qemu is too old. Maybe that has changed? we can try that separately though.

Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, I have no clue what the up-to-date cargo config in this case is for thumb targets and I don't have the environment to set it, I'm fine with keeping the config as-is for now. If anyone knowledgeable about thumb can update that config, I would be happy to accept.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've now updated the thumbv6m-none-eabi target to use the -cpu cortex-m0. We'll see if that causes issues, it shouldn't if the qemu version is remotely recent. Otherwise I think that config file looks fine.

@jieyouxu
Copy link
Member

jieyouxu commented Aug 4, 2024

Ah hah, I see this is going to require some archaeology 😄 I'll take a look at this tmrw

@folkertdev
Copy link
Contributor Author

yeah I've also added this to the agenda of the embedded-wg rust-embedded/wg#783, they might have thoughts on how big a deal this actually is.

@folkertdev
Copy link
Contributor Author

I did some of the detective work: that file is 5 years old, so it is quite plausible that more things now work. With my qemu, cortex-m0 is now available. cortexm-23 is not. I was not able to build a version of qemu, so I'm not 100% sure that it's not supported.

> qemu-system-arm --version
QEMU emulator version 8.1.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

> qemu-system-arm -cpu help | grep "cortex"
  cortex-a15
  cortex-a7
  cortex-a8
  cortex-a9
  cortex-m0
  cortex-m3
  cortex-m33
  cortex-m4
  cortex-m55
  cortex-m7
  cortex-r5
  cortex-r52
  cortex-r5f

anyway, we can update that separately from switching to rmake, and given that it's apparently not caused issues over the last 5 years it's probably not a high priority.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, this looks very reasonable. I'll run a couple of try jobs to check after not using the extra directory indirection.

@@ -1,20 +0,0 @@
#!/bin/sh
set -exuo pipefail
Copy link
Member

Choose a reason for hiding this comment

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

Self-remark:

set -exuo pipefail

cf. https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425?permalink_comment_id=3935570

-e: immediately exit on non-zero
-x: all exec cmd printed to terminal
-u: strict no-undef variables modulo `$*` and `$@`
-o pipefail: prevent errors in pipelines from being masked

tests/run-make/thumb-none-qemu/rmake.rs Show resolved Hide resolved
tests/run-make/thumb-none-qemu/rmake.rs Outdated Show resolved Hide resolved
tests/run-make/thumb-none-qemu/rmake.rs Outdated Show resolved Hide resolved
//! $ ./x.py clean
//! $ ./x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi tests/run-make
//!
//! For supported targets, see `example/.cargo/config`
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, I have no clue what the up-to-date cargo config in this case is for thumb targets and I don't have the environment to set it, I'm fine with keeping the config as-is for now. If anyone knowledgeable about thumb can update that config, I would be happy to accept.

Copy link
Member

Choose a reason for hiding this comment

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

Remark: I wonder if this needs LD_LIBRARY_PATH set.

tests/run-make/thumb-none-qemu/rmake.rs Outdated Show resolved Hide resolved
@jieyouxu
Copy link
Member

jieyouxu commented Aug 6, 2024

@bors try (just to see)

@jieyouxu
Copy link
Member

jieyouxu commented Aug 6, 2024

@rustbot author

@rustbot rustbot 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 Aug 6, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 6, 2024
…<try>

migrate `thumb-none-qemu` to rmake

tracking issue: rust-lang#121876

I think this one is actually simpler than rust-lang#128636, we invoke `cargo run` with the right target and see if the expected result appears.

r? `@jieyouxu`

try-job: armhf-gnu
try-job: dist-various-1
try-job: test-various
@bors
Copy link
Contributor

bors commented Aug 6, 2024

⌛ Trying commit 54f40ce with merge 7084c9b...

jieyouxu

This comment was marked as resolved.

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

jieyouxu commented Aug 6, 2024

@rustbot blocked (pending T-compiler discussion)

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 6, 2024
@bors
Copy link
Contributor

bors commented Aug 6, 2024

☀️ Try build successful - checks-actions
Build commit: 7084c9b (7084c9bc957727b458119a236606b59164ea79ad)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Aug 6, 2024
Copy link
Contributor Author

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

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

@rustbot ready

tests/run-make/thumb-none-qemu/rmake.rs Show resolved Hide resolved
tests/run-make/thumb-none-qemu/rmake.rs Show resolved Hide resolved
//! $ ./x.py clean
//! $ ./x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi tests/run-make
//!
//! For supported targets, see `example/.cargo/config`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've now updated the thumbv6m-none-eabi target to use the -cpu cortex-m0. We'll see if that causes issues, it shouldn't if the qemu version is remotely recent. Otherwise I think that config file looks fine.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 8, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Aug 8, 2024

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2024

📌 Commit 3e5885f 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 Aug 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 8, 2024
…jieyouxu

migrate `thumb-none-qemu` to rmake

tracking issue: rust-lang#121876

I think this one is actually simpler than rust-lang#128636, we invoke `cargo run` with the right target and see if the expected result appears.

r? `@jieyouxu`

try-job: armhf-gnu
try-job: dist-various-1
try-job: test-various
@bors
Copy link
Contributor

bors commented Aug 8, 2024

⌛ Testing commit 3e5885f with merge f4b7051...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Aug 8, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 8, 2024
@folkertdev
Copy link
Contributor Author

looks like bors still has some issues?

  #1 28.11 error: failed to list workers: Unavailable: connection error: desc = "transport: Error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory"
  #1 creating container buildx_buildkit_fervent_leavitt0 27.9s done
  #1 ERROR: exit code 1

@jieyouxu
Copy link
Member

jieyouxu commented Aug 8, 2024

looks like bors still has some issues?

  #1 28.11 error: failed to list workers: Unavailable: connection error: desc = "transport: Error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory"
  #1 creating container buildx_buildkit_fervent_leavitt0 27.9s done
  #1 ERROR: exit code 1

A different issue lol: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/CI.20failures.20from.20networking

@jieyouxu

This comment was marked as resolved.

@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 Aug 8, 2024
@jieyouxu

This comment was marked as resolved.

@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 Aug 8, 2024
@jieyouxu

This comment was marked as resolved.

@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 Aug 8, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Aug 8, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2024

📌 Commit 3e5885f has been approved by jieyouxu

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 8, 2024

⌛ Testing commit 3e5885f with merge 2048386...

@bors
Copy link
Contributor

bors commented Aug 8, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 2048386 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 8, 2024
@bors bors merged commit 2048386 into rust-lang:master Aug 8, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 8, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2048386): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 0.1%, secondary 0.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
3.8% [3.8%, 3.8%] 1
Improvements ✅
(primary)
-3.1% [-3.1%, -3.1%] 1
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
All ❌✅ (primary) 0.1% [-3.1%, 3.3%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 760.03s -> 761.822s (0.24%)
Artifact size: 337.08 MiB -> 337.08 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants