diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf8e7f7c..862ad8d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: job: - { os: ubuntu-24.04, target: x86_64-unknown-linux-gnu, release: true } - { os: ubuntu-24.04, target: x86_64-unknown-linux-musl } + - { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-gnu } - { os: windows-2025, target: x86_64-pc-windows-msvc } - { os: macos-15-intel, target: x86_64-apple-darwin } - { os: macos-15, target: aarch64-apple-darwin } @@ -43,10 +44,13 @@ jobs: uses: dtolnay/rust-toolchain@stable with: target: ${{ matrix.job.target }} + components: clippy - name: Fetch run: cargo fetch --target ${{ matrix.job.target }} - name: Build run: cargo test --target ${{ matrix.job.target }} --no-run + - name: Clippy + run: cargo clippy --all-features --all-targets --target ${{ matrix.job.target }} -- -D warnings - name: Test run: cargo test --target ${{ matrix.job.target }} - name: Release test @@ -79,7 +83,6 @@ jobs: matrix: job: - target: i686-unknown-linux-gnu - - target: aarch64-unknown-linux-gnu - target: aarch64-unknown-linux-musl - target: arm-unknown-linux-gnueabi - target: arm-unknown-linux-musleabi diff --git a/src/linux/dumper_cpu_info/arm.rs b/src/linux/dumper_cpu_info/arm.rs index 0bc1290f..aa14278a 100644 --- a/src/linux/dumper_cpu_info/arm.rs +++ b/src/linux/dumper_cpu_info/arm.rs @@ -273,10 +273,10 @@ pub fn write_cpu_information( } // Rebuild the ELF hwcaps from the 'Features' field. - if field == "Features" { - if let Some(val) = value { - elf_hwcaps = parse_features(val); - } + if field == "Features" + && let Some(val) = value + { + elf_hwcaps = parse_features(val); } } diff --git a/src/mac/streams/module_list.rs b/src/mac/streams/module_list.rs index 9da5ff87..dfc8fe6e 100644 --- a/src/mac/streams/module_list.rs +++ b/src/mac/streams/module_list.rs @@ -372,7 +372,7 @@ mod test { let expect_segment_data = unsafe { getsegmentdata( expected_img_hdr, - b"__TEXT\0".as_ptr(), + c"__TEXT".as_ptr().cast(), &mut expect_segment_size, ) }; diff --git a/tests/mac_minidump_writer.rs b/tests/mac_minidump_writer.rs index 1087951a..4a929326 100644 --- a/tests/mac_minidump_writer.rs +++ b/tests/mac_minidump_writer.rs @@ -7,6 +7,7 @@ use { MinidumpModuleList, MinidumpSystemInfo, MinidumpThreadList, }, minidump_writer::minidump_writer::MinidumpWriter, + std::os::unix::process::ExitStatusExt, }; mod common; @@ -67,6 +68,11 @@ fn capture_minidump(name: &str, exception_kind: u32) -> Captured<'_> { .expect("failed to send ack"); child.kill().expect("failed to kill child"); + // Reap child + let waitres = child.wait().expect("Failed to wait for child"); + let status = waitres.signal().expect("Child did not die due to signal"); + assert_eq!(waitres.code(), None); + assert_eq!(status, libc::SIGKILL); let minidump = Minidump::read_path(tmpfile.path()).expect("failed to read minidump"); diff --git a/tests/windows_minidump_writer.rs b/tests/windows_minidump_writer.rs index 548f6e87..3af18bdd 100644 --- a/tests/windows_minidump_writer.rs +++ b/tests/windows_minidump_writer.rs @@ -171,7 +171,11 @@ fn dump_external_process() { .expect("failed to write minidump"); child.kill().expect("failed to kill child"); + // Reap child + child.wait().expect("Failed to wait for child"); + // Clean up the zombie child. + child.wait().expect("failed to wait child"); let md = Minidump::read_path(tmpfile.path()).expect("failed to read minidump"); let _: MinidumpThreadList = md.get_stream().expect("Couldn't find MinidumpThreadList");