Merge "Require getrandom(2)."

This commit is contained in:
Treehugger Robot 2017-09-29 17:48:26 +00:00 committed by Gerrit Code Review
commit b93f2631e4
1 changed files with 0 additions and 15 deletions

View File

@ -72,11 +72,6 @@ TEST(sys_random, getentropy_EIO) {
TEST(sys_random, getrandom) {
#if defined(HAVE_SYS_RANDOM)
if (getrandom(nullptr, 0, 0) == -1 && errno == ENOSYS) {
GTEST_LOG_(INFO) << "This test requires a >= 3.17 kernel with getrandom(2).\n";
return;
}
char buf1[64];
char buf2[64];
@ -90,11 +85,6 @@ TEST(sys_random, getrandom) {
TEST(sys_random, getrandom_EFAULT) {
#if defined(HAVE_SYS_RANDOM)
if (getrandom(nullptr, 0, 0) == -1 && errno == ENOSYS) {
GTEST_LOG_(INFO) << "This test requires a >= 3.17 kernel with getrandom(2).\n";
return;
}
errno = 0;
ASSERT_EQ(-1, getrandom(nullptr, 256, 0));
ASSERT_EQ(EFAULT, errno);
@ -105,11 +95,6 @@ TEST(sys_random, getrandom_EFAULT) {
TEST(sys_random, getrandom_EINVAL) {
#if defined(HAVE_SYS_RANDOM)
if (getrandom(nullptr, 0, 0) == -1 && errno == ENOSYS) {
GTEST_LOG_(INFO) << "This test requires a >= 3.17 kernel with getrandom(2).\n";
return;
}
errno = 0;
char buf[64];
ASSERT_EQ(-1, getrandom(buf, sizeof(buf), ~0));