summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Costan <pwnall@chromium.org>2022-01-10 02:29:08 +0000
committerVictor Costan <pwnall@chromium.org>2022-01-10 02:29:08 +0000
commit8f5aa6375e65bc3aa423cb3cca41d2692c408a7d (patch)
tree69cc6341f1a2e34720c76cc64a4f04454513d346
parent7a2f90460afcd601e12a1ede3f84c518de091a73 (diff)
parent8949158f5d7264444e5b04530c92e9cc524499c4 (diff)
downloadleveldb-8f5aa6375e65bc3aa423cb3cca41d2692c408a7d.tar.gz
Merge pull request #919 from wineway:fix_posix_test
PiperOrigin-RevId: 420644954
-rw-r--r--util/env_posix_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/env_posix_test.cc b/util/env_posix_test.cc
index da264f0..34bda62 100644
--- a/util/env_posix_test.cc
+++ b/util/env_posix_test.cc
@@ -243,8 +243,8 @@ TEST_F(EnvPosixTest, TestCloseOnExecRandomAccessFile) {
// Exhaust the RandomAccessFile mmap limit. This way, the test
// RandomAccessFile instance below is backed by a file descriptor, not by an
// mmap region.
- leveldb::RandomAccessFile* mmapped_files[kReadOnlyFileLimit] = {nullptr};
- for (int i = 0; i < kReadOnlyFileLimit; i++) {
+ leveldb::RandomAccessFile* mmapped_files[kMMapLimit];
+ for (int i = 0; i < kMMapLimit; i++) {
ASSERT_LEVELDB_OK(env_->NewRandomAccessFile(file_path, &mmapped_files[i]));
}
@@ -253,7 +253,7 @@ TEST_F(EnvPosixTest, TestCloseOnExecRandomAccessFile) {
CheckCloseOnExecDoesNotLeakFDs(open_fds);
delete file;
- for (int i = 0; i < kReadOnlyFileLimit; i++) {
+ for (int i = 0; i < kMMapLimit; i++) {
delete mmapped_files[i];
}
ASSERT_LEVELDB_OK(env_->RemoveFile(file_path));