summaryrefslogtreecommitdiff
path: root/tests/syscalls.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-07-03 10:52:55 +0200
committerLudovic Courtès <ludo@gnu.org>2018-07-03 17:50:04 +0200
commit25c7ff6a3ecbaa1e93b38d35c8cbff40b7f4edb8 (patch)
tree77aee44c3d14d98dfac93f504e6041f6dfbf5c83 /tests/syscalls.scm
parenta5b34d9d24cababcaa9d5e93813ccb3196e11a95 (diff)
syscalls: Define AT_SYMLINK_NOFOLLOW et al.
* guix/build/syscalls.scm (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR) (AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH): New variables. * tests/syscalls.scm ("utime with AT_SYMLINK_NOFOLLOW"): New test.
Diffstat (limited to 'tests/syscalls.scm')
-rw-r--r--tests/syscalls.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index 0d07280b998..3e267c9f011 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -60,6 +60,19 @@
60 (any (cute member <> (mount-points)) 60 (any (cute member <> (mount-points))
61 '("/" "/proc" "/sys" "/dev"))) 61 '("/" "/proc" "/sys" "/dev")))
62 62
63(false-if-exception (delete-file temp-file))
64(test-equal "utime with AT_SYMLINK_NOFOLLOW"
65 '(0 0)
66 (begin
67 ;; Test libguile's utime with AT_SYMLINK_NOFOLLOW, which libguile does not
68 ;; define as of Guile 2.2.4.
69 (symlink "/nowhere" temp-file)
70 (utime temp-file 0 0 0 0 AT_SYMLINK_NOFOLLOW)
71 (let ((st (lstat temp-file)))
72 (delete-file temp-file)
73 ;; Note: 'utimensat' does not change 'ctime'.
74 (list (stat:mtime st) (stat:atime st)))))
75
63(test-assert "swapon, ENOENT/EPERM" 76(test-assert "swapon, ENOENT/EPERM"
64 (catch 'system-error 77 (catch 'system-error
65 (lambda () 78 (lambda ()