Skip ForkDetect tests on iOS iOS cannot actually fork. Since they have pthread_atfork, we set that up anyway just in case, but since fork will just fail, we should skip the tests. Change-Id: I05f34e13fae84f65f950cd0d71e238ed0366b98e Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/63765 Commit-Queue: Adam Langley <agl@google.com> Auto-Submit: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/fipsmodule/rand/fork_detect_test.cc b/crypto/fipsmodule/rand/fork_detect_test.cc index f51530a..f9cde28 100644 --- a/crypto/fipsmodule/rand/fork_detect_test.cc +++ b/crypto/fipsmodule/rand/fork_detect_test.cc
@@ -18,7 +18,8 @@ // TSAN cannot cope with this test and complains that "starting new threads // after multi-threaded fork is not supported". -#if defined(OPENSSL_FORK_DETECTION) && !defined(OPENSSL_TSAN) +#if defined(OPENSSL_FORK_DETECTION) && !defined(OPENSSL_TSAN) && \ + !defined(OPENSSL_IOS) #include <errno.h> #include <inttypes.h> #include <stdio.h> @@ -173,4 +174,4 @@ EXPECT_EQ(start, CRYPTO_get_fork_generation()); } -#endif // OPENSSL_FORK_DETECTION && !OPENSSL_TSAN +#endif // OPENSSL_FORK_DETECTION && !OPENSSL_TSAN && !OPENSSL_IOS