diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2017-05-28 15:49:11 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2017-05-28 23:13:39 +0200 |
| commit | aa401f9ba6410095370ce0c4e5a01c02203a2b9f (patch) | |
| tree | 4451b41722f90e538626e3c703a467b0e752b5df /tests/syscalls.scm | |
| parent | 2b95f247215345c9130b5d6623d739f810224313 (diff) | |
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/syscalls.scm')
| -rw-r--r-- | tests/syscalls.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm index 8db45b41b6a..e20f0600bc6 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm | |||
| @@ -266,6 +266,14 @@ | |||
| 266 | (close-port file) | 266 | (close-port file) |
| 267 | result))))))))) | 267 | result))))))))) |
| 268 | 268 | ||
| 269 | (test-equal "set-thread-name" | ||
| 270 | "Syscall Test" | ||
| 271 | (let ((name (thread-name))) | ||
| 272 | (set-thread-name "Syscall Test") | ||
| 273 | (let ((new-name (thread-name))) | ||
| 274 | (set-thread-name name) | ||
| 275 | new-name))) | ||
| 276 | |||
| 269 | (test-assert "all-network-interface-names" | 277 | (test-assert "all-network-interface-names" |
| 270 | (match (all-network-interface-names) | 278 | (match (all-network-interface-names) |
| 271 | (((? string? names) ..1) | 279 | (((? string? names) ..1) |
