RE: [OE-core][PATCH v3] go: add ptest support

Marko, Peter
2026-04-13T12:27:20Z

Hello Pratik,

I think that better is to run the full testsuite and increase QB_MEM for virtclass-mcextend-go under
https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/images/core-image-ptest.bb#n36

Peter

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Pratik Farkase
> Sent: Monday, April 13, 2026 2:05 PM
> To: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>; openembedded-
> core@lists.openembedded.org
> Cc: pratik.farkase@ericsson.com
> Subject: Re: [OE-core][PATCH v3] go: add ptest support
>
> Hi Mathieu,
>
> Apologies for getting back bit late and thanks for testing v3 and identifying the OOM
> issue.
>
> The root cause is that Go's test suite performs on-the-fly compilation during
> test execution. Even with the autobuilder's 1GB RAM (QB_MEM = '-m 1024'),
> attempting all 253 stdlib packages causes OOM kills as compilation processes
> consume ~1.5GB.
>
> For v4, I've switched to a curated subset of 17 core packages that complete
> successfully within the 1GB constraint:
>
> Test results on qemux86-64 with 1GB RAM: 17/17 pass (100%) in ~6-7 minutes.
>
> Best Regards,
> Pratik
>
> ________________________________________
> From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> Sent: Thursday, March 19, 2026 7:57 AM
> To: Pratik Farkase; openembedded-core@lists.openembedded.org
> Cc: pratik.farkase@ericsson.com
> Subject: Re: [OE-core][PATCH v3] go: add ptest support
>
> On Wed Mar 18, 2026 at 3:03 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>
> > ---
> > Changes in v3:
> > - Move go from PTESTS_FAST to PTESTS_SLOW (~45min runtime)
> > inside ptest-packagelists.inc
> >
> > Changes in v2:
> > - Exclude .elf* files to fix QA arch errors on all architectures
> > - Exclude *-x86-64* files to fix additional arch-specific test binaries
> > - Tested on x86-64, x86, aarch64, and arm builds
> > ---
>
> Hi Pratik,
>
> Thanks for the new version, but we still have some failures:
>
> WARNING: core-image-ptest-go-1.0-r0 do_testimage: There were failing ptests.
> Traceback (most recent call last):
> File "/srv/pokybuild/yocto-worker/qemux86-64-ptest/build/layers/openembedded-
> core/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
> return func(*args, **kwargs)
> File "/srv/pokybuild/yocto-worker/qemux86-64-ptest/build/layers/openembedded-
> core/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
> return func(*args, **kwargs)
> File "/srv/pokybuild/yocto-worker/qemux86-64-ptest/build/layers/openembedded-
> core/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
> return func(*args, **kwargs)
> File "/srv/pokybuild/yocto-worker/qemux86-64-ptest/build/layers/openembedded-
> core/meta/lib/oeqa/runtime/cases/ptest.py", line 27, in test_ptestrunner_expectfail
> self.do_ptestrunner()
> ~~~~~~~~~~~~~~~~~~~^^
> File "/srv/pokybuild/yocto-worker/qemux86-64-ptest/build/layers/openembedded-
> core/meta/lib/oeqa/runtime/cases/ptest.py", line 121, in do_ptestrunner
> self.fail(failmsg)
> ~~~~~~~~~^^^^^^^^^
> AssertionError: ERROR: Processes were killed by the OOM Killer:
> [ 132.843492] Out of memory: Killed process 769 (compile) total-vm:1553664kB,
> anon-rss:256564kB, file-rss:0kB, shmem-rss:128kB, UID:0 pgtables:644kB
> oom_score_adj:0
>
>
> Failed ptests:
> {'go': ['archive/tar',
> 'archive/zip',
> 'bufio',
> 'bytes',
> 'cmp',
> 'compress/bzip2',
> 'compress
> ...
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/3319
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/3294
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/1277
>
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com