diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-08-26 06:57:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-08-26 06:57:30 -0700 |
commit | 4822593b544baed61f0a3fa954d058dac66cc892 (patch) | |
tree | c760e94b36b19c2dd195aeef95f2d5d60fb84a22 | |
parent | 80e1285c1051201d1ca33207635b908b64cef293 (diff) | |
download | txr-4822593b544baed61f0a3fa954d058dac66cc892.tar.gz txr-4822593b544baed61f0a3fa954d058dac66cc892.tar.bz2 txr-4822593b544baed61f0a3fa954d058dac66cc892.zip |
mmap test: bug: random buffer generation.
* tests/017/mmap.tl: The random buffer procedure can generate
buffers which are too small, because the random integer values
are anywhere from 0 to the modulus. This showed up up on
PPC-64 with 65536 byte pages.
-rw-r--r-- | tests/017/mmap.tl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/017/mmap.tl b/tests/017/mmap.tl index 818540a5..639e256c 100644 --- a/tests/017/mmap.tl +++ b/tests/017/mmap.tl @@ -27,7 +27,8 @@ (assert (plusp page-size)) -(let* ((mk-rnd-buf (opip (expt 256 page-size) rand buf-uint)) +(let* ((buf-mod (trunc (expt 256 page-size) 2)) + (mk-rnd-buf (ret (flow buf-mod rand (+ buf-mod) buf-uint))) (rndbuf0 [mk-rnd-buf]) (rndbuf1 [mk-rnd-buf]) (fname "rand.bin")) |