diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-05-07 00:16:01 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-05-07 00:18:36 +0200 |
commit | 1a0adad83f804d1d7190af7accb58284e4c69e3e (patch) | |
tree | 6a1c1e1deb645cb4caa0c488000c757bfcc77a0d /tests/store.scm | |
parent | 33349e91f967883513a68ec824ab68e78aee528d (diff) | |
download | guix-1a0adad83f804d1d7190af7accb58284e4c69e3e.tar.gz |
tests: Corrupt archive import test is robust against different store prefixes.
* tests/store.scm ("import corrupt path"): Set 'index' to #x70.
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/store.scm b/tests/store.scm index 3eb8b7be5a..45aeb329b0 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -758,8 +758,9 @@ (cut export-paths %store (list file) <>)))) (delete-paths %store (list file)) - ;; Flip a bit in the stream's payload. - (let* ((index (quotient (bytevector-length dump) 4)) + ;; Flip a bit in the stream's payload. INDEX here falls in the middle of + ;; the file contents in DUMP, regardless of the store prefix. + (let* ((index #x70) (byte (bytevector-u8-ref dump index))) (bytevector-u8-set! dump index (logxor #xff byte))) |