aboutsummaryrefslogtreecommitdiff
path: root/util/env_posix_test.cc
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2022-02-17 14:11:18 +0800
committerKunoiSayami <[email protected]>2022-02-17 14:11:18 +0800
commit74c563f94e4b02779465ead2b2dbce0db59e352a (patch)
tree64e747bfa7b46274a34b6c7787a7233ceafba846 /util/env_posix_test.cc
parente98fc6bf301bb3bf38aab4ccce51edc16953024b (diff)
merge: Merge remote-tracking branch google/main@4fb1468
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'util/env_posix_test.cc')
-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));