diff options
author | bluhm <> | 2020-12-06 18:46:07 +0000 |
---|---|---|
committer | bluhm <> | 2020-12-06 18:46:07 +0000 |
commit | 25c0e0c068c2980a1072e94e88a250efba150a09 (patch) | |
tree | 3e65d5065143b5f4659314e26bf550024df32b70 /src/regress/lib | |
parent | 13ccd53004834b4802042b3b1b9a3bd0a8536ef2 (diff) | |
download | openbsd-25c0e0c068c2980a1072e94e88a250efba150a09.tar.gz openbsd-25c0e0c068c2980a1072e94e88a250efba150a09.tar.bz2 openbsd-25c0e0c068c2980a1072e94e88a250efba150a09.zip |
Enable t_mmap-1 test. It is skipped on NetBSD, but works for us.
Diffstat (limited to 'src/regress/lib')
-rw-r--r-- | src/regress/lib/libc/sys/Makefile | 3 | ||||
-rw-r--r-- | src/regress/lib/libc/sys/t_mmap.c | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/regress/lib/libc/sys/Makefile b/src/regress/lib/libc/sys/Makefile index 048d90186d..7dcfcb73a9 100644 --- a/src/regress/lib/libc/sys/Makefile +++ b/src/regress/lib/libc/sys/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.8 2020/11/11 13:55:54 bluhm Exp $ | 1 | # $OpenBSD: Makefile,v 1.9 2020/12/06 18:46:07 bluhm Exp $ |
2 | 2 | ||
3 | # Copyright (c) 2019 Moritz Buhl <openbsd@moritzbuhl.de> | 3 | # Copyright (c) 2019 Moritz Buhl <openbsd@moritzbuhl.de> |
4 | # Copyright (c) 2019 Alexander Bluhm <bluhm@openbsd.org> | 4 | # Copyright (c) 2019 Alexander Bluhm <bluhm@openbsd.org> |
@@ -48,7 +48,6 @@ PROGS += t_write | |||
48 | # failing tests | 48 | # failing tests |
49 | REGRESS_EXPECTED_FAILURES = | 49 | REGRESS_EXPECTED_FAILURES = |
50 | REGRESS_EXPECTED_FAILURES += run-t_mlock-4 | 50 | REGRESS_EXPECTED_FAILURES += run-t_mlock-4 |
51 | REGRESS_EXPECTED_FAILURES += run-t_mmap-1 | ||
52 | REGRESS_EXPECTED_FAILURES += run-t_msgrcv-3 | 51 | REGRESS_EXPECTED_FAILURES += run-t_msgrcv-3 |
53 | REGRESS_EXPECTED_FAILURES += run-t_pipe2-2 | 52 | REGRESS_EXPECTED_FAILURES += run-t_pipe2-2 |
54 | REGRESS_EXPECTED_FAILURES += run-t_stat-5 | 53 | REGRESS_EXPECTED_FAILURES += run-t_stat-5 |
diff --git a/src/regress/lib/libc/sys/t_mmap.c b/src/regress/lib/libc/sys/t_mmap.c index 9da88fa9cc..8d167cd5ec 100644 --- a/src/regress/lib/libc/sys/t_mmap.c +++ b/src/regress/lib/libc/sys/t_mmap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t_mmap.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */ | 1 | /* $OpenBSD: t_mmap.c,v 1.3 2020/12/06 18:46:07 bluhm Exp $ */ |
2 | /* $NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $ */ | 2 | /* $NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -175,14 +175,22 @@ 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 | #ifndef __OpenBSD__ | ||
179 | /* works for us */ | ||
178 | atf_tc_skip("The test case causes a panic " \ | 180 | atf_tc_skip("The test case causes a panic " \ |
179 | "(PR kern/38889, PR kern/46592)"); | 181 | "(PR kern/38889, PR kern/46592)"); |
182 | #endif | ||
180 | 183 | ||
181 | ATF_REQUIRE(sysctl(mib, miblen, NULL, &len, NULL, 0) == 0); | 184 | ATF_REQUIRE(sysctl(mib, miblen, NULL, &len, NULL, 0) == 0); |
182 | drives = malloc(len); | 185 | drives = malloc(len); |
183 | ATF_REQUIRE(drives != NULL); | 186 | ATF_REQUIRE(drives != NULL); |
184 | ATF_REQUIRE(sysctl(mib, miblen, drives, &len, NULL, 0) == 0); | 187 | ATF_REQUIRE(sysctl(mib, miblen, drives, &len, NULL, 0) == 0); |
188 | #ifdef __OpenBSD__ | ||
189 | /* devices separated by comma, disk uid by colon */ | ||
190 | for (dk = strtok(drives, ",:"); dk != NULL; dk = strtok(NULL, ",:")) { | ||
191 | #else | ||
185 | for (dk = strtok(drives, " "); dk != NULL; dk = strtok(NULL, " ")) { | 192 | for (dk = strtok(drives, " "); dk != NULL; dk = strtok(NULL, " ")) { |
193 | #endif | ||
186 | if (strncmp(dk, "dk", 2) == 0) | 194 | if (strncmp(dk, "dk", 2) == 0) |
187 | snprintf(dev, sizeof(dev), _PATH_DEV "%s", dk); | 195 | snprintf(dev, sizeof(dev), _PATH_DEV "%s", dk); |
188 | else | 196 | else |