Re: execute pkg_postinst_ontarget when read-only-rootfs-delayed-postinsts is set for a read only rootfs
"Gassner, Tobias.ext" <[email protected]>
| Newsgroups | org.yoctoproject.lists.poky |
|---|---|
| Message-ID | <[email protected]> |
> > Do we need to try every package manager in a loop? I know other tests do > it, but if the issue being tested is read-only rootfs with read-write /tmp, > then maybe testing just once is enough? > The combination of not setting systemd as init and rpm as package class leads to a hanging boot of qemu, see below. > > Why systemd? Is it needed for something? Note that any deviation from default > config risks adding full builds without sstate to the test, preventing > sstate reuse. > As far as I understand the postinst_ontarget mechanism, a script is deployed to the target, which is executed on the first boot by init and deleted afterwards. since I configured a read-only rootfs, the script cannot be deleted. if I don't set systemd as init manager, qemu hangs on boot but *only* for the rpm package class. I have the assumption that this is related to the fact that the postinst_ontarget script cannot be deleted. With systemd as init manager qemu boots normally for all package classes and the test passes. I guess that if I would configure an overlayFS, the test would probably pass for other init managers as well, but that would add a lot of boilerplate code so I tried the KISS solution in the first attempt. 2024-07-04 15:25:44,358 - oe-selftest - INFO - Ran 1 test in 1193.515s 2024-07-04 15:25:44,358 - oe-selftest - INFO - FAILED 2024-07-04 15:25:44,358 - oe-selftest - INFO - (errors=1) 2024-07-04 15:25:47,294 - oe-selftest - INFO - RESULTS: 2024-07-04 15:25:47,294 - oe-selftest - INFO - RESULTS - runtime_test.Postinst.test_postinst_on_target_for_read_only_rootfs: UNKNOWN (1193.40s) 2024-07-04 15:25:47,394 - oe-selftest - INFO - SUMMARY: 2024-07-04 15:25:47,395 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 1193.517s 2024-07-04 15:25:47,395 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed (successes=0, skipped=0, failures=0, errors=1)