diff --git a/src/test/validation_tests.cpp b/src/test/validation_tests.cpp --- a/src/test/validation_tests.cpp +++ b/src/test/validation_tests.cpp @@ -28,14 +28,20 @@ return block; } -BOOST_FIXTURE_TEST_SUITE(validation_tests, BasicTestingSetup) +BOOST_FIXTURE_TEST_SUITE(validation_tests, TestingSetup) /** Test that LoadExternalBlockFile works with the buffer size set below the size of a large block. Currently, LoadExternalBlockFile has the buffer size for CBufferedFile set to 2 * MAX_TX_SIZE. Test with a value of 10 * MAX_TX_SIZE. */ BOOST_AUTO_TEST_CASE(validation_load_external_block_file) { - FILE *fp = tmpfile(); + boost::filesystem::path tmpfile_name = + pathTemp / strprintf("vlebf_test_%lu_%i", (unsigned long)GetTime(), + (int)(GetRand(100000))); + + FILE *fp = fopen(tmpfile_name.string().c_str(), "wb+"); + + BOOST_CHECK(fp != nullptr); const Config &config = GetConfig(); const CChainParams &chainparams = config.GetChainParams();