作者: 谢瑞阳 10225101483 徐翔宇 10225101535
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

30 rindas
1.0 KiB

  1. // Copyright 2018 (c) The LevelDB Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file. See the AUTHORS file for names of contributors.
  4. #ifndef STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_
  5. #define STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_
  6. namespace leveldb {
  7. class EnvWindowsTest;
  8. // A helper for the Windows Env to facilitate testing.
  9. class EnvWindowsTestHelper {
  10. private:
  11. friend class CorruptionTest;
  12. friend class EnvWindowsTest;
  13. // Set the maximum number of read-only files that will be mapped via mmap.
  14. // Must be called before creating an Env.
  15. static void SetReadOnlyMMapLimit(int limit);
  16. // Relax file permissions for tests. This results in most files being opened
  17. // with read-write permissions. This is helpful for corruption tests that
  18. // need to corrupt the database files for open databases.
  19. static void RelaxFilePermissions();
  20. };
  21. } // namespace leveldb
  22. #endif // STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_