Lines Matching refs:linkname
203 char linkname[255]; in TEST() local
205 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
207 ASSERT_EQ(0, symlink(tf.path, linkname)); in TEST()
208 ASSERT_EQ(0, fchmodat(AT_FDCWD, linkname, 0751, 0)); in TEST()
210 unlink(linkname); in TEST()
215 char linkname[255]; in TEST() local
218 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
221 ASSERT_EQ(0, symlink(target, linkname)); in TEST()
222 ASSERT_EQ(-1, fchmodat(AT_FDCWD, linkname, 0751, 0)); in TEST()
224 unlink(linkname); in TEST()
227 static void AssertSymlinkModeEquals(mode_t expected_mode, const char* linkname) { in AssertSymlinkModeEquals() argument
229 ASSERT_EQ(0, fstatat(AT_FDCWD, linkname, &sb, AT_SYMLINK_NOFOLLOW)); in AssertSymlinkModeEquals()
239 char linkname[255]; in TEST() local
240 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
242 ASSERT_EQ(0, symlink(tf.path, linkname)); in TEST()
243 int result = fchmodat(AT_FDCWD, linkname, 0751, AT_SYMLINK_NOFOLLOW); in TEST()
246 AssertSymlinkModeEquals(0751, linkname); in TEST()
254 unlink(linkname); in TEST()
260 char linkname[255]; in TEST() local
262 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
265 ASSERT_EQ(0, symlink(target, linkname)); in TEST()
266 int result = fchmodat(AT_FDCWD, linkname, 0751, AT_SYMLINK_NOFOLLOW); in TEST()
269 AssertSymlinkModeEquals(0751, linkname); in TEST()
275 unlink(linkname); in TEST()