summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/sys/t_mknod.c
diff options
context:
space:
mode:
authorbluhm <>2020-11-09 23:18:51 +0000
committerbluhm <>2020-11-09 23:18:51 +0000
commitc369d42df84f5bdabcac9041e6c5680a0cbfeaf9 (patch)
tree2233f16128b2705882f46a8369c9f9f47f40af5c /src/regress/lib/libc/sys/t_mknod.c
parent999ec352efbeb24cccd1d584b91a659b15764151 (diff)
downloadopenbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.tar.gz
openbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.tar.bz2
openbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.zip
Sync libc syscall tests with changes in upstream NetBSD. Use #ifdef
to document differences to NetBSD behaviour, this helps to track upstream. Mark currently failing test as expected failures. So test programs get compiled and executed, but it shows that further investigation is necceassry.
Diffstat (limited to 'src/regress/lib/libc/sys/t_mknod.c')
-rw-r--r--src/regress/lib/libc/sys/t_mknod.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/regress/lib/libc/sys/t_mknod.c b/src/regress/lib/libc/sys/t_mknod.c
index 0a16124859..b1e412cb68 100644
--- a/src/regress/lib/libc/sys/t_mknod.c
+++ b/src/regress/lib/libc/sys/t_mknod.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_mknod.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */ 1/* $OpenBSD: t_mknod.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
2/* $NetBSD: t_mknod.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */ 2/* $NetBSD: t_mknod.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */
3 3
4/*- 4/*-
@@ -170,16 +170,16 @@ ATF_TC_BODY(mknod_stat, tc)
170 170
171 (void)memset(&st, 0, sizeof(struct stat)); 171 (void)memset(&st, 0, sizeof(struct stat));
172 172
173 /* 173#ifndef __OpenBSD__
174 * Adjusted for OpenBSD, only supports FIFO and device special files 174 /* OpenBSD only supports FIFO and device special files */
175 * ATF_REQUIRE(mknod(path, S_IFREG, 0) == 0); 175 ATF_REQUIRE(mknod(path, S_IFREG, 0) == 0);
176 * ATF_REQUIRE(stat(path, &st) == 0); 176 ATF_REQUIRE(stat(path, &st) == 0);
177 * 177
178 * if (S_ISREG(st.st_mode) == 0) 178 if (S_ISREG(st.st_mode) == 0)
179 * atf_tc_fail_nonfatal("invalid mode from mknod(2) (S_IFREG)"); 179 atf_tc_fail_nonfatal("invalid mode from mknod(2) (S_IFREG)");
180 * 180
181 * ATF_REQUIRE(unlink(path) == 0); 181 ATF_REQUIRE(unlink(path) == 0);
182 */ 182#endif
183} 183}
184 184
185ATF_TC_CLEANUP(mknod_stat, tc) 185ATF_TC_CLEANUP(mknod_stat, tc)