Disable RandTest.Fork on iOS.

iOS doesn't support fork.

Bug: chromium:890115
Change-Id: Idac6c0e180bbc1088ca5c562b8c1e646bff00b25
Reviewed-on: https://boringssl-review.googlesource.com/32164
Reviewed-by: Steven Valdez <svaldez@google.com>
This commit is contained in:
David Benjamin 2018-09-28 10:12:35 -05:00 committed by Steven Valdez
parent 8d2f4b993f
commit 13fd627449
2 changed files with 7 additions and 2 deletions

View File

@ -50,7 +50,8 @@ TEST(RandTest, NotObviouslyBroken) {
EXPECT_NE(Bytes(buf2), Bytes(kZeros));
}
#if !defined(OPENSSL_WINDOWS) && !defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE)
#if !defined(OPENSSL_WINDOWS) && !defined(OPENSSL_IOS) && \
!defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE)
static bool ForkAndRand(bssl::Span<uint8_t> out) {
int pipefds[2];
if (pipe(pipefds) < 0) {
@ -144,7 +145,8 @@ TEST(RandTest, Fork) {
EXPECT_NE(Bytes(buf2), Bytes(kZeros));
EXPECT_NE(Bytes(buf3), Bytes(kZeros));
}
#endif // !OPENSSL_WINDOWS && !BORINGSSL_UNSAFE_DETERMINISTIC_MODE
#endif // !OPENSSL_WINDOWS && !OPENSSL_IOS &&
// !BORINGSSL_UNSAFE_DETERMINISTIC_MODE
#if defined(OPENSSL_THREADS)
static void RunConcurrentRands(size_t num_threads) {

View File

@ -120,6 +120,9 @@ extern "C" {
#if defined(__APPLE__)
#define OPENSSL_APPLE
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#define OPENSSL_IOS
#endif
#endif
#if defined(_WIN32)