diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-09-23 16:39:42 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-09-23 16:41:13 +0200 |
commit | 3ee7673cc98d2acca3144a81bfbe1351b2bbe0fd (patch) | |
tree | 9d775d2874724e742c12fc2b914ecbc2a294abd7 /test-suite/tests | |
parent | 663b8826d7867578f8df509a5f986c671f857938 (diff) | |
download | guile-3ee7673cc98d2acca3144a81bfbe1351b2bbe0fd.tar.gz |
Define AT_SYMLINK_NOFOLLOW et al.
* libguile/posix.c (scm_init_posix): Define AT_SYMLINK_NOFOLLOW,
AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH when available.
(scm_utime): Mention AT_SYMLINK_NOFOLLOW.
* doc/ref/posix.texi (File System): Update accordingly.
* test-suite/tests/posix.test ("utime")["AT_SYMLINK_NOFOLLOW"]: New test.
Diffstat (limited to 'test-suite/tests')
-rw-r--r-- | test-suite/tests/posix.test | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test index 4dadd7784..63b451397 100644 --- a/test-suite/tests/posix.test +++ b/test-suite/tests/posix.test @@ -1,7 +1,7 @@ ;;;; posix.test --- Test suite for Guile POSIX functions. -*- scheme -*- ;;;; ;;;; Copyright 2003, 2004, 2006, 2007, 2010, 2012, -;;;; 2015, 2017 Free Software Foundation, Inc. +;;;; 2015, 2017, 2018 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -181,7 +181,22 @@ (and (= (stat:atime info) accessed) (= (stat:mtime info) modified))))) (lambda () - (delete-file file)))))) + (delete-file file))))) + + (pass-if-equal "AT_SYMLINK_NOFOLLOW" + '(1 1) + (if (defined? 'AT_SYMLINK_NOFOLLOW) + (let ((file "posix.test-utime")) + (dynamic-wind + (lambda () + (symlink "/dev/null" file)) + (lambda () + (utime file 1 1 0 0 AT_SYMLINK_NOFOLLOW) + (let ((info (lstat file))) + (list (stat:atime info) (stat:mtime info)))) + (lambda () + (delete-file file)))) + (throw 'unsupported)))) ;; ;; affinity |