Commit b39d0eab authored by Clément Chigot's avatar Clément Chigot Committed by Tobias Klauser

syscall: move helper handler before AIX handler in TestPassFD

The AIX special handler which skips this test if unix network isn't
supported, doesn't need to be called inside the helper process.

Change-Id: I7ff2c4e6b20eceb977380294858cae63034ffe0d
Reviewed-on: https://go-review.googlesource.com/c/go/+/172160
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarTobias Klauser <tobias.klauser@gmail.com>
parent 36b0593f
...@@ -132,6 +132,11 @@ func TestFcntlFlock(t *testing.T) { ...@@ -132,6 +132,11 @@ func TestFcntlFlock(t *testing.T) {
func TestPassFD(t *testing.T) { func TestPassFD(t *testing.T) {
testenv.MustHaveExec(t) testenv.MustHaveExec(t)
if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
passFDChild()
return
}
if runtime.GOOS == "aix" { if runtime.GOOS == "aix" {
// Unix network isn't properly working on AIX 7.2 with Technical Level < 2 // Unix network isn't properly working on AIX 7.2 with Technical Level < 2
out, err := exec.Command("oslevel", "-s").Output() out, err := exec.Command("oslevel", "-s").Output()
...@@ -152,11 +157,6 @@ func TestPassFD(t *testing.T) { ...@@ -152,11 +157,6 @@ func TestPassFD(t *testing.T) {
} }
if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
passFDChild()
return
}
tempDir, err := ioutil.TempDir("", "TestPassFD") tempDir, err := ioutil.TempDir("", "TestPassFD")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment