aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2017-07-12 21:31:30 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2017-07-12 23:39:39 +0000
commit75f1de8329e8c0873d24397c29de31cf8f08ede5 (patch)
tree317c0e7e370f20e00550f512f9f0c2cb77b261f2
parent4100996676835778c1bf9c2a5fb6deb90897f52b (diff)
downloadgo-75f1de8329e8c0873d24397c29de31cf8f08ede5.tar.gz
go-75f1de8329e8c0873d24397c29de31cf8f08ede5.zip
syscall: use correct go binary in test
Usually this test is skipped (on builders and when not root), so people are unlikely to see this error. Updates #19296 Change-Id: I3acb81260034dad8776c305f83d7cbac4b718e75 Reviewed-on: https://go-review.googlesource.com/48191 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--src/syscall/exec_linux_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go
index 854060b38f..f5e97bec1f 100644
--- a/src/syscall/exec_linux_test.go
+++ b/src/syscall/exec_linux_test.go
@@ -9,6 +9,7 @@ package syscall_test
import (
"flag"
"fmt"
+ "internal/testenv"
"io"
"io/ioutil"
"os"
@@ -349,7 +350,7 @@ func TestUnshareMountNameSpaceChroot(t *testing.T) {
// Since we are doing a chroot, we need the binary there,
// and it must be statically linked.
x := filepath.Join(d, "syscall.test")
- cmd := exec.Command("go", "test", "-c", "-o", x, "syscall")
+ cmd := exec.Command(testenv.GoToolPath(t), "test", "-c", "-o", x, "syscall")
cmd.Env = append(os.Environ(), "CGO_ENABLED=0")
if o, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("Build of syscall in chroot failed, output %v, err %v", o, err)