diff --git a/fboss/agent/test/link_tests/SpeedChangeTest.cpp b/fboss/agent/test/link_tests/SpeedChangeTest.cpp index 77d698b2c13f6..bdc2867f86967 100644 --- a/fboss/agent/test/link_tests/SpeedChangeTest.cpp +++ b/fboss/agent/test/link_tests/SpeedChangeTest.cpp @@ -206,9 +206,8 @@ void SpeedChangeTest::setupConfigFlag() { originalConfigCopy = linkTestDir + "/agent_speed_change_test_original_config.conf"; - // Create a copy of the original config if we haven't created one before. - if (!boost::filesystem::exists(originalConfigCopy)) { - // Likely a coldboot iteration + // Create a copy of the original config during coldboot + if (sw()->getBootType() == BootType::COLD_BOOT) { utilCreateDir(linkTestDir); boost::filesystem::copy_file(FLAGS_config, originalConfigCopy); }