Skip to content

Commit

Permalink
Extend CI-disabled ptrace_dumper tests to also be disabled on Android,
Browse files Browse the repository at this point in the history
for similar reasons.
  • Loading branch information
afranchuk committed Jul 9, 2024
1 parent 9e748df commit 00942d6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/ptrace_dumper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ use std::os::unix::process::ExitStatusExt;
mod common;
use common::*;

macro_rules! disabled_on_ci {
/// These tests generally aren't consistent in resource-deprived environments like CI runners and
/// android emulators.
macro_rules! disabled_on_ci_and_android {
() => {
if std::env::var("CI").is_ok() {
println!("disabled on CI, but works locally");
if std::env::var("CI").is_ok() || cfg!(target_os = "android") {
println!("disabled on CI and android, but otherwise works locally");
return;
}
};
Expand Down Expand Up @@ -113,7 +115,7 @@ fn test_mappings_include_linux_gate() {

#[test]
fn test_linux_gate_mapping_id() {
disabled_on_ci!();
disabled_on_ci_and_android!();
spawn_child("linux_gate_mapping_id", &[]);
}

Expand Down Expand Up @@ -169,7 +171,7 @@ fn test_merged_mappings() {
#[test]
// Ensure that the linux-gate VDSO is included in the mapping list.
fn test_file_id() {
disabled_on_ci!();
disabled_on_ci_and_android!();
spawn_child("file_id", &[]);
}

Expand All @@ -186,7 +188,7 @@ fn test_find_mapping() {

#[test]
fn test_copy_from_process_self() {
disabled_on_ci!();
disabled_on_ci_and_android!();

let stack_var: libc::c_long = 0x11223344;
let heap_var: Box<libc::c_long> = Box::new(0x55667788);
Expand Down

0 comments on commit 00942d6

Please sign in to comment.