aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-28 15:49:11 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-28 23:13:39 +0200
commitaa401f9ba6410095370ce0c4e5a01c02203a2b9f (patch)
tree4451b41722f90e538626e3c703a467b0e752b5df /tests
parent2b95f247215345c9130b5d6623d739f810224313 (diff)
downloadgnu-guix-aa401f9ba6410095370ce0c4e5a01c02203a2b9f.tar
gnu-guix-aa401f9ba6410095370ce0c4e5a01c02203a2b9f.tar.gz
syscalls: Add 'thread-name' and 'set-thread-name'.
* guix/build/syscalls.scm (PR_SET_NAME, PR_GET_NAME) (%max-thread-name-length): New variables. (%prctl, set-thread-name, thread-name): New procedures. * tests/syscalls.scm ("set-thread-name"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/syscalls.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index 8db45b41b6..e20f0600bc 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -266,6 +266,14 @@
(close-port file)
result)))))))))
+(test-equal "set-thread-name"
+ "Syscall Test"
+ (let ((name (thread-name)))
+ (set-thread-name "Syscall Test")
+ (let ((new-name (thread-name)))
+ (set-thread-name name)
+ new-name)))
+
(test-assert "all-network-interface-names"
(match (all-network-interface-names)
(((? string? names) ..1)