summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorking6cong <king6cong@gmail.com>2017-04-18 20:03:23 +0800
committerking6cong <king6cong@gmail.com>2017-06-04 15:23:53 +0800
commit445c2477cac5116e39a84f75037ed7e3892546dc (patch)
tree3627fe39339a5744640743b4b3f377adb409abf1 /test
parent64ac43a06a22e0666fe43f647f78e299ab33a528 (diff)
downloadnix-445c2477cac5116e39a84f75037ed7e3892546dc.zip
Add pthread_self
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);
+}