Lines Matching refs:linkname
198 char linkname[255]; in TEST() local
200 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
202 ASSERT_EQ(0, symlink(tf.path, linkname)); in TEST()
203 ASSERT_EQ(0, fchmodat(AT_FDCWD, linkname, 0751, 0)); in TEST()
205 unlink(linkname); in TEST()
210 char linkname[255]; in TEST() local
213 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
216 ASSERT_EQ(0, symlink(target, linkname)); in TEST()
217 ASSERT_EQ(-1, fchmodat(AT_FDCWD, linkname, 0751, 0)); in TEST()
219 unlink(linkname); in TEST()
222 static void AssertSymlinkModeEquals(mode_t expected_mode, const char* linkname) { in AssertSymlinkModeEquals() argument
224 ASSERT_EQ(0, fstatat(AT_FDCWD, linkname, &sb, AT_SYMLINK_NOFOLLOW)); in AssertSymlinkModeEquals()
234 char linkname[255]; in TEST() local
235 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
237 ASSERT_EQ(0, symlink(tf.path, linkname)); in TEST()
238 int result = fchmodat(AT_FDCWD, linkname, 0751, AT_SYMLINK_NOFOLLOW); in TEST()
241 AssertSymlinkModeEquals(0751, linkname); in TEST()
249 unlink(linkname); in TEST()
255 char linkname[255]; in TEST() local
257 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
260 ASSERT_EQ(0, symlink(target, linkname)); in TEST()
261 int result = fchmodat(AT_FDCWD, linkname, 0751, AT_SYMLINK_NOFOLLOW); in TEST()
264 AssertSymlinkModeEquals(0751, linkname); in TEST()
270 unlink(linkname); in TEST()