update master-with-bazel from master branch
diff --git a/src/crypto/bio/bio_test.cc b/src/crypto/bio/bio_test.cc
index 075de0e..324f36f 100644
--- a/src/crypto/bio/bio_test.cc
+++ b/src/crypto/bio/bio_test.cc
@@ -639,8 +639,8 @@
check_bio_gets(bio.get());
}
- if (!SkipTempFileTests()) {
- TemporaryFile file;
+ if (!bssl::SkipTempFileTests()) {
+ bssl::TemporaryFile file;
ASSERT_TRUE(file.Init(t.bio));
// TODO(crbug.com/boringssl/585): If the line has an embedded NUL, file
@@ -660,7 +660,7 @@
check_bio_gets(bio.get());
// Test |BIO_NOCLOSE|.
- ScopedFILE file_obj = file.Open("rb");
+ bssl::ScopedFILE file_obj = file.Open("rb");
ASSERT_TRUE(file_obj);
bio.reset(BIO_new_fp(file_obj.get(), BIO_NOCLOSE));
ASSERT_TRUE(bio);
@@ -679,7 +679,7 @@
SCOPED_TRACE("fd");
// Test |BIO_NOCLOSE|.
- ScopedFD fd = file.OpenFD(kOpenReadOnlyBinary);
+ bssl::ScopedFD fd = file.OpenFD(kOpenReadOnlyBinary);
ASSERT_TRUE(fd.is_valid());
bssl::UniquePtr<BIO> bio(BIO_new_fd(fd.get(), BIO_NOCLOSE));
ASSERT_TRUE(bio);
@@ -707,11 +707,11 @@
// Test that, on Windows, file BIOs correctly handle text vs binary mode.
TEST(BIOTest, FileMode) {
- if (SkipTempFileTests()) {
+ if (bssl::SkipTempFileTests()) {
GTEST_SKIP();
}
- TemporaryFile temp;
+ bssl::TemporaryFile temp;
ASSERT_TRUE(temp.Init("hello\r\nworld"));
auto expect_file_contents = [](BIO *bio, const std::string &str) {
@@ -748,7 +748,7 @@
expect_text_mode(bio.get());
// |BIO_new_fp| inherits the file's existing mode by default.
- ScopedFILE file = temp.Open("rb");
+ bssl::ScopedFILE file = temp.Open("rb");
ASSERT_TRUE(file);
bio.reset(BIO_new_fp(file.get(), BIO_NOCLOSE));
ASSERT_TRUE(bio);
@@ -775,7 +775,7 @@
expect_text_mode(bio.get());
// |BIO_new_fd| inherits the FD's existing mode.
- ScopedFD fd = temp.OpenFD(kOpenReadOnlyBinary);
+ bssl::ScopedFD fd = temp.OpenFD(kOpenReadOnlyBinary);
ASSERT_TRUE(fd.is_valid());
bio.reset(BIO_new_fd(fd.get(), BIO_NOCLOSE));
ASSERT_TRUE(bio);
diff --git a/src/crypto/test/file_util.cc b/src/crypto/test/file_util.cc
index f593e1d..71c58b7 100644
--- a/src/crypto/test/file_util.cc
+++ b/src/crypto/test/file_util.cc
@@ -31,6 +31,8 @@
#include "test_util.h"
+BSSL_NAMESPACE_BEGIN
+
#if defined(OPENSSL_WINDOWS)
static void PrintLastError(const char *s) {
DWORD error = GetLastError();
@@ -237,3 +239,5 @@
files_.insert(filename);
return true;
}
+
+BSSL_NAMESPACE_END
diff --git a/src/crypto/test/file_util.h b/src/crypto/test/file_util.h
index 0fd8d85..ee994b1 100644
--- a/src/crypto/test/file_util.h
+++ b/src/crypto/test/file_util.h
@@ -31,6 +31,8 @@
#endif
+BSSL_NAMESPACE_BEGIN
+
struct FileDeleter {
void operator()(FILE *f) const {
if (f != nullptr) {
@@ -159,4 +161,6 @@
std::set<std::string> files_;
};
+BSSL_NAMESPACE_END
+
#endif // OPENSSL_HEADER_CRYPTO_TEST_FILE_UTIL_H
diff --git a/src/crypto/test/test_data.cc b/src/crypto/test/test_data.cc
index 9db2019..f0e6922 100644
--- a/src/crypto/test/test_data.cc
+++ b/src/crypto/test/test_data.cc
@@ -49,7 +49,7 @@
full_path.append(path);
#endif
- ScopedFILE file(fopen(full_path.c_str(), "rb"));
+ bssl::ScopedFILE file(fopen(full_path.c_str(), "rb"));
if (file == nullptr) {
fprintf(stderr, "Could not open '%s'.\n", full_path.c_str());
abort();
diff --git a/src/crypto/x509/x509_test.cc b/src/crypto/x509/x509_test.cc
index ffbcf7b..ab107c7 100644
--- a/src/crypto/x509/x509_test.cc
+++ b/src/crypto/x509/x509_test.cc
@@ -8011,7 +8011,7 @@
}
int type_;
- TemporaryDirectory dir_;
+ bssl::TemporaryDirectory dir_;
std::map<uint32_t, int> next_cert_;
std::map<uint32_t, int> next_crl_;
};
@@ -8019,7 +8019,7 @@
// TODO(davidben): Also test CRL handling. There are some interesting behaviors
// in here.
TEST(X509Test, DirHash) {
- if (SkipTempFileTests()) {
+ if (bssl::SkipTempFileTests()) {
GTEST_SKIP();
}
@@ -8266,7 +8266,7 @@
const char kSeparator = ':';
#endif
- if (SkipTempFileTests()) {
+ if (bssl::SkipTempFileTests()) {
GTEST_SKIP();
}
@@ -8330,7 +8330,7 @@
#if defined(OPENSSL_THREADS)
// Test that directory hash lookup is thread-safe.
TEST(X509Test, DirHashThreads) {
- if (SkipTempFileTests()) {
+ if (bssl::SkipTempFileTests()) {
GTEST_SKIP();
}