Skip to content

Commit 3c21514

Browse files
chore: skip tests that rely on linux behavior
These tests panic on macOS, and for now are not relevant since we do not support profiling on macOS. When we do support it, we should have os-specific tests
1 parent c7db361 commit 3c21514

5 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/executor/shared/fifo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ impl RunnerFifo {
275275
}
276276
}
277277

278-
#[cfg(test)]
278+
#[cfg(all(test, target_os = "linux"))]
279279
mod tests {
280280
use super::*;
281281
use std::time::Duration;

src/executor/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ async fn acquire_bpf_instrumentation_lock() -> SemaphorePermit<'static> {
146146
semaphore.acquire().await.unwrap()
147147
}
148148

149+
#[cfg(target_os = "linux")]
149150
mod valgrind {
150151
use super::*;
151152
use crate::executor::valgrind::executor::ValgrindExecutor;
@@ -377,6 +378,7 @@ fi
377378
}
378379
}
379380

381+
#[cfg(target_os = "linux")]
380382
#[test_with::env(GITHUB_ACTIONS)]
381383
mod memory {
382384
use super::*;

src/executor/wall_time/perf/debug_info.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ pub fn debug_info_by_path(
127127
.collect()
128128
}
129129

130-
#[cfg(test)]
130+
// These tests parse Linux ELF binaries from `testdata/`; gate them on Linux so they're not
131+
// attempted (and don't abort the test process) when running on macOS.
132+
#[cfg(all(test, target_os = "linux"))]
131133
mod tests {
132134
use super::*;
133135

src/executor/wall_time/perf/module_symbols.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl ModuleSymbols {
177177
}
178178
}
179179

180-
#[cfg(test)]
180+
#[cfg(all(test, target_os = "linux"))]
181181
mod tests {
182182
use super::*;
183183

src/executor/wall_time/perf/unwind_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub fn unwind_data_from_elf(
8787
Ok((v3, mapping))
8888
}
8989

90-
#[cfg(test)]
90+
#[cfg(all(test, target_os = "linux"))]
9191
mod tests {
9292
use super::*;
9393

0 commit comments

Comments
 (0)