diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-11-04 21:11:10 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-11-04 21:13:28 +0100 |
| commit | 834ea02ad82932e0f17e37dbd5c51497ecf7557f (patch) | |
| tree | 666715054751f89c69f8b158bc74c97ed2ad542d /tests/nar.scm | |
| parent | 000c59b6719250ee94a597418765c2f7f0ad3969 (diff) | |
tests: When a store item is to be deleted, make it statistically unique.
Fixes <http://bugs.gnu.org/18935>.
Reported by Mark H Weaver <mhw@netris.org>.
Previously, if tests/nar.scm ran concurrently with tests/gexp.scm, the
store item "foo" containing the string "Hello, world!" could be
deleted (via 'delete-paths') from the tests/nar.scm daemon while the
tests/gexp.scm daemon would still consider it live.
* tests/nar.scm ("restore-file-set (missing signature)"):
Use (random-text) rather than "Hello, world!", to avoid concurrent
deletion of store item "foo" used in tests/gexp.scm.
Diffstat (limited to 'tests/nar.scm')
| -rw-r--r-- | tests/nar.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/nar.scm b/tests/nar.scm index 1641d6f9b26..38b2482c92d 100644 --- a/tests/nar.scm +++ b/tests/nar.scm | |||
| @@ -277,7 +277,7 @@ | |||
| 277 | (test-assert "restore-file-set (missing signature)" | 277 | (test-assert "restore-file-set (missing signature)" |
| 278 | (let/ec return | 278 | (let/ec return |
| 279 | (with-store store | 279 | (with-store store |
| 280 | (let* ((file (add-text-to-store store "foo" "Hello, world!")) | 280 | (let* ((file (add-text-to-store store "foo" (random-text))) |
| 281 | (dump (call-with-bytevector-output-port | 281 | (dump (call-with-bytevector-output-port |
| 282 | (cute export-paths store (list file) <> | 282 | (cute export-paths store (list file) <> |
| 283 | #:sign? #f)))) | 283 | #:sign? #f)))) |
