1
0
mirror of https://github.com/golang/go synced 2024-09-28 20:24:29 -06:00
go/misc/cgo
Bryan C. Mills e23cc0844d misc/cgo/testplugin: set the package name in TestIssue19534
The fix for #19534 (in CL 40994) adjusted escaping in the
dynamically-linked name lookup logic for the plugin package. However,
the regression test added for it incorrectly included quotes within
the -ldflags flag, causing the flag to inadvertently be ignored.

Possibly in that same CL or possibly at some other point, the
condition that the test thought it was checking stopped working: the
dynamic lookup used the path passed to ldflags, but the object file
actually contained the symbol indexed by the original package name.

Ideally we should stop mucking around with ldflags in this test and
run 'go build' from a suitably-named directory instead, to mimic the
actual conditions in which the original bug was reported. For now, as
a more targeted fix, we can pass the '-p' flag to the compiler to
adjust the package path used at compile time to match the one that
will be set at link time.

For #43177.
Updates #19534.

Change-Id: I9763961feb37cfb05dee543f273492e91a350663
Reviewed-on: https://go-review.googlesource.com/c/go/+/407314
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-05-19 15:38:08 +00:00
..
errors misc/cgo: fix aliasing bugs in parallel tests that append to shared slices 2022-02-07 17:51:57 +00:00
fortran misc/cgo/fortran: avoid writing to $PWD 2019-11-20 22:37:23 +00:00
gmp all: gofmt main repo 2022-04-11 16:34:30 +00:00
life all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
nocgo cmd/ld: really import runtime/cgo for external link 2014-05-20 21:36:50 -07:00
stdio all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
test misc/cgo/test: remove timing dependency from TestParallelSleep 2022-04-21 18:43:55 +00:00
testasan misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testcarchive misc/cgo: fix aliasing bugs in parallel tests that append to shared slices 2022-02-07 17:51:57 +00:00
testcshared cmd/go: cgo export header to be compatible with MSVC complex types 2022-04-08 14:13:32 +00:00
testgodefs cmd/cgo: retain original file paths in godefs generated comment 2022-04-03 07:18:10 +00:00
testplugin misc/cgo/testplugin: set the package name in TestIssue19534 2022-05-19 15:38:08 +00:00
testsanitizers runtime: add address sanitizer support for riscv64 2022-05-16 06:55:54 +00:00
testshared misc/cgo: invoke "go" from $GOROOT/bin instead of $PATH 2022-05-19 15:04:11 +00:00
testsigfwd misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testso all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testsovar all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testtls all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00