8000 CI: ARM native tests and platform-specific Clippy by schopin-mozilla · Pull Request #197 · rust-minidump/minidump-writer · GitHub
[go: up one dir, main page]

Skip to content

CI: ARM native tests and platform-specific Clippy - #197

Merged
gabrielesvelto merged 5 commits into
rust-minidump:mainfrom
schopin-mozilla:arm-clippy
Aug 12, 2026
Merged

gabrielesvelto merged 5 commits into
rust-minidump:mainfrom
schopin-mozilla:arm-clippy

Conversation

@schopin-mozilla
@schopin-mozilla schopin-mozilla commented Aug 6, 2026 •
Copy link
Copy Markdown
Collaborator

This PR adds Linux arm64 in the set of main targets (GH has had runners for a while now), and runs clippy for all those main targets rather than just for x86_64-unknown-linux-gnu, since we have a sizable amount of platform-specific code that deserves to be checked.

And of course, bundled in are the various clippy fixes for the new failures those changes brought forward.

@schopin-mozilla
Copy link
Copy Markdown
Collaborator Author

The GH action doesn't appear to pull the appropriate target. Marking it as Draft while I'm investigating.

@schopin-mozilla
schopin-mozilla marked this pull request as draft August 6, 2026 10:22
@schopin-mozilla
schopin-mozilla force-pushed the arm-clippy branch 4 times, most recently from a93a47f to 6fe61e5 Compare August 6, 2026 15:30
We keep the main amd64 Linux clippy run for smoketesting, but we also
need a platform-specific to cover all those codepaths that are arch/OS
specific.
@schopin-mozilla
schopin-mozilla force-pushed the arm-clippy branch 2 times, most recently from efb6471 to 89868d9 Compare August 6, 2026 15:40
There are now native ARM runners available, we might as well take
advantage.
Clippy error:
error: this `if` statement can be collapsed
   --> src/linux/dumper_cpu_info/arm.rs:276:9
    |
276 | /         if field == "Features" {
277 | |             if let Some(val) = value {
278 | |                 elf_hwcaps = parse_features(val);
279 | |             }
280 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#collapsible_if
We do it the proper way on Mac, checking that the child was indeed
killed by us. Sadly, the Windows APIs available don't allow us to
do the same there.

Example clippy complaint:
error: spawned process is never `wait()`ed on
   --> tests\windows_minidump_writer.rs:135:21
    |
135 |     let mut child = start_child_and_return(&[&format!("{:x}", EXCEPTION_ILLEGAL_INSTRUCTION)]);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider calling `.wait()`
    = note: not doing so might leave behind zombie processes
Clippy warning:
error: manually constructing a nul-terminated string
   --> src/mac/streams/module_list.rs:375:21
    |
375 |                     b"__TEXT\0".as_ptr(),
    |                     ^^^^^^^^^^^ help: use a `c""` literal: `c"__TEXT"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#manual_c_str_literals
@schopin-mozilla schopin-mozilla changed the title Fix and run clippy for ARM codepaths CI: ARM native tests and platform-specific Clippy Aug 7, 2026
@schopin-mozilla
schopin-mozilla marked this pull request as ready for review August 7, 2026 12:01
@gabrielesvelto gabrielesvelto left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gabrielesvelto
gabrielesvelto merged commit 29903a0 into rust-minidump:main Aug 12, 2026
16 checks passed
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

0