mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
syscalls: Add 'getxattr'.
* guix/build/syscalls.scm (getxattr): New procedure.
* tests/syscalls.scm ("getxattr, setxattr"): Test it, together with setxattr.
This commit is contained in:
committed by
Jan Nieuwenhuizen
parent
1a044e3936
commit
df05842332
@@ -270,6 +270,14 @@
|
||||
(scandir* directory)
|
||||
(scandir directory (const #t) string<?))))
|
||||
|
||||
(false-if-exception (delete-file temp-file))
|
||||
(test-assert "getxattr, setxattr"
|
||||
(let ((key "user.translator")
|
||||
(value "/hurd/pfinet\0")
|
||||
(file (open-file temp-file "w0")))
|
||||
(setxattr temp-file key value)
|
||||
(string=? (getxattr temp-file key) value)))
|
||||
|
||||
(false-if-exception (delete-file temp-file))
|
||||
(test-equal "fcntl-flock wait"
|
||||
42 ; the child's exit status
|
||||
|
||||
Reference in New Issue
Block a user