testing: rename cmdline flags to avoid conflicts

Flags defined in the testing package may conflict
with real flags defined in the main package, or in
any other imported package.

This change makes them less likely to be used for
other purposes.

R=r, rsc, r2
CC=golang-dev
https://golang.org/cl/4167055
diff --git a/src/cmd/gotest/doc.go b/src/cmd/gotest/doc.go
index 40c40fc..8618e80 100644
--- a/src/cmd/gotest/doc.go
+++ b/src/cmd/gotest/doc.go
@@ -42,15 +42,15 @@
 arguments.
 
 Usage:
-	6.out [-v] [-match pattern] [-benchmarks pattern]
+	6.out [-test.v] [-test.run pattern] [-test.bench pattern]
 
-The -v flag causes the tests to be logged as they run.  The -match
-flag causes only those tests whose names match the regular expression
-pattern to be run. By default all tests are run silently.  If all
-the specified test pass, 6.out prints PASS and exits with a 0 exit
-code.  If any tests fail, it prints FAIL and exits with a non-zero
-code.  The -benchmarks flag is analogous to the -match flag, but
-applies to benchmarks.  No benchmarks run by default.
+The -test.v flag causes the tests to be logged as they run.  The
+-test.run flag causes only those tests whose names match the regular
+expression pattern to be run. By default all tests are run silently.
+If all the specified test pass, 6.out prints PASS and exits with a 0
+exit code.  If any tests fail, it prints FAIL and exits with a
+non-zero code.  The -test.bench flag is analogous to the -test.run
+flag, but applies to benchmarks.  No benchmarks run by default.
 
 */
 package documentation
diff --git a/src/pkg/testing/benchmark.go b/src/pkg/testing/benchmark.go
index ad93802..8c226c4 100644
--- a/src/pkg/testing/benchmark.go
+++ b/src/pkg/testing/benchmark.go
@@ -11,7 +11,7 @@
 	"time"
 )
 
-var matchBenchmarks = flag.String("benchmarks", "", "regular expression to select benchmarks to run")
+var matchBenchmarks = flag.String("test.bench", "", "regular expression to select benchmarks to run")
 
 // An internal type but exported because it is cross-package; part of the implementation
 // of gotest.
@@ -175,7 +175,7 @@
 	for _, Benchmark := range benchmarks {
 		matched, err := matchString(*matchBenchmarks, Benchmark.Name)
 		if err != nil {
-			println("invalid regexp for -benchmarks:", err.String())
+			println("invalid regexp for -test.bench:", err.String())
 			os.Exit(1)
 		}
 		if !matched {
diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go
index edbf0847..977252b 100644
--- a/src/pkg/testing/testing.go
+++ b/src/pkg/testing/testing.go
@@ -47,8 +47,8 @@
 )
 
 // Report as tests are run; default is silent for success.
-var chatty = flag.Bool("v", false, "verbose: print additional output")
-var match = flag.String("match", "", "regular expression to select tests to run")
+var chatty = flag.Bool("test.v", false, "verbose: print additional output")
+var match = flag.String("test.run", "", "regular expression to select tests to run")
 
 
 // Insert final newline if needed and tabs after internal newlines.
@@ -145,7 +145,7 @@
 	for i := 0; i < len(tests); i++ {
 		matched, err := matchString(*match, tests[i].Name)
 		if err != nil {
-			println("invalid regexp for -match:", err.String())
+			println("invalid regexp for -test.run:", err.String())
 			os.Exit(1)
 		}
 		if !matched {