From e70003736e85fac98058f513eb570fe364675e06 Mon Sep 17 00:00:00 2001 From: mberenjk <146776561+mberenjk@users.noreply.github.com> Date: Wed, 7 May 2025 13:58:27 -0500 Subject: [PATCH] Write JSON file to /tmp directory to avoid incorrect write access in recorderTest (#1680) Co-authored-by: Marzieh Berenjkoub --- test/_RecorderTests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/_RecorderTests.cpp b/test/_RecorderTests.cpp index ff354870d5..970cf1315b 100644 --- a/test/_RecorderTests.cpp +++ b/test/_RecorderTests.cpp @@ -25,7 +25,7 @@ namespace RcclUnitTesting * ******************************************************************************************/ TEST(Recorder, ParseJson) { - setenv("RCCL_REPLAY_FILE", "test.json", 1); + setenv("RCCL_REPLAY_FILE", "/tmp/test.json", 1); int pid = getpid(); hipStream_t stream; @@ -40,7 +40,7 @@ namespace RcclUnitTesting char entry[4096]; //parse the outfile std::string filename = "test" + std::to_string(pid) + ".json"; - std::ifstream fp("test" + std::to_string(pid) + ".json"); + std::ifstream fp("/tmp/test" + std::to_string(pid) + ".json"); fp.getline(entry, 4096); fp.getline(entry, 4096); fp.getline(entry, 4096);