From 81f7b60fb1c5096bbc233f632040d1ea9ec5bb21 Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Mon, 27 Oct 2025 21:22:39 +0100 Subject: [PATCH] tar: use diffutils for ptest instead of busybox A testcase (sparse03) sometimes times out on the AB, in qemu (without kvm): the test generates an 8GB sparse file, tars it, untars it, and then it compares the two versions with cmp. This process, going through 16GB of data (using one thread, with cmp) takes some time anyway, but when there is extra load on the host machine, and qemu can't use its core exclusively, then it can take more than 5 minutes easily (which is the default ptest timeout). However the full version of cmp from diffutils seems to be more efficient than the busybox version: When using busybox on my idle machine (w/ qemuriscv64) the test case execution takes 150s, and it almost always times out when there is extra load. Using diffutils, my idle machine executes the same testcase in 55s, and it never times out even if there is high load on the host system (execution always stayed under 3 minutes). Due to this switch to diffutils when running ptest. Fixes [YOCTO 15884] Signed-off-by: Gyorgy Sarvari Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/recipes-extended/tar/tar_1.35.bb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-extended/tar/tar_1.35.bb b/meta/recipes-extended/tar/tar_1.35.bb index ea0993a909..d463eff97d 100644 --- a/meta/recipes-extended/tar/tar_1.35.bb +++ b/meta/recipes-extended/tar/tar_1.35.bb @@ -94,3 +94,7 @@ BBCLASSEXTEND = "native nativesdk" # Avoid false positives from CVEs in node-tar package # For example CVE-2021-{32803,32804,37701,37712,37713} CVE_PRODUCT = "gnu:tar" + +# A test uses cmp to compare two 8GB files. Busybox's cmp does the job usually, but it is much slower than +# diffutils' cmp, and the test times out when there is a high load on the host machine. +RDEPENDS:${PN}-ptest += "diffutils" -- 2.47.3