go/test
Paul Murphy ee7bfbdbcc cmd/compile/internal/ssa: fix PPC64 merging of (AND (S[RL]Dconst ...)
CL 622236 forgot to check the mask was also a 32 bit rotate mask. Add
a modified version of isPPC64WordRotateMask which valids the mask is
contiguous and fits inside a uint32.

I don't this is possible when merging SRDconst, the first check should
always reject such combines. But, be extra careful and do it there
too.

Fixes #73153

Change-Id: Ie95f74ec5e7d89dc761511126db814f886a7a435
Reviewed-on: https://go-review.googlesource.com/c/go/+/679775
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Jayanth Krishnamurthy <jayanth.krishnamurthy@ibm.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
2025-06-09 20:33:27 -07:00
..
abi test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
alias3.dir [dev.typealias] cmd/compile: export/import test cases for type aliases 2017-01-20 05:55:53 +00:00
arenas reflect: fix ArenaNew to match documentation 2023-06-16 17:08:43 +00:00
asmhdr.dir
chan
closure3.dir cmd/compile: use very high budget for once-called closures 2024-11-22 02:04:41 +00:00
closure5.dir test: use dot-relative imports where appropriate 2022-03-24 02:14:15 +00:00
codegen cmd/compile/internal/ssa: fix PPC64 merging of (AND (S[RL]Dconst ...) 2025-06-09 20:33:27 -07:00
ddd2.dir
dwarf
fixedbugs test: add another regression test for issue 73309 2025-06-04 07:40:51 -07:00
import2.dir all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
import4.dir go/types, types2: use "and not used" instead of "but not used" in error messages 2022-09-27 21:10:19 +00:00
interface go/types, types2: more systematic use of Checker.use und useLHS 2023-03-28 14:28:33 +00:00
internal/runtime/sys runtime: move getcallersp to internal/runtime/sys 2024-09-17 17:01:20 +00:00
intrinsic.dir runtime,internal: move runtime/internal/sys to internal/runtime/sys 2024-07-23 19:05:35 +00:00
ken
linkname.dir test: compile source files as if from "test" module 2022-03-24 17:50:47 +00:00
linknameasm.dir cmd/compile: generate args_stackmap for ABI0 assembly func regardless of linkname 2024-06-07 15:22:22 +00:00
method4.dir cmd/gc: do not omit wrapper for expression (interface{...}).F 2014-01-07 13:26:48 +01:00
retjmp.dir cmd/internal/obj: fix tail call in non-zero frame leaf function on MIPS and S390X 2021-12-13 22:42:08 +00:00
stress test/stress: fix typo in comment 2024-03-25 19:21:35 +00:00
syntax cmd/compile: better error message when offending/missing token is a keyword 2024-11-14 02:14:13 +00:00
typeparam cmd/compile: export/import materialized aliases 2024-04-05 16:29:58 +00:00
uintptrescapes.dir cmd/compile, syscall: add //go:uintptrescapes comment, and use it 2016-07-06 20:48:41 +00:00
wasmmemsize.dir test: add a test for wasm memory usage 2024-10-28 13:27:58 +00:00
64bit.go
235.go
README.md internal/testdir: move to cmd/internal/testdir 2023-05-12 17:18:08 +00:00
alg.go
alias.go
alias1.go
alias2.go go/types, types2: qualify named types in error messages with type kind 2024-10-23 04:43:01 +00:00
alias3.go
align.go test: check that unaligned load-add opcodes work. 2018-04-09 18:57:37 +00:00
append.go
append1.go cmd/compile: use "cannot use %s as %s value in %s: %s" error message 2022-09-28 22:28:39 +00:00
args.go test: run some more tests by default 2012-11-08 09:04:27 -08:00
armimm.go
asmhdr.go
assign.go sync: add explicit noCopy fields to Map, Mutex, and Once 2024-11-18 18:52:54 +00:00
assign1.go
atomicload.go
bigalg.go
bigmap.go
blank.go test: revert changes made for Go SSA interpreter test. 2013-10-08 14:36:20 -04:00
blank1.go [dev.typeparams] merge: merge branch 'dev.regabi' into 'dev.typeparams' 2020-12-14 12:13:36 -08:00
bom.go
bombad.go
bounds.go cmd/compile: defer lowering OANDNOT until SSA 2020-10-27 03:11:45 +00:00
cannotassign.go
chancap.go
chanlinear.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
char_lit.go
char_lit1.go
checkbce.go cmd/compile: rewrite the constant parts of the prove pass 2024-08-07 16:07:33 +00:00
clear.go cmd/compile: add clear(x) builtin 2023-01-31 19:43:07 +00:00
clearfat.go
closedchan.go
closure.go test: enforce 1 proc in the test 2012-07-01 21:59:50 +04:00
closure1.go cmd/gc: capture variables by value 2015-01-29 13:07:30 +00:00
closure2.go cmd/compile: experimental loop iterator capture semantics change 2023-03-06 18:34:24 +00:00
closure3.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
closure4.go
closure5.go
closure6.go
closure7.go
cmp.go Fix several out of date references to 4g/5g/6g/8g/9g. 2015-06-26 03:38:21 +00:00
cmp6.go [dev.typeparams] test: add scaffolding to run.go to check compiler with -G flag 2020-12-01 21:49:31 +00:00
cmplx.go
cmplxdivide.c
cmplxdivide.go
cmplxdivide1.go
complit.go
complit1.go go/types, types2: report better error messages for slice expressions 2025-03-11 05:44:15 -07:00
compos.go
const.go
const1.go
const2.go
const3.go
const4.go
const5.go
const6.go
const7.go all: add wasip1 support 2023-04-11 20:56:32 +00:00
const8.go
convT2X.go
convert.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
convert1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
convert2.go go/types, types2: implement slice-to-array conversions 2022-09-08 15:55:44 +00:00
convert3.go
convert4.go cmd/compile: implement slice-to-array conversions 2022-09-19 18:58:26 +00:00
convinline.go cmd/compile: handle integer conversions in static init inliner 2022-11-17 13:46:05 +00:00
convlit.go
convlit1.go
copy.go test: ensure all failing tests exit nonzero. 2013-02-12 13:17:49 -05:00
copy1.go go/types, types2: better error messages for copy built-in 2025-03-10 21:30:51 -07:00
crlf.go
ddd.go
ddd1.go cmd/compile: use "cannot use %s as %s value in %s: %s" error message 2022-09-28 22:28:39 +00:00
ddd2.go
decl.go
declbad.go
defer.go test: ensure all failing tests exit nonzero. 2013-02-12 13:17:49 -05:00
defererrcheck.go test: add open-coded defer tests for too many exits path 2024-07-29 14:30:07 +00:00
deferfin.go [dev.regabi] test: enable finalizer tests on !amd64 2021-01-05 21:11:31 +00:00
defernil.go
deferprint.go
deferprint.out
devirt.go
directive.go cmd/compile: restrict //go:notinheap to runtime/internal/sys 2022-09-02 06:22:23 +00:00
directive2.go
divide.go
divmod.go
embedfunc.go
embedvers.go
empty.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
env.go test,internal/testdir: don't set GOOS/GOARCH 2023-05-12 12:34:59 +00:00
eof.go
eof1.go
escape.go cmd/compile: experimental loop iterator capture semantics change 2023-03-06 18:34:24 +00:00
escape2.go cmd/compile: allocate backing store for append on the stack 2025-05-19 16:14:53 -07:00
escape2n.go cmd/compile: allocate backing store for append on the stack 2025-05-19 16:14:53 -07:00
escape3.go
escape4.go cmd/compile: retire "IsHiddenClosure" and "IsDeadcodeClosure" 2024-07-22 21:27:37 +00:00
escape5.go cmd/compile/internal/escape: propagate constants to interface conversions to avoid allocs 2025-05-21 12:02:43 -07:00
escape6.go cmd/compile: allow pointer-containing elements in stack allocations 2025-04-04 15:04:34 -07:00
escape_array.go cmd/compile: determine static values of len and cap in make() calls 2025-02-19 13:38:58 -08:00
escape_calls.go cmd/compile: allocate backing store for append on the stack 2025-05-19 16:14:53 -07:00
escape_closure.go cmd/compile: retire "IsHiddenClosure" and "IsDeadcodeClosure" 2024-07-22 21:27:37 +00:00
escape_field.go
escape_goto.go
escape_hash_maphash.go hash/maphash: mark call into runtime hash function as not escaping 2019-11-16 20:31:45 +00:00
escape_iface.go cmd/compile/internal/escape: propagate constants to interface conversions to avoid allocs 2025-05-21 12:02:43 -07:00
escape_iface_data.go cmd/compile/internal/walk: use global zeroVal in interface conversions for zero values 2025-05-21 12:24:22 -07:00
escape_indir.go
escape_level.go
escape_make_non_const.go cmd/compile: stack allocate variable-sized makeslice 2025-04-04 10:36:58 -07:00
escape_map.go cmd/compile: allocate backing store for append on the stack 2025-05-19 16:14:53 -07:00
escape_mutations.go cmd/compile: restore zero-copy string->[]byte optimization 2023-08-18 11:58:37 +00:00
escape_param.go
escape_reflect.go reflect: remove calling mapiterkey, mapiterelem 2024-09-18 20:57:20 +00:00
escape_runtime_atomic.go runtime: migrate internal/atomic to internal/runtime 2024-03-25 19:53:03 +00:00
escape_selfassign.go
escape_slice.go cmd/compile: allocate backing store for append on the stack 2025-05-19 16:14:53 -07:00
escape_struct_param1.go
escape_struct_param2.go
escape_struct_return.go
escape_sync_atomic.go
escape_unique.go cmd/compile, unique: model data flow of non-string pointers 2025-05-21 20:07:36 -07:00
escape_unsafe.go
fibo.go
finprofiled.go test: ignore MemProfileRecords with no live objects in finprofiled.go 2023-11-16 05:48:00 +00:00
float_lit.go
float_lit2.go
float_lit3.go
floatcmp.go
for.go test: add test cases for index value with range array clear 2023-07-10 16:36:41 +00:00
func.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func1.go [dev.typeparams] test: enable some more errorcheck tests 2020-12-04 21:22:23 +00:00
func2.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func3.go go/parser, syntax: better error message for parameter missing type 2024-09-30 22:04:40 +00:00
func4.go
func5.go
func6.go
func7.go
func8.go
funcdup.go [dev.typeparams] test: enable some more errorcheck tests 2020-12-04 21:22:23 +00:00
funcdup2.go [dev.typeparams] test: enable some more errorcheck tests 2020-12-04 21:22:23 +00:00
fuse.go cmd/compile: handle boolean and pointer relations 2024-08-07 16:07:55 +00:00
gc.go
gc1.go
gc2.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
gcgort.go
gcstring.go
goprint.go
goprint.out
goto.go cmd/compile: report block start for gotos jumping into blocks 2017-04-19 02:27:58 +00:00
heapsampling.go
helloworld.go test: remove rundircmpout and cmpout actions 2018-05-31 17:36:45 +00:00
helloworld.out test: split golden.out into expected output per test 2012-01-18 16:12:24 -08:00
if.go
import.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
import1.go go/types, types2: use "and not used" instead of "but not used" in error messages 2022-09-27 21:10:19 +00:00
import2.go
import4.go
import5.go
import6.go
index.go all: fix typos 2019-09-08 17:28:20 +00:00
index0.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
index1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
index2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
indirect.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
indirect1.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
init.go [dev.typeparams] merge: merge branch 'dev.regabi' into 'dev.typeparams' 2020-12-14 12:13:36 -08:00
init1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
initcomma.go test/initcomma.go: restore what it's supposed to be testing 2012-02-20 07:44:24 +11:00
initexp.go cmd/compile: use "init... cycle" instead of "init... loop" in error messages 2022-09-23 20:27:09 +00:00
initialize.go cmd/compile: handle simple inlined calls in staticinit 2022-11-16 04:04:52 +00:00
initializerr.go test: re-enable most go/tests that were disabled because of types2 differences 2022-01-11 02:26:58 +00:00
initloop.go go/types: improve recursive type error message 2024-10-22 22:20:29 +00:00
inline.go cmd/compile: remove no-longer-necessary recursive inlining checks 2025-03-06 10:07:17 -08:00
inline_big.go cmd/compile: restore zero-copy string->[]byte optimization 2023-08-18 11:58:37 +00:00
inline_caller.go runtime: make FuncForPC return the innermost inlined frame 2019-01-08 21:54:04 +00:00
inline_callers.go
inline_endian.go cmd/compile: allocate backing store for append on the stack 2025-05-19 16:14:53 -07:00
inline_literal.go
inline_math_bits_rotate.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
inline_sync.go sync: use atomic.Bool for Once.done 2025-04-22 08:28:13 -07:00
inline_testingbloop.go testing: detect a stopped timer in B.Loop 2025-03-24 11:41:09 -07:00
inline_variadic.go
int_lit.go
intcvt.go
intrinsic.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
intrinsic_atomic.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
iota.go
label.go
label1.go
linkmain.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
linkmain_run.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
linkname.go test: remove -newescape from regress tests 2019-08-28 19:27:20 +00:00
linkname3.go cmd/compile: disallow linkname referring to instantiations 2024-05-15 19:27:25 +00:00
linknameasm.go cmd/compile: generate args_stackmap for ABI0 assembly func regardless of linkname 2024-06-07 15:22:22 +00:00
linkobj.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
linkx.go
linkx_run.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
literal.go
literal2.go
live.go cmd/compile/internal/walk: convert composite literals to interfaces without allocating 2025-05-21 12:23:26 -07:00
live1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
live2.go cmd/compile,internal/runtime/maps: add extendible hashing 2024-10-21 14:16:20 +00:00
live_regabi.go cmd/compile/internal/walk: convert composite literals to interfaces without allocating 2025-05-21 12:23:26 -07:00
live_uintptrkeepalive.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
loopbce.go cmd/compile: remove no-longer-necessary recursive inlining checks 2025-03-06 10:07:17 -08:00
mainsig.go [dev.regabi] cmd/compile: cleanup for concrete types - noder 2020-12-17 04:43:46 +00:00
makechan.go all: fix some comments 2024-04-04 14:29:45 +00:00
makemap.go
makenew.go [dev.typeparams] test: enable some more errorcheck tests 2020-12-04 21:22:23 +00:00
makeslice.go
mallocfin.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
map.go test/mapnan.go: add regression test for non-empty interfaces. 2014-08-06 17:02:55 -04:00
map1.go [dev.typeparams] merge: merge branch 'dev.regabi' into 'dev.typeparams' 2020-12-14 12:13:36 -08:00
mapclear.go
maplinear.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
maymorestack.go
mergemul.go
method.go test: a number of fixes. 2013-02-11 18:20:52 -05:00
method1.go cmd/compile: use "method T.m already declared" for method redeclaration errors 2022-09-27 21:59:19 +00:00
method2.go go/types, types2: better error message when using *interface instead of interface 2022-01-10 22:48:40 +00:00
method3.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
method4.go
method5.go
method6.go
method7.go
named.go
named1.go
newinline.go cmd/compile: remove no-longer-necessary recursive inlining checks 2025-03-06 10:07:17 -08:00
nil.go
nilcheck.go
nilptr.go cmd/link: use >4GB base address for 64-bit PE binaries 2025-05-12 11:05:28 -07:00
nilptr2.go
nilptr3.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
nilptr4.go
nilptr5.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
nilptr5_aix.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
nilptr5_wasm.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
nilptr_aix.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
noinit.go cmd/compile: reenable inline static init 2023-04-14 17:57:36 +00:00
nosplit.go cmd/internal/objabi, internal/runtime: increase nosplit limit on OpenBSD 2024-12-06 00:35:41 +00:00
nowritebarrier.go cmd/compile: redo IsRuntimePkg/IsReflectPkg predicate 2023-08-22 19:18:21 +00:00
nul1.go
opt_branchlikely.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
parentype.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
peano.go
phiopt.go cmd/compile: add 2 phiopt cases 2025-05-08 10:18:37 -07:00
print.go
print.out
printbig.go
printbig.out
prove.go cmd/compile: use min & max builtins to assert constant bounds in prove's tests 2025-03-11 19:51:59 -07:00
prove_constant_folding.go cmd/compile: rewrite the constant parts of the prove pass 2024-08-07 16:07:33 +00:00
prove_invert_loop_with_unused_iterators.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
prove_popcount.go cmd/compile: compute bits.OnesCount's limits from argument's limits 2025-03-11 20:17:36 -07:00
range.go
range2.go all: rename GOEXPERIMENT=range to rangefunc 2023-11-08 15:32:14 +00:00
range3.go cmd/compile: fix typecheck range over rune literal 2023-12-01 17:20:08 +00:00
range4.go cmd/compile: handle defined iter func type correctly 2024-01-08 16:00:53 +00:00
rangegen.go test: skip rangegen.go on 32-bit platforms 2023-12-18 23:35:19 +00:00
recover.go
recover1.go
recover2.go
recover3.go
recover4.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
recover5.go
reflectmethod1.go
reflectmethod2.go
reflectmethod3.go
reflectmethod4.go
reflectmethod5.go
reflectmethod6.go
reflectmethod7.go
reflectmethod8.go
rename.go
rename1.go cmd/compile/internal/types2: only mark variables as used if they are 2023-04-19 14:07:00 +00:00
reorder.go [dev.regabi] cmd/compile: cleanup OAS2FUNC ordering 2021-01-16 23:19:26 +00:00
reorder2.go
retjmp.go
return.go
rotate.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate0.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate3.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rune.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
runtime.go [dev.typeparams] cmd/compile/internal/types2: adjusted qualified identifier error message for compiler 2020-12-09 23:56:19 +00:00
shift1.go
shift2.go
shift3.go
sieve.go
sigchld.go test: migrate remaining files to go:build syntax 2023-10-19 23:33:25 +00:00
sigchld.out
simassign.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
sizeof.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
slice3.go
slice3err.go
slicecap.go
sliceopt.go
solitaire.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
stack.go
stackobj.go
stackobj2.go
stackobj3.go
strcopy.go test: add test to verify that string copies don't get optimized away 2018-06-12 19:10:34 +00:00
strength.go
string_lit.go
stringrange.go
struct0.go
switch.go
switch2.go cmd/compile: better error message when offending/missing token is a keyword 2024-11-14 02:14:13 +00:00
switch3.go
switch4.go
switch5.go
switch6.go cmd/compile: use "missing method m" instead of "missing m method" 2022-09-24 17:04:15 +00:00
switch7.go
tailcall.go Revert "cmd/compile: Enable inlining of tail calls" 2025-06-04 08:27:44 -07:00
tighten.go cmd/compile: pair loads and stores on arm64 2025-02-13 14:07:47 -08:00
tinyfin.go
torture.go
turing.go
typecheck.go test: re-enable most go/tests that were disabled because of types2 differences 2022-01-11 02:26:58 +00:00
typecheckloop.go cmd/compile: use "init... cycle" instead of "init... loop" in error messages 2022-09-23 20:27:09 +00:00
typeswitch.go
typeswitch1.go
typeswitch2.go
typeswitch2b.go go/types, types2: use "and not used" instead of "but not used" in error messages 2022-09-27 21:10:19 +00:00
typeswitch3.go
uintptrescapes.go cmd/compile, syscall: add //go:uintptrescapes comment, and use it 2016-07-06 20:48:41 +00:00
uintptrescapes2.go
uintptrescapes3.go
uintptrkeepalive.go
undef.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
unsafe_slice_data.go
unsafe_string.go
unsafe_string_data.go
unsafebuiltins.go
used.go [dev.typeparams] all: merge dev.regabi (07569da) into dev.typeparams 2020-12-28 00:39:17 -08:00
utf.go
varerr.go [dev.typeparams] test: enable some more errorcheck tests 2020-12-04 21:22:23 +00:00
varinit.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
wasmexport.go cmd/compile: add basic wasmexport support 2024-08-09 20:07:54 +00:00
wasmexport2.go cmd/compile: allow more types for wasmimport/wasmexport parameters and results 2024-11-11 17:11:50 +00:00
wasmmemsize.go test: add a test for wasm memory usage 2024-10-28 13:27:58 +00:00
weak.go weak: prevent unsafe conversions using weak pointers 2025-02-06 13:16:59 -08:00
winbatch.go all: update to use filepath.WalkDir instead of filepath.Walk 2020-12-02 16:33:57 +00:00
writebarrier.go
zerodivide.go
zerosize.go cmd/link: put zero-sized data symbols at same address as runtime.zerobase 2023-04-28 18:35:43 +00:00

README.md

The test directory contains tests of the Go tool chain and runtime. It includes black box tests, regression tests, and error output tests. They are run as part of all.bash.

To run just these tests, execute:

../bin/go test cmd/internal/testdir

To run just tests from specified files in this directory, execute:

../bin/go test cmd/internal/testdir -run='Test/(file1.go|file2.go|...)'

Standard library tests should be written as regular Go tests in the appropriate package.

The tool chain and runtime also have regular Go tests in their packages. The main reasons to add a new test to this directory are:

  • it is most naturally expressed using the test runner; or
  • it is also applicable to gccgo and other Go tool chains.