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

CI: fix data_overflow test #542

Merged
merged 1 commit into from
Jun 30, 2024
Merged

Conversation

newAM
Copy link
Member

@newAM newAM commented Jun 30, 2024

Long story:

  • This test was introduced
  • ci/script.sh did not correctly check for failures, SC2251
  • The FLASH size was increased, and the test incorrectly passed, but nobody noticed.
  • I modified the test in Fix nightly CI failures #505 which made it fail again, but for the wrong reason. ptr::read_volatile(ptr::addr_of!(RODATA)) reads the entire array, which is not equivalent to the original code ptr::read_volatile(&RODATA as *const u8) which read a single element of the array.
  • The test now failed, but the stack related overflow takes rustc a LONG time to compile, and pushed our CI times to >30m.

These changes fix ci/scripts.sh to exit with a non-zero code if data_overflow is passing, and makes data_overflow fail to compile for the original reason, updating RODATA to reflect the increased FLASH size.

Long story:

* This test was introduced
* `ci/script.sh` did not correctly check for failures, [SC2251]
  * Thanks rust-embedded#404 for the tip!
* The FLASH size was increased, and the test incorrectly passed, but
  nobody noticed.
* I modified the test in rust-embedded#505 which made it fail again, but for the
  wrong reason.  `ptr::read_volatile(ptr::addr_of!(RODATA))` reads the
  entire array, which is not equivalent to the original code
  `ptr::read_volatile(&RODATA as *const u8)` which read a single element
  of the array.
* The test now failed, but the stack related overflow takes rustc a LONG
  time to compile, and pushed our CI times to >30m.

These changes fix ci/scripts.sh to exit with a non-zero code if
data_overflow is passing, and makes data_overflow fail to compile for
the original reason, updating RODATA to reflect the increased FLASH
size.

[SC2251]: https://www.shellcheck.net/wiki/SC2251
@newAM newAM requested a review from a team as a code owner June 30, 2024 22:17
@newAM newAM enabled auto-merge June 30, 2024 23:00
Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

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

thanks for figuring this one out!

@newAM newAM added this pull request to the merge queue Jun 30, 2024
Merged via the queue into rust-embedded:master with commit 7bd8e74 Jun 30, 2024
14 checks passed
@newAM newAM deleted the ci-fix-duration branch June 30, 2024 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants