diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_unistd.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_unistd.rs b/test/test_unistd.rs index 510f8f6c..2f361cfe 100644 --- a/test/test_unistd.rs +++ b/test/test_unistd.rs @@ -54,6 +54,17 @@ fn test_getpid() { assert!(ppid > 0); } +#[cfg(any(target_os = "linux", target_os = "android"))] +mod linux_android { + use nix::unistd::gettid; + + #[test] + fn test_gettid() { + let tid = gettid(); + assert!(tid > 0); + } +} + macro_rules! execve_test_factory( ($test_name:ident, $syscall:ident, $unix_sh:expr, $android_sh:expr) => ( #[test] |