| Message ID | 20251027202240.4100310-1-skandigraun@gmail.com |
|---|---|
| State | Accepted, archived |
| Commit | 81f7b60fb1c5096bbc233f632040d1ea9ec5bb21 |
| Headers | show |
| Series | [v2] tar: use diffutils for ptest instead of busybox | expand |
On 2025-10-27 16:22, Gyorgy Sarvari via lists.openembedded.org wrote: > 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 <skandigraun@gmail.com> Thanks for submitting this. I can confirm the increased duration you report, but I haven't yet been able to reproduce the error locally in the past, despite following a similar looping process and doing some loading. I tried again to reproduce it this morning and still couldn't over 37 runs (even with some loading on the system). I did however just test your change on the image and saw a very consistent ~40s duration for the sparse03 test. I think we should take this ASAP and see if the tar issue goes away. - Trevor > --- > > v2: add a comment in the recipe > > 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" > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#225356): https://lists.openembedded.org/g/openembedded-core/message/225356 > Mute This Topic: https://lists.openembedded.org/mt/115982188/7611679 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [tgamblin@baylibre.com] > -=-=-=-=-=-=-=-=-=-=-=- >
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"
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 <skandigraun@gmail.com> --- v2: add a comment in the recipe meta/recipes-extended/tar/tar_1.35.bb | 4 ++++ 1 file changed, 4 insertions(+)