From 6083bd65f7a8e621efe9b6381c040ffab7f8d189 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 5 Nov 2015 10:20:32 +0100 Subject: [PATCH] cmd/go: skip TestBuildOutputToDevNull on Plan 9 TestBuildOutputToDevNull was added in CL 16585. However, copying to /dev/null couldn't work on Plan 9, because /dev/null is a regular file. Since it's not different from any other file, the logic in copyFile couldn't distinguish it from another, already existing, file, that we wouldn't want to overwrite. Change-Id: Ie8d353f318fedfc7cfb9541fed00a2397e232592 Reviewed-on: https://go-review.googlesource.com/16691 Reviewed-by: Brad Fitzpatrick Run-TryBot: David du Colombier <0intro@gmail.com> --- src/cmd/go/go_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 489782df58..43660d75cc 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -1167,6 +1167,9 @@ func TestInstallIntoGOPATH(t *testing.T) { // Issue 12407 func TestBuildOutputToDevNull(t *testing.T) { + if runtime.GOOS == "plan9" { + t.Skip("skipping because /dev/null is a regular file on plan9") + } tg := testgo(t) defer tg.cleanup() tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))