From ca752127ed614ee2003fda24dab1a36c28f6a800 Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Fri, 4 Mar 2016 23:50:51 -0800 Subject: Add gettid --- test/test_unistd.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/test_unistd.rs') 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] -- cgit v1.2.3