]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: expand run.go's errorcheck, make clear which bugs run
authorRuss Cox <rsc@golang.org>
Sun, 23 Sep 2012 17:16:14 +0000 (13:16 -0400)
committerRuss Cox <rsc@golang.org>
Sun, 23 Sep 2012 17:16:14 +0000 (13:16 -0400)
Today, if run.go doesn't understand a test header line it just ignores
the test, making it too easy to write or edit tests that are not actually
being run.

- expand errorcheck to accept flags, so that bounds.go and escape*.go can run.
- create a whitelist of skippable tests in run.go; skipping others is an error.
- mark all skipped tests at top of file.

Update #4139.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6549054

41 files changed:
test/args.go
test/bounds.go
test/bugs/bug395.go
test/bugs/bug434.go
test/ddd3.go
test/dwarf/main.go
test/escape2.go
test/escape4.go
test/fixedbugs/bug083.go
test/fixedbugs/bug133.go
test/fixedbugs/bug160.go
test/fixedbugs/bug191.go
test/fixedbugs/bug248.go
test/fixedbugs/bug302.go
test/fixedbugs/bug313.go
test/fixedbugs/bug322.go
test/fixedbugs/bug324.go
test/fixedbugs/bug345.go
test/fixedbugs/bug367.go
test/fixedbugs/bug369.go
test/fixedbugs/bug382.go
test/fixedbugs/bug385_32.go
test/fixedbugs/bug385_64.go
test/fixedbugs/bug414.go
test/fixedbugs/bug424.go
test/fixedbugs/bug429.go
test/fixedbugs/bug437.go
test/import3.go
test/import4.go
test/index.go
test/interface/embed1.go
test/interface/private.go
test/interface/recursive2.go
test/linkx.go
test/method4.go
test/nul1.go
test/rotate.go
test/run.go
test/sigchld.go
test/sinit.go
test/testlib

index db624e9c2c92c4cd4dcaa87a0296bacd710316d6..9cfddc338b0c4bd84b4014bd09ffa2bc1b3b91a3 100644 (file)
@@ -1,5 +1,8 @@
 // $G $F.go && $L $F.$A && ./$A.out arg1 arg2
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 7b2b528d6ef442dd12c402324aed4c2bac84592c..4a16f64d3d64fc2d0a3b5bb1c7f0b493abda6771 100644 (file)
@@ -1,4 +1,4 @@
-// errchk -0 $G -m -l $D/$F.go
+// errorcheck -0 -m -l
 
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
index adf74497cde7a9bb5fa2f6cecd7aba0f9da20e25..4632dcd0f7906a483044f428590337b90c66aca9 100644 (file)
@@ -1,6 +1,9 @@
 // echo bug395 is broken  # takes 90+ seconds to break
 // # $G $D/$F.go || echo bug395
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 65047fd4a7cdc3e8cd4c883dcfdde3f7354cf81b..5eec7a577e73bbe1500cdd1afd0f48827ed68e87 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/one.go && $G $D/$F.dir/two.go || echo BUG:bug434
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 82fce31499fe6efe32752d527e3e911c8fba8446..d8de0a77e903abba31c6041427044df3eb56d49b 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/ddd2.go && $G $D/$F.go && $L $F.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 7f2ec4c00a6862922625ea45b27e238ef05d591c..175a09c7799734082fe0c69d704d40558f1eb952 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.go $D/z*.go && $L $F.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 462caee9fc2eed836ec9df0c0628eaf6d1e5c962..8f48ef7bd6714cf7341ad1f0e3249a4a98e8fb39 100644 (file)
@@ -1,4 +1,4 @@
-// errchk -0 $G -m -l $D/$F.go
+// errorcheck -0 -m -l
 
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
index 887570896306c69e7fd455b09ea603be1ee51396..cc3ac78f04d2cd8c0597fbe6eccc6f654f6f643d 100644 (file)
@@ -1,4 +1,4 @@
-// errchk -0 $G -m $D/$F.go
+// errorcheck -0 -m
 
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
index 984969d47f7071a0c9e348c5d79f7d313536d0a0..8bdecaadb514247450b52d8460a0bc3c3a141447 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/bug0.go && errchk $G $D/$F.dir/bug1.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 2beeb074f57070eaac319f8960a844906c2aa7ac..a6baac26ca330062e65659a782a11dbd0e4c1bf2 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/bug0.go && $G $D/$F.dir/bug1.go && errchk $G $D/$F.dir/bug2.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 8fd53ea079560269c0f431d72bbd93678eb7b858..c5e166a0cf90a11c2d1b595fb8fb20e512cf3e94 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/bug160.dir/x.go && $G $D/bug160.dir/y.go && $L y.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 44fcccfc00acf70e29969a25a7511fd7e705ce3a..11a6e58e516f13c6241839cc075b01063f0585fd 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/bug191.dir/a.go && $G $D/bug191.dir/b.go && $G $D/$F.go && $L $F.$A
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 055bf1fd7e1404ada3cc968cd715cefebc528feb..98cda35c4918ed002607cfbc34903766d0e0e46f 100644 (file)
@@ -5,6 +5,9 @@
 // $L bug2.$A &&
 // ./$A.out || echo BUG: failed to compile
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 1088b2f3c29a2b0feea404542e6e4940afe30714..dc7637fe52e5c820547697ea47bfc8d26cf903dc 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/bug302.dir/p.go && pack grc pp.a p.$A && $G $D/bug302.dir/main.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index eb2a0223b6caf0e6087f9873c825ca477c841af9..9009c5e8ffc401a4a794f06756cffaea846aec5d 100644 (file)
@@ -1,5 +1,8 @@
 // errchk $G -e $D/$F.dir/[ab].go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index ad0e62dc8c97c9046f1c877f0b8c9aece5b16ebc..401a8600a9e066c8b1a65fdd7f2a978acff3f4b2 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/lib.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out || echo BUG: fails incorrectly
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 3da75630acf28e68af7075b09e8f8c4639dfb0d0..ee090ae42f46232e80711a0a872c8bdc628d6889 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/p.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 874710ce88a57bf9ad822ce2daac64556dec409e..e3705f6c183586ae9af07d8e77e9ed8718629c5c 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/io.go && errchk $G -e $D/$F.dir/main.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 25d11a15318d1be22c91aa2b57fc60f25d2b2f9e..bf8edcd1b85e1bf13291479a4845865408df4919 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/p.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out || echo BUG: should not fail
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 4d98e85082133d740e588d5c97dfb5be632c110a..2ee8568e0441d2b7800cb8de9017f07708ad0424 100644 (file)
@@ -2,6 +2,9 @@
 // $G -o fast.$A $D/bug369.dir/pkg.go &&
 // run
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 3f5d05cd5ff8d516ab8ede14cadfbb8582385df9..10c71d46624ff8fbf9f2b50120a9103c7a95a61a 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/pkg.go && $G $D/$F.go || echo "Bug 382"
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file
index b9ecbb4c10d0252b4660105741d14b7ade1f1633..5ac4136e7dc56ade92039e23e24daa8019d46823 100644 (file)
@@ -1,5 +1,8 @@
 // [ $A == 6 ] || errchk $G -e $D/$F.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 7476b17d50613d4abec4a60bf300e9c4df696194..76afa9a335e4e6901884a105cc197125498e4f61 100644 (file)
@@ -1,5 +1,8 @@
 // [ $A != 6 ]  || errchk $G -e $D/$F.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 8824b1a1edd51a0e5b0e3cb499bf52aaf1187a5d..5612fd5c233315bbd1e5df8fecdeb37bfbda842c 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/p1.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 42cff54d45ca05d747667d95db52b9c844ee35c1..41524543a842c144524a6ce95d5978aa4b53abce 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/lib.go && $G $D/$F.go && $L $F.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index c1bd1d4bb9917528f562409ea71ed8af5c3b9b0b..794d293db2f05871345726b48055b4142be99a59 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.go && $L $F.$A && ! ./$A.out || echo BUG: bug429
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index bc046bde275a1c0b18f3feb175fd12e55baefa1b..b1e76a6a744653d244cc9402e9661873afba4b8a 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.dir/one.go && $G $D/$F.dir/two.go && $G $D/$F.go && $L $F.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 274fcfe42ab0e9b650c0433bcfdbc1b4d40620e6..0a5ba1d01ac5956038e6102779172ab1f535e4a7 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/import2.go && $G $D/$F.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index cbfebf7e1842d1891b35842b33dff09df67093b3..f35f5678184ac642ef76e66c73a10cafbd643755 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/empty.go && errchk $G $D/$F.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index f9e2413c16e06cc41fa99d115e8e3f8f4944f68d..447d708969fbfa079f2dc3c7e3346398862e5933 100644 (file)
@@ -4,6 +4,9 @@
 // ./$A.out -pass 2 >tmp.go && errchk $G -e tmp.go
 // rm -f tmp.go $A.out1
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index ee502a162fc4771c057f2997171a92dbf45fe389..07b873a633b9ff62fb640c1ae6f5004aa7cb341b 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/embed0.go && $G $D/$F.go && $L $F.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 14dfc1ae5544d5a010d57742cf302db2519f59f3..0a42385ea7bf69058ff8251af99892847dc63e0a 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/${F}1.go && errchk $G $D/$F.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 5129ceb022dc0b5632780ed03079131b7cb6d13b..3a1059960cf14c853b6e19a7c3b7d21bb3ba85aa 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/recursive1.go && $G $D/$F.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index d2c9545679b235b3df99554831656539a17c83fd..12d446ffc13b99c8e434d5a9720ac4233439e98d 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/$F.go && $L -X main.tbd hello $F.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 77e409b91f4421442e69379b8e9f6ceaec6f5216..7e7b1ff3b96f0ff2c5db5e4780ff71bc6a34f60b 100644 (file)
@@ -1,5 +1,8 @@
 // $G $D/method4a.go && $G $D/$F.go && $L $F.$A && ./$A.out
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2012 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 142d4deb1f4d3e9bcc8bbf7000fb37689a60f9f3..968c95295132eb6ad8ef7846e44d8da7cb489785 100644 (file)
@@ -3,6 +3,9 @@
 // errchk $G -e tmp.go
 // rm -f tmp.go
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 916407453f0d1eec5dec95701db4ef929ee3db14..aa334b4218c42887775521708e94aac33f8f525a 100644 (file)
@@ -2,6 +2,9 @@
 // ./$A.out >tmp.go && $G tmp.go && $L -o $A.out1 tmp.$A && ./$A.out1
 // rm -f tmp.go $A.out1
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index c82c138be5e9e8660d8eddc29a13b7f12654d46d..10dbceff5d4f1234a105641ab73cbae6751a6f0b 100644 (file)
@@ -20,6 +20,7 @@ import (
        "log"
        "os"
        "os/exec"
+       "path"
        "path/filepath"
        "regexp"
        "runtime"
@@ -109,15 +110,17 @@ func main() {
                <-test.donec
                _, isSkip := test.err.(skipError)
                errStr := "pass"
-               if isSkip {
-                       errStr = "skip"
-               }
                if test.err != nil {
                        errStr = test.err.Error()
                        if !isSkip {
                                failed = true
                        }
                }
+               if isSkip && !skipOkay[path.Join(test.dir, test.gofile)] {
+                       errStr = "unexpected skip for " + path.Join(test.dir, test.gofile) + ": " + errStr
+                       isSkip = false
+                       failed = true
+               }
                resCount[errStr]++
                if isSkip && !*verbose && !*showSkips {
                        continue
@@ -251,7 +254,8 @@ func (t *test) run() {
                action = action[2:]
        }
 
-       var args []string
+       var args, flags []string
+       wantError := false
        f := strings.Fields(action)
        if len(f) > 0 {
                action = f[0]
@@ -262,8 +266,19 @@ func (t *test) run() {
        case "cmpout":
                action = "run" // the run case already looks for <dir>/<test>.out files
                fallthrough
-       case "compile", "compiledir", "build", "run", "errorcheck", "runoutput":
+       case "compile", "compiledir", "build", "run", "runoutput":
+               t.action = action
+       case "errorcheck":
                t.action = action
+               wantError = true
+               for len(args) > 0 && strings.HasPrefix(args[0], "-") {
+                       if args[0] == "-0" {
+                               wantError = false
+                       } else {
+                               flags = append(flags, args[0])
+                       }
+                       args = args[1:]
+               }
        case "skip":
                t.action = "skip"
                return
@@ -302,7 +317,21 @@ func (t *test) run() {
                t.err = fmt.Errorf("unimplemented action %q", action)
 
        case "errorcheck":
-               out, _ := runcmd("go", "tool", gc, "-e", "-o", "a."+letter, long)
+               cmdline := []string{"go", "tool", gc, "-e", "-o", "a." + letter}
+               cmdline = append(cmdline, flags...)
+               cmdline = append(cmdline, long)
+               out, err := runcmd(cmdline...)
+               if wantError {
+                       if err == nil {
+                               t.err = fmt.Errorf("compilation succeeded unexpectedly\n%s", out)
+                               return
+                       }
+               } else {
+                       if err != nil {
+                               t.err = fmt.Errorf("%s\n%s", err, out)
+                               return
+                       }
+               }
                t.err = t.errorCheck(string(out), long, t.gofile)
                return
 
@@ -400,7 +429,7 @@ func (t *test) errorCheck(outStr string, full, short string) (err error) {
        // 6g error messages continue onto additional lines with leading tabs.
        // Split the output at the beginning of each line that doesn't begin with a tab.
        for _, line := range strings.Split(outStr, "\n") {
-               if strings.HasSuffix(line, "\r") {      // remove '\r', output by compiler on windows
+               if strings.HasSuffix(line, "\r") { // remove '\r', output by compiler on windows
                        line = line[:len(line)-1]
                }
                if strings.HasPrefix(line, "\t") {
@@ -517,3 +546,62 @@ func (t *test) wantedErrors() (errs []wantedError) {
 
        return
 }
+
+var skipOkay = map[string]bool{
+       "args.go":                 true,
+       "ddd3.go":                 true,
+       "import3.go":              true,
+       "import4.go":              true,
+       "index.go":                true,
+       "linkx.go":                true,
+       "method4.go":              true,
+       "nul1.go":                 true,
+       "rotate.go":               true,
+       "sigchld.go":              true,
+       "sinit.go":                true,
+       "interface/embed1.go":     true,
+       "interface/private.go":    true,
+       "interface/recursive2.go": true,
+       "dwarf/main.go":           true,
+       "dwarf/z1.go":             true,
+       "dwarf/z10.go":            true,
+       "dwarf/z11.go":            true,
+       "dwarf/z12.go":            true,
+       "dwarf/z13.go":            true,
+       "dwarf/z14.go":            true,
+       "dwarf/z15.go":            true,
+       "dwarf/z16.go":            true,
+       "dwarf/z17.go":            true,
+       "dwarf/z18.go":            true,
+       "dwarf/z19.go":            true,
+       "dwarf/z2.go":             true,
+       "dwarf/z20.go":            true,
+       "dwarf/z3.go":             true,
+       "dwarf/z4.go":             true,
+       "dwarf/z5.go":             true,
+       "dwarf/z6.go":             true,
+       "dwarf/z7.go":             true,
+       "dwarf/z8.go":             true,
+       "dwarf/z9.go":             true,
+       "fixedbugs/bug083.go":     true,
+       "fixedbugs/bug133.go":     true,
+       "fixedbugs/bug160.go":     true,
+       "fixedbugs/bug191.go":     true,
+       "fixedbugs/bug248.go":     true,
+       "fixedbugs/bug302.go":     true,
+       "fixedbugs/bug313.go":     true,
+       "fixedbugs/bug322.go":     true,
+       "fixedbugs/bug324.go":     true,
+       "fixedbugs/bug345.go":     true,
+       "fixedbugs/bug367.go":     true,
+       "fixedbugs/bug369.go":     true,
+       "fixedbugs/bug382.go":     true,
+       "fixedbugs/bug385_32.go":  true,
+       "fixedbugs/bug385_64.go":  true,
+       "fixedbugs/bug414.go":     true,
+       "fixedbugs/bug424.go":     true,
+       "fixedbugs/bug429.go":     true,
+       "fixedbugs/bug437.go":     true,
+       "bugs/bug395.go":          true,
+       "bugs/bug434.go":          true,
+}
index 25625a6f4142271d1afd0015b365cedcb40f6624..c1cfc2a8d0cc98056650267091dcb879c4228d6b 100644 (file)
@@ -1,6 +1,9 @@
 // [ "$GOOS" == windows ] ||
 // ($G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out)
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 1bc2810376440e797b59fbd6201c1184e0920b72..ffb8ef75110b4e280a0f76a66c7ca82ca5866a82 100644 (file)
@@ -1,5 +1,8 @@
 // $G -S $D/$F.go | egrep initdone >/dev/null && echo BUG sinit || true
 
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
index 84cda7b371e455159450657b00334ba87aff4e9b..90f400dd891efcb66570e76a09d17c058604de27 100644 (file)
@@ -48,7 +48,12 @@ cmpout() {
 }
 
 errorcheck() {
-       errchk $G -e $D/$F.go
+       zero=""
+       if [ "$1" = "-0" ]; then
+               zero="-0"
+               shift
+       fi
+       errchk $zero $G -e $* $D/$F.go
 }
 
 skip() {