From c369d42df84f5bdabcac9041e6c5680a0cbfeaf9 Mon Sep 17 00:00:00 2001 From: bluhm <> Date: Mon, 9 Nov 2020 23:18:51 +0000 Subject: 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. --- src/regress/lib/libc/sys/t_mknod.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/regress/lib/libc/sys/t_mknod.c') 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 @@ -/* $OpenBSD: t_mknod.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */ +/* $OpenBSD: t_mknod.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */ /* $NetBSD: t_mknod.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */ /*- @@ -170,16 +170,16 @@ ATF_TC_BODY(mknod_stat, tc) (void)memset(&st, 0, sizeof(struct stat)); - /* - * Adjusted for OpenBSD, only supports FIFO and device special files - * ATF_REQUIRE(mknod(path, S_IFREG, 0) == 0); - * ATF_REQUIRE(stat(path, &st) == 0); - * - * if (S_ISREG(st.st_mode) == 0) - * atf_tc_fail_nonfatal("invalid mode from mknod(2) (S_IFREG)"); - * - * ATF_REQUIRE(unlink(path) == 0); - */ +#ifndef __OpenBSD__ + /* OpenBSD only supports FIFO and device special files */ + ATF_REQUIRE(mknod(path, S_IFREG, 0) == 0); + ATF_REQUIRE(stat(path, &st) == 0); + + if (S_ISREG(st.st_mode) == 0) + atf_tc_fail_nonfatal("invalid mode from mknod(2) (S_IFREG)"); + + ATF_REQUIRE(unlink(path) == 0); +#endif } ATF_TC_CLEANUP(mknod_stat, tc) -- cgit v1.2.3-55-g6feb