unix: code for AIX ppc and ppc64, for gccgo

Change-Id: I187edceaf3604d73110940bd5580fa127a85e87d
Reviewed-on: https://go-review.googlesource.com/129735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Tony Reix
2018-08-28 06:51:06 +00:00
committed by Tobias Klauser
parent 4910a1d54f
commit d99a578cf4
35 changed files with 7873 additions and 22 deletions
+9 -3
View File
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix_test
import (
"runtime"
"testing"
"golang.org/x/sys/unix"
@@ -23,9 +24,14 @@ func TestMmap(t *testing.T) {
b[0] = 42
if err := unix.Msync(b, unix.MS_SYNC); err != nil {
t.Fatalf("Msync: %v", err)
if runtime.GOOS == "aix" {
t.Skip("msync returns invalid argument for AIX, skipping msync test")
} else {
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)
}