Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mmap] Skip ReadOnlyMemoryError test on PowerPC #38863

Merged
merged 1 commit into from
Dec 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions stdlib/Mmap/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@ m = Mmap.mmap(s, Vector{UInt8}, 1, sz+1)
@test m[1] == 0x00
close(s); finalize(m); m=nothing; GC.gc()

s = open(file, "r")
m = Mmap.mmap(s)
@test_throws ReadOnlyMemoryError m[5] = UInt8('x') # tries to setindex! on read-only array
finalize(m); m=nothing; GC.gc()
# See https://github.com/JuliaLang/julia/issues/32155
# On PPC we receive `SEGV_MAPERR` instead of `SEGV_ACCERR` and
# can thus not turn the segmentation fault into an exception.
if !(Sys.ARCH === :powerpc64le || Sys.ARCH === :ppc64le)
s = open(file, "r")
m = Mmap.mmap(s)
@test_throws ReadOnlyMemoryError m[5] = UInt8('x') # tries to setindex! on read-only array
finalize(m); m=nothing; GC.gc()
end

write(file, "Hello World\n")

Expand Down