Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

"garble test" doesn't work with reflection #966

Open
@huibeu

Description

@huibeu

Output ofgarble version:

mvdan.cc/garble v0.14.2Build settings:      -buildmode exe       -compiler gc  DefaultGODEBUG gotestjsonbuildtext=1,multipathtcp=0,randseednop=0,rsa1024min=0,tlsmlkem=0,x509rsacrt=0,x509usepolicies=0     CGO_ENABLED 1          GOARCH amd64            GOOS linux         GOAMD64 v1

Output ofgo env in your module/workspace:

AR='ar'CC='gcc'CGO_CFLAGS='-O2 -g'CGO_CPPFLAGS=''CGO_CXXFLAGS='-O2 -g'CGO_ENABLED='1'CGO_FFLAGS='-O2 -g'CGO_LDFLAGS='-O2 -g'CXX='g++'GCCGO='gccgo'GO111MODULE=''GOAMD64='v1'GOARCH='amd64'GOAUTH='netrc'GOBIN=''GOCACHE='/root/.cache/go-build'GOCACHEPROG=''GODEBUG=''GOENV='/root/.config/go/env'GOEXE=''GOEXPERIMENT=''GOFIPS140='off'GOFLAGS=''GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1753113114=/tmp/go-build -gno-record-gcc-switches'GOHOSTARCH='amd64'GOHOSTOS='linux'GOINSECURE=''GOMOD='/dev/null'GOMODCACHE='/go/pkg/mod'GONOPROXY=''GONOSUMDB=''GOOS='linux'GOPATH='/go'GOPRIVATE=''GOPROXY='https://proxy.golang.org,direct'GOROOT='/usr/local/go'GOSUMDB='sum.golang.org'GOTELEMETRY='local'GOTELEMETRYDIR='/root/.config/go/telemetry'GOTMPDIR=''GOTOOLCHAIN='local'GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'GOVCS=''GOVERSION='go1.24.5'GOWORK=''PKG_CONFIG='pkg-config'

What did you do?

go test gives errors, even when running tests on the std packages.

# This worksgotest reflectgotest encoding/xmlgotest encoding/json# This gives failing tests and build errorsgarbletest reflectgarbletest encoding/xmlgarbletest encoding/json

I did not see any issues when running code withgarble run orgarble build.

What did you see happen?

garble test reflect

# reflect.testlist flag: not foundFAILreflect [build failed]FAILexit status 1

garble test encoding/xml

--- FAIL: TestMarshal (0.00s)    --- FAIL: TestMarshal/2 (0.00s)        ozLy15Wlr.go:1: marshal(&bvuKzfAhE4.Jp9cjKXs{MmON2eeJ:true}):            have `<Jp9cjKXs><MmON2eeJ>true</MmON2eeJ></Jp9cjKXs>`            want `<Plain><V>true</V></Plain>`[...]FAILFAILencoding/xml3.234sFAILexit status 1

garble test encoding/json

# encoding/json.testlist internal/fuzz: not foundFAILencoding/json [build failed]FAILexit status 1

What did you expect to see?

I expected the output to look similar to running the tests withgo test:

$ go test reflectok  reflect0.279s$ go test encoding/xmlok  encoding/xml3.360s$ go test encoding/jsonok  encoding/json0.378s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp