summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/sys/t_mmap.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_mmap.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_mmap.c')
-rw-r--r--src/regress/lib/libc/sys/t_mmap.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/regress/lib/libc/sys/t_mmap.c b/src/regress/lib/libc/sys/t_mmap.c
index 6dbfae5bb1..9da88fa9cc 100644
--- a/src/regress/lib/libc/sys/t_mmap.c
+++ b/src/regress/lib/libc/sys/t_mmap.c
@@ -1,5 +1,5 @@
1/* $OpenBSD: t_mmap.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */ 1/* $OpenBSD: t_mmap.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
2/* $NetBSD: t_mmap.c,v 1.13 2017/05/23 13:04:29 christos Exp $ */ 2/* $NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $ */
3 3
4/*- 4/*-
5 * Copyright (c) 2011 The NetBSD Foundation, Inc. 5 * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
59#include "macros.h" 59#include "macros.h"
60 60
61#include <sys/cdefs.h> 61#include <sys/cdefs.h>
62__RCSID("$NetBSD: t_mmap.c,v 1.13 2017/05/23 13:04:29 christos Exp $"); 62__RCSID("$NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $");
63 63
64#include <sys/param.h> 64#include <sys/param.h>
65#include <sys/disklabel.h> 65#include <sys/disklabel.h>
@@ -175,7 +175,8 @@ ATF_TC_BODY(mmap_block, tc)
175 size_t len; 175 size_t len;
176 int fd = -1; 176 int fd = -1;
177 177
178 atf_tc_skip("The test case causes a panic (PR kern/38889, kern/46592)"); 178 atf_tc_skip("The test case causes a panic " \
179 "(PR kern/38889, PR kern/46592)");
179 180
180 ATF_REQUIRE(sysctl(mib, miblen, NULL, &len, NULL, 0) == 0); 181 ATF_REQUIRE(sysctl(mib, miblen, NULL, &len, NULL, 0) == 0);
181 drives = malloc(len); 182 drives = malloc(len);
@@ -575,10 +576,10 @@ ATF_TP_ADD_TCS(tp)
575 ATF_TP_ADD_TC(tp, mmap_prot_3); 576 ATF_TP_ADD_TC(tp, mmap_prot_3);
576 ATF_TP_ADD_TC(tp, mmap_truncate); 577 ATF_TP_ADD_TC(tp, mmap_truncate);
577 ATF_TP_ADD_TC(tp, mmap_truncate_signal); 578 ATF_TP_ADD_TC(tp, mmap_truncate_signal);
578 /* 579#ifndef __OpenBSD__
579 * Adjusted for OpenBSD, not available 580 /* sysctl vm.user_va0_disable not available */
580 * ATF_TP_ADD_TC(tp, mmap_va0); 581 ATF_TP_ADD_TC(tp, mmap_va0);
581 */ 582#endif
582 583
583 return atf_no_error(); 584 return atf_no_error();
584} 585}