aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/exec_linux_test.go12
-rw-r--r--src/syscall/exec_unix_test.go6
-rw-r--r--src/syscall/exec_windows_test.go4
3 files changed, 11 insertions, 11 deletions
diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go
index d192b904d2..ca92a153f8 100644
--- a/src/syscall/exec_linux_test.go
+++ b/src/syscall/exec_linux_test.go
@@ -242,7 +242,7 @@ func TestUnshareMountNameSpace(t *testing.T) {
syscall.Unmount(d, syscall.MNT_FORCE)
}
})
- cmd := testenv.Command(t, exe, "-test.run=TestUnshareMountNameSpace", d)
+ cmd := testenv.Command(t, exe, "-test.run=^TestUnshareMountNameSpace$", d)
cmd.Env = append(cmd.Environ(), "GO_WANT_HELPER_PROCESS=1")
cmd.SysProcAttr = &syscall.SysProcAttr{Unshareflags: syscall.CLONE_NEWNS}
@@ -305,7 +305,7 @@ func TestUnshareMountNameSpaceChroot(t *testing.T) {
t.Fatalf("%v: %v\n%s", cmd, err, o)
}
- cmd = testenv.Command(t, "/syscall.test", "-test.run=TestUnshareMountNameSpaceChroot", "/")
+ cmd = testenv.Command(t, "/syscall.test", "-test.run=^TestUnshareMountNameSpaceChroot$", "/")
cmd.Env = append(cmd.Environ(), "GO_WANT_HELPER_PROCESS=1")
cmd.SysProcAttr = &syscall.SysProcAttr{Chroot: d, Unshareflags: syscall.CLONE_NEWNS}
@@ -356,7 +356,7 @@ func TestUnshareUidGidMapping(t *testing.T) {
t.Fatal(err)
}
- cmd := testenv.Command(t, exe, "-test.run=TestUnshareUidGidMapping")
+ cmd := testenv.Command(t, exe, "-test.run=^TestUnshareUidGidMapping$")
cmd.Env = append(cmd.Environ(), "GO_WANT_HELPER_PROCESS=1")
cmd.SysProcAttr = &syscall.SysProcAttr{
Unshareflags: syscall.CLONE_NEWNS | syscall.CLONE_NEWUSER,
@@ -453,7 +453,7 @@ func TestUseCgroupFD(t *testing.T) {
fd, suffix := prepareCgroupFD(t)
- cmd := testenv.Command(t, exe, "-test.run=TestUseCgroupFD")
+ cmd := testenv.Command(t, exe, "-test.run=^TestUseCgroupFD$")
cmd.Env = append(cmd.Environ(), "GO_WANT_HELPER_PROCESS=1")
cmd.SysProcAttr = &syscall.SysProcAttr{
UseCgroupFD: true,
@@ -494,7 +494,7 @@ func TestCloneTimeNamespace(t *testing.T) {
t.Fatal(err)
}
- cmd := testenv.Command(t, exe, "-test.run=TestCloneTimeNamespace")
+ cmd := testenv.Command(t, exe, "-test.run=^TestCloneTimeNamespace$")
cmd.Env = append(cmd.Environ(), "GO_WANT_HELPER_PROCESS=1")
cmd.SysProcAttr = &syscall.SysProcAttr{
Cloneflags: syscall.CLONE_NEWTIME,
@@ -632,7 +632,7 @@ func testAmbientCaps(t *testing.T, userns bool) {
t.Fatal(err)
}
- cmd := testenv.Command(t, f.Name(), "-test.run="+t.Name())
+ cmd := testenv.Command(t, f.Name(), "-test.run=^"+t.Name()+"$")
cmd.Env = append(cmd.Environ(), "GO_WANT_HELPER_PROCESS=1")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
diff --git a/src/syscall/exec_unix_test.go b/src/syscall/exec_unix_test.go
index 9627317bb3..accf6cc5c5 100644
--- a/src/syscall/exec_unix_test.go
+++ b/src/syscall/exec_unix_test.go
@@ -310,7 +310,7 @@ func TestInvalidExec(t *testing.T) {
// TestExec is for issue #41702.
func TestExec(t *testing.T) {
testenv.MustHaveExec(t)
- cmd := exec.Command(os.Args[0], "-test.run=TestExecHelper")
+ cmd := exec.Command(os.Args[0], "-test.run=^TestExecHelper$")
cmd.Env = append(os.Environ(), "GO_WANT_HELPER_PROCESS=2")
o, err := cmd.CombinedOutput()
if err != nil {
@@ -343,7 +343,7 @@ func TestExecHelper(t *testing.T) {
time.Sleep(10 * time.Millisecond)
- argv := []string{os.Args[0], "-test.run=TestExecHelper"}
+ argv := []string{os.Args[0], "-test.run=^TestExecHelper$"}
syscall.Exec(os.Args[0], argv, os.Environ())
t.Error("syscall.Exec returned")
@@ -366,7 +366,7 @@ func TestRlimitRestored(t *testing.T) {
executable = os.Args[0]
}
- cmd := testenv.Command(t, executable, "-test.run=TestRlimitRestored")
+ cmd := testenv.Command(t, executable, "-test.run=^TestRlimitRestored$")
cmd = testenv.CleanCmdEnv(cmd)
cmd.Env = append(cmd.Env, "GO_WANT_HELPER_PROCESS=1")
diff --git a/src/syscall/exec_windows_test.go b/src/syscall/exec_windows_test.go
index 8b8f330e99..5cacf42b6b 100644
--- a/src/syscall/exec_windows_test.go
+++ b/src/syscall/exec_windows_test.go
@@ -73,7 +73,7 @@ func TestChangingProcessParent(t *testing.T) {
// run parent process
- parent := exec.Command(os.Args[0], "-test.run=TestChangingProcessParent")
+ parent := exec.Command(os.Args[0], "-test.run=^TestChangingProcessParent$")
parent.Env = append(os.Environ(), "GO_WANT_HELPER_PROCESS=parent")
err := parent.Start()
if err != nil {
@@ -96,7 +96,7 @@ func TestChangingProcessParent(t *testing.T) {
}
defer syscall.CloseHandle(ph)
- child := exec.Command(os.Args[0], "-test.run=TestChangingProcessParent")
+ child := exec.Command(os.Args[0], "-test.run=^TestChangingProcessParent$")
child.Env = append(os.Environ(),
"GO_WANT_HELPER_PROCESS=child",
"GO_WANT_HELPER_PROCESS_FILE="+childDumpPath)