summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/sys/mod.rs1
-rw-r--r--test/sys/test_pthread.rs7
2 files changed, 8 insertions, 0 deletions
diff --git a/test/sys/mod.rs b/test/sys/mod.rs
index 5e5eed41..e93b0d28 100644
--- a/test/sys/mod.rs
+++ b/test/sys/mod.rs
@@ -12,3 +12,4 @@ mod test_uio;
#[cfg(target_os = "linux")]
mod test_epoll;
+mod test_pthread;
diff --git a/test/sys/test_pthread.rs b/test/sys/test_pthread.rs
new file mode 100644
index 00000000..092a95aa
--- /dev/null
+++ b/test/sys/test_pthread.rs
@@ -0,0 +1,7 @@
+use nix::sys::pthread::*;
+
+#[test]
+fn test_pthread_self() {
+ let tid = pthread_self();
+ assert!(tid > 0);
+}