From aa401f9ba6410095370ce0c4e5a01c02203a2b9f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 28 May 2017 15:49:11 +0200 Subject: 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. --- tests/syscalls.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') 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) -- cgit v1.2.3