Home
last modified time | relevance | path

Searched refs:tmpFile (Results 1 – 15 of 15) sorted by relevance

/openbmc/phosphor-logging/test/openpower-pels/
H A Dtemporary_file_test.cpp75 tmpFile = new TemporaryFile(buf.c_str(), size); in SetUp()
84 std::filesystem::remove_all(tmpFile->getPath()); in TearDown()
85 delete tmpFile; in TearDown()
92 TemporaryFile* tmpFile; member in TemporaryFileTests
100 fs::path path = tmpFile->getPath(); in TEST_F()
131 EXPECT_FALSE(tmpFile->getPath().empty()); in TEST_F()
132 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()
135 fs::path path = tmpFile->getPath(); in TEST_F()
138 TemporaryFile file{std::move(*tmpFile)}; in TEST_F()
141 EXPECT_TRUE(tmpFile->getPath().empty()); in TEST_F()
[all …]
/openbmc/phosphor-fan-presence/
H A Dlogger.hpp129 char tmpFile[] = "/tmp/loggertemp.XXXXXX"; in saveToTempFile() local
130 util::FileDescriptor fd{mkstemp(tmpFile)}; in saveToTempFile()
136 std::filesystem::path path{tmpFile}; in saveToTempFile()
146 "Could not write to temp file {} errno {}", tmpFile, e); in saveToTempFile()
152 return std::filesystem::path{tmpFile}; in saveToTempFile()
/openbmc/phosphor-host-ipmid/user_channel/
H A Dcipher_mgmt.cpp121 std::string tmpFile = in writeCSPrivilegeLevels() local
124 std::vector<char> tmpRandomFile(tmpFile.length() + 1); in writeCSPrivilegeLevels()
125 strncpy(tmpRandomFile.data(), tmpFile.c_str(), tmpFile.length() + 1); in writeCSPrivilegeLevels()
133 "FILE_NAME", tmpFile); in writeCSPrivilegeLevels()
142 "FILE_NAME", tmpFile); in writeCSPrivilegeLevels()
151 "FILE_NAME", tmpFile); in writeCSPrivilegeLevels()
H A Dchannel_mgmt.cpp832 const std::string tmpFile = configFile + "_tmp"; in writeJsonFile() local
833 int fd = open(tmpFile.c_str(), O_CREAT | O_WRONLY | O_TRUNC | O_SYNC, in writeJsonFile()
838 tmpFile); in writeJsonFile()
847 "FILE_NAME", tmpFile); in writeJsonFile()
852 if (std::rename(tmpFile.c_str(), configFile.c_str()) != 0) in writeJsonFile()
855 "FILE_NAME", tmpFile); in writeJsonFile()
H A Duser_mgmt.cpp1398 static std::string tmpFile{std::string(ipmiUserDataFile) + "_tmp"}; in writeUserData() local
1399 int fd = open(tmpFile.c_str(), O_CREAT | O_WRONLY | O_TRUNC | O_SYNC, in writeUserData()
1418 if (std::rename(tmpFile.c_str(), ipmiUserDataFile) != 0) in writeUserData()
/openbmc/pldm/oem/ibm/libpldmresponder/
H A Dfile_io_type_pel.cpp202 char tmpFile[] = "/tmp/pel.XXXXXX"; in writeFromMemory() local
203 int fd = mkstemp(tmpFile); in writeFromMemory()
211 fs::path path(tmpFile); in writeFromMemory()
358 char tmpFile[] = "/tmp/pel.XXXXXX"; in write() local
359 auto fd = mkstemp(tmpFile); in write()
384 fs::remove(tmpFile); in write()
390 fs::path path(tmpFile); in write()
396 "RC", rc, "FILE", tmpFile); in write()
/openbmc/openpower-proc-control/procedures/phal/
H A Dreinit_devtree.cpp150 openpower::util::TemporaryFile tmpFile{}; in reinitDevtree() local
154 FILE_Ptr fpExport(fopen(tmpFile.getPath().c_str(), "w+"), in reinitDevtree()
161 tmpFile.getPath().c_str()) in reinitDevtree()
187 FILE_Ptr fpImport(fopen(tmpFile.getPath().c_str(), "r"), FileCloser()); in reinitDevtree()
192 tmpFile.getPath().c_str()) in reinitDevtree()
/openbmc/phosphor-user-manager/test/
H A Duser_mgr_test.cpp416 std::string tmpFile = tempPWQualityConfigFile + "_tmp"; in TEST_F() local
417 EXPECT_FALSE(std::filesystem::exists(tmpFile)); in TEST_F()
421 tmpFile = tempFaillockConfigFile + "_tmp"; in TEST_F()
422 EXPECT_FALSE(std::filesystem::exists(tmpFile)); in TEST_F()
427 tmpFile = tempPWHistoryConfigFile + "_tmp"; in TEST_F()
428 EXPECT_FALSE(std::filesystem::exists(tmpFile)); in TEST_F()
492 std::string tmpFile = tempPWQualityConfigFile + "_tmp"; in TEST_F() local
493 EXPECT_FALSE(std::filesystem::exists(tmpFile)); in TEST_F()
499 EXPECT_FALSE(std::filesystem::exists(tmpFile)); in TEST_F()
504 tmpFile = tempFaillockConfigFile + "_tmp"; in TEST_F()
[all …]
/openbmc/phosphor-bmc-code-mgmt/bmc/
H A Dobmc-flash-bmc510 tmpFile="$(mktemp /tmp/ubootdev.XXXXXX)"
511 dd if="${device}" of="${tmpFile}"
512 devSum="$(sha256sum "${tmpFile}")"
513 cat < "${image}" 1<> "${tmpFile}"
514 imgSum="$(sha256sum "${tmpFile}")"
515 rm -f "${tmpFile}"
/openbmc/service-config-manager/src/
H A Dsrvcfg_manager.cpp409 std::string tmpFile{ovrCfgFile + "_tmp"}; in stopAndApplyUnitConfig() local
410 std::ofstream cfgFile(tmpFile, std::ios::out); in stopAndApplyUnitConfig()
414 tmpFile); in stopAndApplyUnitConfig()
427 if (std::rename(tmpFile.c_str(), ovrCfgFile.c_str()) != 0) in stopAndApplyUnitConfig()
430 "TMPFILE", tmpFile, "OVERCFGFILE", ovrCfgFile); in stopAndApplyUnitConfig()
431 std::remove(tmpFile.c_str()); in stopAndApplyUnitConfig()
/openbmc/phosphor-fan-presence/monitor/
H A Dfan_error.cpp176 char tmpFile[] = "/tmp/fanffdc.XXXXXX"; in makeJsonFFDCFile() local
177 auto fd = mkstemp(tmpFile); in makeJsonFFDCFile()
186 fs::path jsonFile{tmpFile}; in makeJsonFFDCFile()
/openbmc/openpower-occ-control/
H A Docc_ffdc.cpp262 std::string tmpFile = fs::temp_directory_path() / "OCC_JOURNAL_XXXXXX"; in makeJsonFFDCFile() local
263 auto fd = mkostemp(tmpFile.data(), O_RDWR); in makeJsonFFDCFile()
271 fs::path jsonFile{tmpFile}; in makeJsonFFDCFile()
/openbmc/openbmc/poky/meta/lib/oeqa/core/target/
H A Dserial.py187 tmpFile = os.path.join(root, f).replace(localSrc, "")
188 dstFile = os.path.join(remoteDst, tmpFile.lstrip("/"))
H A Dssh.py145 tmpFile = os.path.join(root, f).replace(localSrc, "")
146 dstFile = os.path.join(remoteDst, tmpFile.lstrip("/"))
/openbmc/phosphor-power/phosphor-regulators/test/
H A Dvalidate-regulators-config_tests.cpp152 TemporaryFile tmpFile; in runToolForOutputWithCommand() local
153 command += " 2> " + tmpFile.getPath().string(); in runToolForOutputWithCommand()
183 std::ifstream input(tmpFile.getPath()); in runToolForOutputWithCommand()
234 TemporaryFile tmpFile; in expectJsonValid() local
235 std::string fileName = tmpFile.getPath().string(); in expectJsonValid()
245 TemporaryFile tmpFile; in expectJsonInvalid() local
246 std::string fileName = tmpFile.getPath().string(); in expectJsonInvalid()
3314 TemporaryFile tmpFile; in TEST() local
3315 std::string fileName = tmpFile.getPath().string(); in TEST()