Re: [OE-core][PATCH v1] go: add ptest support

Mathieu Dubois-Briand
2026-03-06T10:23:16Z

On Thu Mar 5, 2026 at 12:02 PM CET, Pratik Farkase wrote:
> Add ptest infrastructure to test the Go standard library.
>
> - Run 'go test -short std' via run-ptest script
> - Install source tree and pkg/include headers
> - Create VERSION file for architecture detection
> - Exclude multi-arch binary testdata to avoid QA errors
>
> Test results: 237/253 pass (93.7%) on qemux86-64.
>
> Known issues:
> - debug/elf, debug/pe, debug/plan9obj, internal/xcoff: missing binary testdata
> - time: requires embedded timezone data
> - net/http: requires unstripped go binary
> - testing, go/types: minor edge cases
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---

Hi Pratik,

Thanks for your patch.

It looks like this is failing QA, when we are building for another
architecture:

ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/bitfields.elf4 [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/rnglistx.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/issue57046-clang.elf5 [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/typedef.elf4 [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/line-gcc-dwarf5.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/line-gcc-zstd.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/cycle.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/split.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/line-gcc.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/ranges.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/line-clang-dwarf5.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/line-clang.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/typedef.elf5 [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/cppunsuptypes.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/dwarf/testdata/typedef.elf [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/elf/testdata/go-relocation-test-gcc930-ranges-no-rela-x86-64 [arch]
ERROR: go-1.26.0-r0 do_package_qa: QA Issue: Architecture did not match (x86-64, expected AArch64) in /usr/lib/go/ptest/src/debug/elf/testdata/go-relocation-test-gcc930-ranges-with-rela-x86-64 [arch]

https://autobuilder.yoctoproject.org/valkyrie/#/builders/9/builds/3286
https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/3272
https://autobuilder.yoctoproject.org/valkyrie/#/builders/22/builds/3328
https://autobuilder.yoctoproject.org/valkyrie/#/builders/65/builds/3289
https://autobuilder.yoctoproject.org/valkyrie/#/builders/80/builds/3136

Can you have a look at the issue?

Thanks,
Mathieu

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering