소스 검색

unix: 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: I102d0f180a4f0204f107db900f2134c5af1d52c3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/172258
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
chigotc 6 년 전
부모
커밋
ebb4019f01
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      unix/syscall_unix_test.go

+ 5 - 5
unix/syscall_unix_test.go

@@ -169,6 +169,11 @@ func TestPassFD(t *testing.T) {
 		t.Skip("cannot exec subprocess on iOS, skipping test")
 	}
 
+	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
+		passFDChild()
+		return
+	}
+
 	if runtime.GOOS == "aix" {
 		// Unix network isn't properly working on AIX
 		// 7.2 with Technical Level < 2
@@ -190,11 +195,6 @@ func TestPassFD(t *testing.T) {
 		}
 	}
 
-	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
-		passFDChild()
-		return
-	}
-
 	tempDir, err := ioutil.TempDir("", "TestPassFD")
 	if err != nil {
 		t.Fatal(err)