Skip to content

Commit

Permalink
re-disable openbsd
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Dec 13, 2020
1 parent 8c7565f commit 3848efd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
4 changes: 1 addition & 3 deletions koch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,7 @@ proc runCI(cmd: string) =
#[
BUG: with initOptParser, `--batch:'' all` interprets `all` as the argument of --batch
]#
# execFold("Run tester", "nim c -r -d:nimCoroutines testament/testament --pedantic --batch:$1 all -d:nimCoroutines" % ["NIM_TESTAMENT_BATCH".getEnv("_")])
execFold("Run tester", "nim c -r -d:nimCoroutines testament/testament --pedantic --batch:$1 pcat dll" % ["NIM_TESTAMENT_BATCH".getEnv("_")])
doAssert false, "PRTEMP"
execFold("Run tester", "nim c -r -d:nimCoroutines testament/testament --pedantic --batch:$1 all -d:nimCoroutines" % ["NIM_TESTAMENT_BATCH".getEnv("_")])

block CT_FFI:
when defined(posix): # windows can be handled in future PR's
Expand Down
13 changes: 3 additions & 10 deletions lib/pure/reservedmem.nim
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ else:
memRead* = MemAccessFlags(PROT_READ)
memReadWrite* = MemAccessFlags(PROT_READ or PROT_WRITE)

# template check(expr) =
proc check(expr: auto) =
template check(expr) =
if not expr:
raiseOSError(osLastError())

Expand Down Expand Up @@ -180,14 +179,8 @@ proc setLen*(m: var ReservedMem, newLen: int) =
when defined(windows):
check virtualFree(newCommitEnd, commitSizeShrinkage, MEM_DECOMMIT)
else:
when not defined(openbsd):
check posix_madvise(newCommitEnd, commitSizeShrinkage,
POSIX_MADV_DONTNEED) == 0
else:
# xxx figure out what to do here; options are doing nothing, and
# calling `madvise`; note that `MADV_DONTNEED` can differ from
# `POSIX_MADV_DONTNEED`; refs: https://man7.org/linux/man-pages/man3/posix_madvise.3.html
discard
check posix_madvise(newCommitEnd, commitSizeShrinkage,
POSIX_MADV_DONTNEED) == 0

m.committedMemEnd = newCommitEnd

Expand Down
4 changes: 2 additions & 2 deletions tests/dll/nimhcr_integration.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
discard """
disabled: "openbsd"
output: '''
main: HELLO!
main: hasAnyModuleChanged? true
Expand Down Expand Up @@ -64,8 +65,7 @@ xxx disabled: "openbsd" because it would otherwise give:
/home/build/Nim/lib/pure/includes/oserr.nim(94) raiseOSError
Error: unhandled exception: Not supported [OSError]
The stacktrace actually points to either of these failing:
`check mprotect` or `check posix_madvise`
After instrumenting code, the stacktrace actually points to the call to `check mprotect`
]#

## This is perhaps the most complex test in the nim test suite - calling the
Expand Down

0 comments on commit 3848efd

Please sign in to comment.