Running large numbers of testimage tasks in parallel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 37 lines · Richard Purdie via lists.openembedded.org
In order to try and attempt to reproduce the autobuilder qemuarm* hangs, I wanted to share a quick guide on how to hack things to make running multiple testimage tasks in parallel easy.
Firstly, I added:
BBCLASSEXTEND = "${@' '.join(['mcextend:'+str(x) for x in
range(0,100)])}"to core-image-sato.bb
I then deleted the test case files listed at the end of the email to make the tests run faster. The hangs are generally in the boot process
before login so if we reach that point, it isn't a hang scenario. I could have probably setTEST_SUITESinstead.I then ran "bitbake core-image-sato" to get a base image to run the tests with. After that, I used the following script fragment:
cd tmp/deploy/images/qemuarm64
for i inseq 1 100
do
ln -s core-image-sato{,-$i}-qemuarm64.rootfs.manifest ln -s core-image-sato{,-$i}-qemuarm64.rootfs.ext4.zst ln -s core-image-sato{,-$i}-qemuarm64.rootfs.testdata.json doneI could the run 100 testimages in parallel with:
bitbake
for ((i=1; i<=80; i++)); do echo -n "core-image-sato-$i "; done-c testimage(which will run
BB_NUMBER_THREADSin parallel)I'm sure there are neater ways to do it but this basically works.
Quoted 8 lines
I haven't had any luck reproducing hangs with qemuarm64 with this yet.
I did have to switch from using a DISPLAY over ssh to unsetting DISPLAY
and using qemu's local vnc as otherwise the display traffic over ssh was limiting the CPU load I could trigger on my server.Hope someone finds this useful!
Rather than deleting tests, you can do:
TEST_SUITES = "date df parselogs perl ping scp ssh xorg"
Also, there is a decompression race in runqemu as it assumes only it is booting a given image. You can work around it by creating an uncompressed copy of the image in advance, e.g.:
zstd -d core-image-sato-qemuarmv5.rootfs-20260721071104.ext4.zst -o core-image-sato-qemuarmv5.rootfs-20260721071104.ext4
Cheers,
Richard