From 23f8e8481678593b83842b58306e2e960752ff4a Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 11 Aug 2021 16:18:52 -0700 Subject: Fix LinkTest.OldnameDoesNotExist Previous, this test was the same as OldnameIsEmpty. This CL makes the test check what happens if the old name does not exist. PiperOrigin-RevId: 390243070 --- test/syscalls/linux/link.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/syscalls/linux/link.cc b/test/syscalls/linux/link.cc index 4f9ca1a65..8b208f99a 100644 --- a/test/syscalls/linux/link.cc +++ b/test/syscalls/linux/link.cc @@ -142,7 +142,8 @@ TEST(LinkTest, OldnameIsEmpty) { TEST(LinkTest, OldnameDoesNotExist) { const std::string oldname = NewTempAbsPath(); const std::string newname = NewTempAbsPath(); - EXPECT_THAT(link("", newname.c_str()), SyscallFailsWithErrno(ENOENT)); + EXPECT_THAT(link(oldname.c_str(), newname.c_str()), + SyscallFailsWithErrno(ENOENT)); } TEST(LinkTest, NewnameCannotExist) { -- cgit v1.2.3