From 681e5419042ba6b00d50c82d64c0d556e28de0c7 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 3 Aug 2021 19:51:37 -0700 Subject: 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 --- test/syscalls/linux/lseek.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/syscalls/linux/lseek.cc') diff --git a/test/syscalls/linux/lseek.cc b/test/syscalls/linux/lseek.cc index d4f89527c..dbc21833f 100644 --- a/test/syscalls/linux/lseek.cc +++ b/test/syscalls/linux/lseek.cc @@ -121,7 +121,8 @@ TEST(LseekTest, InvalidFD) { } TEST(LseekTest, DirCurEnd) { - const FileDescriptor fd = ASSERT_NO_ERRNO_AND_VALUE(Open("/tmp", O_RDONLY)); + const FileDescriptor fd = ASSERT_NO_ERRNO_AND_VALUE( + Open(GetAbsoluteTestTmpdir().c_str(), O_RDONLY)); ASSERT_THAT(lseek(fd.get(), 0, SEEK_CUR), SyscallSucceedsWithValue(0)); } -- cgit v1.2.3