getentropy
int getentropy(void *, size_t);
__weak_alias(getentropy,_getentropy)
ATF_CHECK_ERRNO(EINVAL, getentropy(buf, 257) == -1);
ATF_CHECK_ERRNO(EFAULT, getentropy(NULL, 32) == -1);
ATF_CHECK_ERRNO(EFAULT, getentropy((char *)(uintptr_t)1, 32) == -1);
if (getentropy(p + pagesize - 25, 25) == -1)
ATF_CHECK_ERRNO(EFAULT, getentropy(p + pagesize - 1, 2) == -1);
ATF_CHECK_ERRNO(EFAULT, getentropy(p + pagesize, 32) == -1);
ATF_CHECK_ERRNO(EFAULT, getentropy(p + 2*pagesize - 1, 2) == -1);
if (getentropy(p + 2*pagesize, 25) == -1)
if (getentropy(buf, 0) == -1)
if (getentropy(buf + 1, 32) == -1)
if (getentropy(buf + 1, 256) == -1)