Skip to content

Commit

Permalink
Only test pthread_getname_np on linux-gnu
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Oct 23, 2022
1 parent 12e4584 commit 15cfeb3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion library/std/src/thread/tests.rs
Expand Up @@ -37,7 +37,13 @@ fn test_named_thread() {
.unwrap();
}

#[cfg(any(target_os = "linux", target_os = "macos", target_os = "ios", target_os = "watchos"))]
#[cfg(any(
// Note: musl didn't add pthread_getname_np until 1.2.3
all(target_os = "linux", target_env = "gnu"),
target_os = "macos",
target_os = "ios",
target_os = "watchos"
))]
#[test]
fn test_named_thread_truncation() {
use crate::ffi::CStr;
Expand Down

0 comments on commit 15cfeb3

Please sign in to comment.