Repository navigation
oeqa/runtime: Add tests for the layer's services, and fix what they found - #168
Merged
otavio merged 10 commits intoNov 17, 2026
Merged
Conversation
The script once handled only $INTERFACE. The INTERFACES loop replaced it, but a copy of the old block stayed after the loop and repeated the work for the last interface, plus an IF_FILE built from the unset variable. Behaviour is unchanged. Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
OE-Core's busybox no longer builds ifconfig, so on oel the script stored
the MAC but failed restoring it ("ifconfig: not found"). busybox and
iproute2 both provide 'ip link set dev <if> address <mac>'. Tested with
the new ossystems_net_persistent_mac oeqa test on qemux86-64.
Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
Checks that the restore ran at boot (anchor and unit result) and that removing the anchor restores the factory files and runs the hooks once. Tested with testimage on qemux86-64. Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
Checks the unit result, that each configured interface has its MAC stored, and on a dummy interface that a stored MAC is applied. Tested with testimage on qemux86-64. Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
Checks that the units are enabled and, headless, that 'easysplash open' plays the installed animation into fakesink and exits 0 after 'easysplash client --stop'. Tested with testimage on qemux86-64. Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
Checks that zram_swap.service is active and a zram swap is listed in /proc/swaps; skips on kernels without zram. It fails today on linux-yocto with features/zram: the unit asks for zstd, and the kernel builds only the lzo zram backend. Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
zram_swap.service sized the device with "free -m", which BusyBox ignores, so the size came out in KiB and zram-init failed with "cannot set zram0 size" (110880 MB asked on a 216 MiB guest). Patch the unit to read MemTotal instead. Tested with testimage on qemux86-64 (oel). Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
"zram-init 0" wrote /dev/zram0 to zram-control/hot_remove, which takes the id, so it exited 1 after tearing the swap down and failed ExecStop of zram_swap.service. Tested with testimage on qemux86-64 (oel), which now stops and restarts the unit. Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
The sysvinit branch installed upstream's openrc-run script, which needs OpenRC, so zram-init never ran under sysvinit. Ship a small LSB script doing what zram_swap.service does, with ZRAM_SIZE and ZRAM_ALGO overridable in /etc/default/zram-init. Tested start/stop/restart/status by hand on qemux86-64. Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
The test only covered start, so the broken ExecStop went unnoticed. Tested with testimage on qemux86-64 (oel). Signed-off-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br>
lucianogdittgen
force-pushed
the
test/oeqa-runtime
branch
from
November 17, 2026 19:01
62821a6 to
561a5eb
Compare
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds oeqa runtime test modules for the services this layer ships:
ossystems-factory-defaults,net-persistent-mac,easysplashandzram-init. Running them turned up real bugs, and the fixes are in this PR:ifconfig, which is not in OE-Core's busybox, so it now usesip. A leftover block that read an unset$INTERFACEand wrote a stray.macfile is dropped.zram_swap.servicenever started on BusyBox systems. BusyBoxfreeignores-mand prints KiB, so the unit asked for a device 1024× too large (cannot set zram0 size). It now readsMemTotalfrom/proc/meminfo./dev/zram0was written tozram-control/hot_remove, which expects the id. That madeExecStopfail.openrc-runscript, which cannot run without OpenRC. It now ships a small LSB script that matches the systemd unit; the size and algorithm can be overridden in/etc/default/zram-init.Both zram-init patches are
Upstream-Status: Pending, because upstreammainis still at our SRCREV (96579c7) and has neither fix.Note: on kernels ≥ 6.12,
-azstdneedsCONFIG_ZRAM_BACKEND_ZSTD. linux-yocto'sfeatures/zram/zram.cfgdoesn't set it, so zram-init warns and falls back to the kernel defaultlzo-rle. That fallback is harmless and is a kernel-cache matter, so it isn't changed here.To run the tests, add
IMAGE_CLASSES += "testimage"and include the packages in the image, then run:TEST_SUITES = "ping ssh ossystems_factory_defaults ossystems_net_persistent_mac ossystems_zram_init ossystems_easysplash"Tested on qemux86-64 / DISTRO=oel (linux-yocto 6.18, slirp+kvm):
bitbake core-image-minimal -c testimage: 11/11 pass. The zram test also stops and restarts the unit./etc/defaultoverride, and the usage error.bitbake -pis clean.