~ruther/guix-local

1a0adad83f804d1d7190af7accb58284e4c69e3e — Ludovic Courtès 8 years ago 33349e9
tests: Corrupt archive import test is robust against different store prefixes.

* tests/store.scm ("import corrupt path"): Set 'index' to #x70.
1 files changed, 3 insertions(+), 2 deletions(-)

M tests/store.scm
M tests/store.scm => tests/store.scm +3 -2
@@ 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)))