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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/linux/dumper_cpu_info/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/mac/streams/module_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
};
Expand Down
6 changes: 6 additions & 0 deletions tests/mac_minidump_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use {
MinidumpModuleList, MinidumpSystemInfo, MinidumpThreadList,
},
minidump_writer::minidump_writer::MinidumpWriter,
std::os::unix::process::ExitStatusExt,
};

mod common;
Expand Down Expand Up @@ -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");

Expand Down
4 changes: 4 additions & 0 deletions tests/windows_minidump_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading
0