From 25c0e0c068c2980a1072e94e88a250efba150a09 Mon Sep 17 00:00:00 2001 From: bluhm <> Date: Sun, 6 Dec 2020 18:46:07 +0000 Subject: Enable t_mmap-1 test. It is skipped on NetBSD, but works for us. --- src/regress/lib/libc/sys/Makefile | 3 +-- 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 @@ -# $OpenBSD: Makefile,v 1.8 2020/11/11 13:55:54 bluhm Exp $ +# $OpenBSD: Makefile,v 1.9 2020/12/06 18:46:07 bluhm Exp $ # Copyright (c) 2019 Moritz Buhl # Copyright (c) 2019 Alexander Bluhm @@ -48,7 +48,6 @@ PROGS += t_write # failing tests REGRESS_EXPECTED_FAILURES = REGRESS_EXPECTED_FAILURES += run-t_mlock-4 -REGRESS_EXPECTED_FAILURES += run-t_mmap-1 REGRESS_EXPECTED_FAILURES += run-t_msgrcv-3 REGRESS_EXPECTED_FAILURES += run-t_pipe2-2 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 @@ -/* $OpenBSD: t_mmap.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */ +/* $OpenBSD: t_mmap.c,v 1.3 2020/12/06 18:46:07 bluhm Exp $ */ /* $NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $ */ /*- @@ -175,14 +175,22 @@ ATF_TC_BODY(mmap_block, tc) size_t len; int fd = -1; +#ifndef __OpenBSD__ + /* works for us */ atf_tc_skip("The test case causes a panic " \ "(PR kern/38889, PR kern/46592)"); +#endif ATF_REQUIRE(sysctl(mib, miblen, NULL, &len, NULL, 0) == 0); drives = malloc(len); ATF_REQUIRE(drives != NULL); ATF_REQUIRE(sysctl(mib, miblen, drives, &len, NULL, 0) == 0); +#ifdef __OpenBSD__ + /* devices separated by comma, disk uid by colon */ + for (dk = strtok(drives, ",:"); dk != NULL; dk = strtok(NULL, ",:")) { +#else for (dk = strtok(drives, " "); dk != NULL; dk = strtok(NULL, " ")) { +#endif if (strncmp(dk, "dk", 2) == 0) snprintf(dev, sizeof(dev), _PATH_DEV "%s", dk); else -- cgit v1.2.3-55-g6feb