summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/stat.cc
diff options
context:
space:
mode:
authorAdam Barth <abarth@google.com>2021-08-03 19:51:37 -0700
committergVisor bot <gvisor-bot@google.com>2021-08-03 19:54:35 -0700
commit681e5419042ba6b00d50c82d64c0d556e28de0c7 (patch)
treecb0cc3aa59a2661e652b83c608bcd84641300c30 /test/syscalls/linux/stat.cc
parent8caf231cb14128938a08208a0580e37e20be1fc1 (diff)
Use GetAbsoluteTestTmpdir() rather than hard-code "/tmp"
This change makes these tests easier to run on systems that have their temp directory in another location. PiperOrigin-RevId: 388601202
Diffstat (limited to 'test/syscalls/linux/stat.cc')
-rw-r--r--test/syscalls/linux/stat.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/syscalls/linux/stat.cc b/test/syscalls/linux/stat.cc
index 72f888659..19dc80d0c 100644
--- a/test/syscalls/linux/stat.cc
+++ b/test/syscalls/linux/stat.cc
@@ -765,7 +765,7 @@ TEST_F(StatTest, StatxSymlink) {
SKIP_IF(!IsRunningOnGvisor() && statx(-1, nullptr, 0, 0, nullptr) < 0 &&
errno == ENOSYS);
- std::string parent_dir = "/tmp";
+ std::string parent_dir = GetAbsoluteTestTmpdir();
TempPath link = ASSERT_NO_ERRNO_AND_VALUE(
TempPath::CreateSymlinkTo(parent_dir, test_file_name_));
std::string p = link.path();