summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/mmap_unix_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-09-29 12:46:30 -0700
committerGitHub <noreply@github.com>2017-09-29 12:46:30 -0700
commitb84736e9b6401df0c6eeab9950bef09458a6aefd (patch)
treed9175208de3236db75a33879750a57b3000ba096 /vendor/golang.org/x/sys/unix/mmap_unix_test.go
parent8b9dbb86133ff0fd6002a391268383d1593918ca (diff)
downloadchat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.gz
chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.bz2
chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.zip
Updating server dependancies. (#7538)
Diffstat (limited to 'vendor/golang.org/x/sys/unix/mmap_unix_test.go')
-rw-r--r--vendor/golang.org/x/sys/unix/mmap_unix_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/mmap_unix_test.go b/vendor/golang.org/x/sys/unix/mmap_unix_test.go
index 18ccec05f..3258ca328 100644
--- a/vendor/golang.org/x/sys/unix/mmap_unix_test.go
+++ b/vendor/golang.org/x/sys/unix/mmap_unix_test.go
@@ -17,6 +17,18 @@ func TestMmap(t *testing.T) {
if err != nil {
t.Fatalf("Mmap: %v", err)
}
+ if err := unix.Mprotect(b, unix.PROT_READ|unix.PROT_WRITE); err != nil {
+ t.Fatalf("Mprotect: %v", err)
+ }
+
+ b[0] = 42
+
+ if err := unix.Msync(b, unix.MS_SYNC); err != nil {
+ t.Fatalf("Msync: %v", err)
+ }
+ if err := unix.Madvise(b, unix.MADV_DONTNEED); err != nil {
+ t.Fatalf("Madvise: %v", err)
+ }
if err := unix.Munmap(b); err != nil {
t.Fatalf("Munmap: %v", err)
}