Properly destroy ChrootEnv in env_test

Summary: see title

Test Plan:
  $ /mnt/gvfs/third-party2/valgrind/af85c56f424cd5edfc2c97588299b44ecdec96bb/3.10.0/gcc-4.9-glibc-2.20/e9936bf/bin/valgrind --error-exitcode=2 --leak-check=full ./env_test

Reviewers: IslamAbdelRahman, sdong

Reviewed By: sdong

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D57897
main
Andrew Kryczka 9 years ago
parent fca5aa6fcc
commit 258459ed54
  1. 5
      util/env_test.cc

@ -1063,9 +1063,10 @@ TEST_P(EnvPosixTestWithParam, WritableFileWrapper) {
INSTANTIATE_TEST_CASE_P(DefaultEnv, EnvPosixTestWithParam, INSTANTIATE_TEST_CASE_P(DefaultEnv, EnvPosixTestWithParam,
::testing::Values(Env::Default())); ::testing::Values(Env::Default()));
#if !defined(ROCKSDB_LITE) && !defined(OS_WIN) #if !defined(ROCKSDB_LITE) && !defined(OS_WIN)
static unique_ptr<Env> chroot_env(NewChrootEnv(Env::Default(),
test::TmpDir(Env::Default())));
INSTANTIATE_TEST_CASE_P(ChrootEnv, EnvPosixTestWithParam, INSTANTIATE_TEST_CASE_P(ChrootEnv, EnvPosixTestWithParam,
::testing::Values(NewChrootEnv(Env::Default(), ::testing::Values(chroot_env.get()));
"/tmp")));
#endif // !defined(ROCKSDB_LITE) && !defined(OS_WIN) #endif // !defined(ROCKSDB_LITE) && !defined(OS_WIN)
} // namespace rocksdb } // namespace rocksdb

Loading…
Cancel
Save