summaryrefslogtreecommitdiff
path: root/test-getrandom-fallbacks.c
AgeCommit message (Collapse)AuthorFilesLines
2018-09-07Fix formatting and indentation.Björn Esser1-1/+2
2018-07-13test-getrandom-fallbacks.c: only wrap open64 if it exists.Zack Weinberg1-0/+2
This is largely a theoretical problem at the moment, but very old C libraries (with no support for 64-bit file offsets at all) don't provide a function called open64, and very *new* C libraries for exclusively 64-bit environments (where the possibility of a 32-bit off_t has never existed) might do the same.
2018-07-13Fix several test failures on x86-64 with -m32.Zack Weinberg1-0/+13
- more fixes for crypt-sunmd5.c when 'unsigned long' and 'unsigned int' are the same - test-getrandom-fallbacks needs to interpose open64 as well as open - test-short-outbuf.c can use %zu instead of %lu to avoid casting - glibc for x86-64/-m32 uses the same symbol versions as glibc/i386 also, libcrypt.minver is now in alphabetical order by host_cpu pattern within each block of architectures with the same minimum symbol version.
2018-07-12Add tests for get_random_bytes.Zack Weinberg1-0/+282
It turns out not to be *that* hard to exercise the fallback logic in get_random_bytes, thanks to GNU ld's --wrap feature. There is also some basic black-box testing of the get_random_bytes interface. The change to randombytes.c itself ensures 100% predictable behavior if get_random_bytes should ever be called with buflen zero.