#1148754 golang-github-peterbourgon-diskv: compression tests FTBFS with Go 1.27 (patch)

#1148754#5
Date:
2026-09-23 06:27:59 UTC
From:
To:
Dear Maintainer,

In Ubuntu we hit an FTBFS of golang-github-peterbourgon-diskv when the
package is built with Go 1.27:

The compression tests fill a 4 KiB buffer with random bytes in {a-z}
(seeded from the clock) and assert that every flate level shrinks it.
Random data over 26 symbols has no LZ77 back-references, and Go 1.27's
fast flate encoders (levels 1-8) now emit stored (uncompressed) blocks
in that case, so the compressed output can be >= the input and the test
fails non-deterministically.

The attached patch (debian/patches/go1.27-compressible-data.patch)
replaces the payload with deterministic runs of repeated bytes, which
compress reliably at every flate level while still exercising the
compress/decompress round-trip. With Go 1.27 the gzip/deflate
compression tests pass consistently (verified over repeated runs).

The fix has also been forwarded upstream:
https://github.com/peterbourgon/diskv/pull/80

Ubuntu bug for reference:
https://bugs.launchpad.net/bugs/2164597

Thanks for considering.