Skip to content

Commit 74c4862

Browse files
committed
fix(cksum): exclude Android from --debug flag tests
The --debug flag tests call CpuFeatures::detect() which executes the x86 CPUID instruction. On the Android x86_64 emulator, this crashes the adb process with exit code 137 (SIGKILL). This fix excludes the debug flag tests from Android builds by adding #[cfg(not(target_os = "android"))] attributes to: - test_debug_flag() - test_debug_with_algorithms() These tests are not needed on Android since the --debug flag functionality is not critical for the Android build, and the CPUID instruction is not available on the emulator. Fixes: Android CI job failure with exit code 137 Resolves: PR uutils#9088 Android x86_64 emulator crash during tests
1 parent d78e7d1 commit 74c4862

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/by-util/test_cksum.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2747,6 +2747,7 @@ mod format_mix {
27472747
}
27482748

27492749
#[test]
2750+
#[cfg(not(target_os = "android"))]
27502751
fn test_debug_flag() {
27512752
// Test with default CRC algorithm - should output CPU feature detection
27522753
new_ucmd!()
@@ -2792,6 +2793,7 @@ fn test_debug_flag() {
27922793
}
27932794

27942795
#[test]
2796+
#[cfg(not(target_os = "android"))]
27952797
fn test_debug_with_algorithms() {
27962798
// Test with SHA256 - CPU detection should be same regardless of algorithm
27972799
new_ucmd!()

0 commit comments

Comments
 (0)