Deleted Added
full compact
t_ftok.c (313227) t_ftok.c (350328)
1/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */
2
3/*-
4 * Copyright (c) 2011 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jukka Ruohonen.

--- 51 unchanged lines hidden (view full) ---

60 atf_tc_set_md_var(tc, "descr", "Test that links return the same key");
61}
62
63ATF_TC_BODY(ftok_link, tc)
64{
65 key_t k1, k2, k3;
66 int fd;
67
1/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */
2
3/*-
4 * Copyright (c) 2011 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jukka Ruohonen.

--- 51 unchanged lines hidden (view full) ---

60 atf_tc_set_md_var(tc, "descr", "Test that links return the same key");
61}
62
63ATF_TC_BODY(ftok_link, tc)
64{
65 key_t k1, k2, k3;
66 int fd;
67
68 fd = open(path, O_RDONLY | O_CREAT);
68 fd = open(path, O_RDONLY | O_CREAT, 0600);
69
70 ATF_REQUIRE(fd >= 0);
71 (void)close(fd);
72 ATF_REQUIRE(link(path, hlnk) == 0);
73 ATF_REQUIRE(symlink(path, slnk) == 0);
74
75 k1 = ftok(path, key);
76 k2 = ftok(hlnk, key);

--- 32 unchanged lines hidden ---
69
70 ATF_REQUIRE(fd >= 0);
71 (void)close(fd);
72 ATF_REQUIRE(link(path, hlnk) == 0);
73 ATF_REQUIRE(symlink(path, slnk) == 0);
74
75 k1 = ftok(path, key);
76 k2 = ftok(hlnk, key);

--- 32 unchanged lines hidden ---