diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-07-08 23:58:22 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-07-08 23:58:22 +0200 |
commit | 873325b0307a709be6f305472a5bfb9e07437aaa (patch) | |
tree | b271f28b229f983841ca7b16c4d3cc52582c864e /tests | |
parent | 68ee10da03b09c2acead8891e4b51c718c24d574 (diff) | |
parent | 6a8299d267d111da4c80bbdfc83eb5cdfc072b4a (diff) | |
download | patches-873325b0307a709be6f305472a5bfb9e07437aaa.tar patches-873325b0307a709be6f305472a5bfb9e07437aaa.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-pack.sh | 5 | ||||
-rw-r--r-- | tests/store-deduplication.scm | 4 | ||||
-rw-r--r-- | tests/syscalls.scm | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh index 917d52451c..bf367fa429 100644 --- a/tests/guix-pack.sh +++ b/tests/guix-pack.sh @@ -28,6 +28,11 @@ fi guix pack --version +# FIXME: Starting from commit 66e9944e078cbb9e0d618377dd6df6e639640efa, +# '--bootstrap' is mostly ineffective since 'guix pack' produces derivations +# that refer to guile-sqlite3 and libgcrypt. For now we just skip the test. +exit 77 + # Use --no-substitutes because we need to verify we can do this ourselves. GUIX_BUILD_OPTIONS="--no-substitutes" export GUIX_BUILD_OPTIONS diff --git a/tests/store-deduplication.scm b/tests/store-deduplication.scm index 2361723199..4ca2ec0f61 100644 --- a/tests/store-deduplication.scm +++ b/tests/store-deduplication.scm @@ -47,6 +47,10 @@ (lambda (port) (put-bytevector port data)))) identical) + ;; Make the parent of IDENTICAL read-only. This should not prevent + ;; deduplication for inserting its hard link. + (chmod (dirname (second identical)) #o544) + (call-with-output-file unique (lambda (port) (put-bytevector port (string->utf8 "This is unique.")))) diff --git a/tests/syscalls.scm b/tests/syscalls.scm index 0d07280b99..3e267c9f01 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -60,6 +60,19 @@ (any (cute member <> (mount-points)) '("/" "/proc" "/sys" "/dev"))) +(false-if-exception (delete-file temp-file)) +(test-equal "utime with AT_SYMLINK_NOFOLLOW" + '(0 0) + (begin + ;; Test libguile's utime with AT_SYMLINK_NOFOLLOW, which libguile does not + ;; define as of Guile 2.2.4. + (symlink "/nowhere" temp-file) + (utime temp-file 0 0 0 0 AT_SYMLINK_NOFOLLOW) + (let ((st (lstat temp-file))) + (delete-file temp-file) + ;; Note: 'utimensat' does not change 'ctime'. + (list (stat:mtime st) (stat:atime st))))) + (test-assert "swapon, ENOENT/EPERM" (catch 'system-error (lambda () |