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/script
Daniel Martí da5ddfa45d avoid go:linkname warnings when building on tip
Packages like os and sync have started using go:linknames pointing to
packages outside their dependency tree, much like runtime already did.
This started causing warnings to be printed while obfuscsating std:

    > exec garble build -o=out_rebuild ./stdimporter
    [stderr]
    # sync
    //go:linkname refers to syscall.hasWaitingReaders - add `import _ "syscall"` for garble to find the package
    # os
    //go:linkname refers to net.newUnixFile - add `import _ "net"` for garble to find the package
    > bincmp out_rebuild out
    PASS

Relax the restriction in listPackage so that any package in std
is now allowed to list packages in runtimeLinknamed,
which makes the warnings and any potential problems go away.
Also make these std test cases check that no warnings are printed,
since I only happened to notice this problem by chance.
1 year ago
..
asm.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
atomic.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
basic.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
cache.txtar replace our caching inside GOCACHE with GARBLE_CACHE 1 year ago
cgo.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
crossbuild.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
debugdir.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
embed.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
goenv.txtar drop support for Go 1.19 1 year ago
gogarble.txtar avoid go:linkname warnings when building on tip 1 year ago
goversion.txtar suggest a command when asking the user to rebuild garble 1 year ago
help.txtar adapt to tip's error message change from "GOROOT" to "std" 1 year ago
implement.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
imports.txtar use go:build in script/imports.txtar 1 year ago
init.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
ldflags.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
linker.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
linkname.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
list_error.txtar adapt to tip's error message change from "GOROOT" to "std" 1 year ago
literals.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
modinfo.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
plugin.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
position.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
reflect.txtar rework reflection detection with ssa (#732) 1 year ago
reverse.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
run.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
seed-cache.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
seed.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
syntax.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
test.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
tiny.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago
typeparams.txtar set testscript's RequireExplicitExec and RequireUniqueNames 1 year ago