aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/abi_test.go2
-rw-r--r--src/runtime/crash_test.go4
-rw-r--r--src/runtime/malloc_test.go2
-rw-r--r--src/runtime/vdso_test.go4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/abi_test.go b/src/runtime/abi_test.go
index 0c9488a5f4..d7039e758a 100644
--- a/src/runtime/abi_test.go
+++ b/src/runtime/abi_test.go
@@ -40,7 +40,7 @@ func TestFinalizerRegisterABI(t *testing.T) {
// Actually run the test in a subprocess because we don't want
// finalizers from other tests interfering.
if os.Getenv("TEST_FINALIZER_REGABI") != "1" {
- cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=TestFinalizerRegisterABI", "-test.v"))
+ cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=^TestFinalizerRegisterABI$", "-test.v"))
cmd.Env = append(cmd.Env, "TEST_FINALIZER_REGABI=1")
out, err := cmd.CombinedOutput()
if !strings.Contains(string(out), "PASS\n") || err != nil {
diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go
index df75658750..2c990c199c 100644
--- a/src/runtime/crash_test.go
+++ b/src/runtime/crash_test.go
@@ -777,7 +777,7 @@ func init() {
func TestRuntimePanic(t *testing.T) {
testenv.MustHaveExec(t)
- cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=TestRuntimePanic"))
+ cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=^TestRuntimePanic$"))
cmd.Env = append(cmd.Env, "GO_TEST_RUNTIME_PANIC=1")
out, err := cmd.CombinedOutput()
t.Logf("%s", out)
@@ -798,7 +798,7 @@ func TestG0StackOverflow(t *testing.T) {
}
if os.Getenv("TEST_G0_STACK_OVERFLOW") != "1" {
- cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=TestG0StackOverflow", "-test.v"))
+ cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=^TestG0StackOverflow$", "-test.v"))
cmd.Env = append(cmd.Env, "TEST_G0_STACK_OVERFLOW=1")
out, err := cmd.CombinedOutput()
// Don't check err since it's expected to crash.
diff --git a/src/runtime/malloc_test.go b/src/runtime/malloc_test.go
index 5b9ce9882e..8c162fbea4 100644
--- a/src/runtime/malloc_test.go
+++ b/src/runtime/malloc_test.go
@@ -268,7 +268,7 @@ func TestArenaCollision(t *testing.T) {
// Test that mheap.sysAlloc handles collisions with other
// memory mappings.
if os.Getenv("TEST_ARENA_COLLISION") != "1" {
- cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=TestArenaCollision", "-test.v"))
+ cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=^TestArenaCollision$", "-test.v"))
cmd.Env = append(cmd.Env, "TEST_ARENA_COLLISION=1")
out, err := cmd.CombinedOutput()
if race.Enabled {
diff --git a/src/runtime/vdso_test.go b/src/runtime/vdso_test.go
index 61f651614b..126fd8d199 100644
--- a/src/runtime/vdso_test.go
+++ b/src/runtime/vdso_test.go
@@ -47,8 +47,8 @@ func TestUsingVDSO(t *testing.T) {
t.Skipf("skipping because Executable failed: %v", err)
}
- t.Logf("GO_WANT_HELPER_PROCESS=1 %s -f -e clock_gettime %s -test.run=TestUsingVDSO", strace, exe)
- cmd := testenv.Command(t, strace, "-f", "-e", "clock_gettime", exe, "-test.run=TestUsingVDSO")
+ t.Logf("GO_WANT_HELPER_PROCESS=1 %s -f -e clock_gettime %s -test.run=^TestUsingVDSO$", strace, exe)
+ cmd := testenv.Command(t, strace, "-f", "-e", "clock_gettime", exe, "-test.run=^TestUsingVDSO$")
cmd = testenv.CleanCmdEnv(cmd)
cmd.Env = append(cmd.Env, "GO_WANT_HELPER_PROCESS=1")
out, err := cmd.CombinedOutput()