You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts
Daniel Martí 5fa4acf580 testdata: use longer Go filenames for binsubstr
Every now and then, a CI run would fail:

	FAIL: testdata/scripts/reflect.txt:7: unexpected match for ["main.go"] in main

These were rare, and very hard to reproduce or debug.

My best guess is that, since "main.go" is a short string and we use
random eight-character obfuscated filenames ending with ".go", it was
possible that the random filename happened to end in "main" in some
cases.

Given the base64 encoding, the chances of a single suffix collision are
about 0.000006%. Note, however, that a single obfuscated build will most
likely obfuscate many filenames, especially for the tests obfuscating
multiple packages. For a single CI run with many tests across three OSs,
the chances of any collision are likely very low, but realistic.

All this has a simple fix: use longer filenames to match with. We choose
"garble_main.go" since it's long enough, but also because it's still
clear it's a "main" Go file, and it's very unlikely to cause conflicts
with filenames in upstream Go given the "garble_" prefix.
4 years ago
..
asm.txt obfuscate asm function names as well (#273) 5 years ago
basic.txt testdata: use longer Go filenames for binsubstr 4 years ago
cgo.txt all: drop support for Go 1.15.x (#265) 5 years ago
crossbuild.txt fix windows/arm cross-build linking 5 years ago
debugdir.txt refactor "current package" with TOOLEXEC_IMPORTPATH (#266) 5 years ago
embed.txt don't obfuscate the "embed" import path 5 years ago
goprivate.txt avoid reproducibility issues with full rebuilds 5 years ago
goversion.txt use "go env -json" to collect env info all at once 5 years ago
help.txt make "help" refuse arguments for now 5 years ago
implement.txt remove tinyfmt implementation from a test script 4 years ago
imports.txt testdata: use longer Go filenames for binsubstr 4 years ago
init.txt all: drop support for Go 1.15.x (#265) 5 years ago
ldflags.txt testdata: remove some unnecessary execs (#267) 5 years ago
linkname.txt fix obfuscating linkname directives that where the package name contained a dot 5 years ago
literals.txt make -literals succeed on all of std 5 years ago
modinfo.txt testdata: remove some unnecessary execs (#267) 5 years ago
plugin.txt all: drop support for Go 1.15.x (#265) 5 years ago
position.txt testdata: use longer Go filenames for binsubstr 4 years ago
reflect.txt testdata: use longer Go filenames for binsubstr 4 years ago
reverse.txt reverse lone filenames as well 4 years ago
seed.txt make flags like -literals and GOPRIVATE affect hashing (#288) 5 years ago
syntax.txt obfuscate alias names like any other objects 4 years ago
test.txt testdata: reduce the cost of short tests 5 years ago
tiny.txt testdata: use longer Go filenames for binsubstr 4 years ago