]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
selftest/reproducible: Limit memory used by diffoscope
authorYoann Congal <yoann.congal@smile.fr>
Fri, 23 May 2025 19:24:29 +0000 (21:24 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 25 May 2025 10:24:51 +0000 (11:24 +0100)
commit04cbcfc7e09d19b0ba50e7940fc82d10e222fdbe
tree59381effad8e4433f7270e123b413ec274791cb3
parentcf39461e97098a1b28693299677888ba7e8bfccf
selftest/reproducible: Limit memory used by diffoscope

When working on large diffs (eg in  meta-oe's repro test) diffoscope may
use a huge amount of memory and trigger OOM kills on parallel builds.

Use the max_diff_block_lines_saved option to limit to 1024 the number of
diff lines saved in a block. Also, limit the number of line in the
report to generate a report even when the limit is reached.

The chosen default 1024 comes from diffoscope default for a diff block.

For a random 10MB binary (packaged in ipk, deb and rpm), this does
decrease the "Maximum resident set size" of diffoscope from 1.3GB to
400MB.

As an added bonus, this also make diffoscope bail out earlier, on the
same example: execution time goes from 30 minutes down to 7.

Fixes [YOCTO #15876]

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/reproducible.py