summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/overlayfs.py
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/selftest/overlayfs: test read-only rootfsBaruch Siach2024-04-041-6/+28
| | | | | | | | | | | Use the read-only squashfs filesystem to test the read-only case. (From OE-Core rev: 1a61da196f014dc34a998d3e46f03abc79ebc84d) Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/overlayfs: Fix whitespaceRichard Purdie2023-12-201-1/+1
| | | | | | | | | | | | My previous fix missed out whitespace with the append, fix that. (From OE-Core rev: 393c4459851642b8b7e93ff303d6526cd5c97b22) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> # Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/overlayfs: Don't overwrite DISTRO_FEATURESRichard Purdie2023-12-201-1/+1
| | | | | | | | | | | | Whilst debugging an autobuilder failure, I wondered why it was rebuilding qemu-system-native instead of reusing from sstate. The reason was it was overwriting DISTRO_FEATURES, in this case removing opengl which caused much to rebuild. The test doesn't need that so don't do it. (From OE-Core rev: fdcc011608fd9558a081d0ace3eaf7192d9fcaef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: Ensure usrmerge is enabled with systemdRichard Purdie2023-08-111-4/+4
| | | | | | | | | systemd now requires usrmerge, ensure this is always the case in our test cases. (From OE-Core rev: 465bf84c523403ccc7dc6ed8c2a9c32d85929e8c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/overlayfs: enable systemd via INIT_MANAGERAlexander Kanavin2023-03-111-14/+6
| | | | | | | | | | | | Latest systemd version needs the full set of settings enabled by that (if also r/o rootfs is enabled), and refuses to boot otherwise. (From OE-Core rev: 16f7661000a50e58d512a5d47794c5f8be2c49e6) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/overlayfs: overlayfs: skip x86-specific testsRoss Burton2022-11-111-0/+6
| | | | | | | | | | | For now, not all machines have a default wks file, so mark the tests which need a wks as being specific to qemux86-64. (From OE-Core rev: 152f1a8cdf698b71c956e9910911dcb141a1f5be) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Add lower layer test for overlayfs-etcVyacheslav Yurkov2022-09-091-22/+68
| | | | | | | | | | | | | Place a test file on the /etc by means of overlayfs-user recipe. Perform QA checks to make sure that: - When lower layer is exposed, that it's read-only to avoid undefined behavior - By default lower layer is not exposed (From OE-Core rev: 2fc742178675598208b400d9889a1681249d7eea) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: drop image_feature test from overlayfsVyacheslav Yurkov2022-09-091-12/+1
| | | | | | | | | | | The test checked the incorrect class use with INHERIT. This functionality is now covered by bitbake (From OE-Core rev: ec4799b7230ed7e99cf2b13fdf8f6d59a0e12795) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib: Add copyright statements to files without oneRichard Purdie2022-08-121-0/+2
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also add license identifiers as MIT if there isn't one. (From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/imagefeatures/overlayfs: Always append to DISTRO_FEATURESRichard Purdie2022-05-161-8/+8
| | | | | | | | | | Using += unintentionally removes all other entries from DISTRO_FEATURES if DISTRO_FEATURES was set by ?= such as by poky.conf. This reduces sstate reusage on the autobuilder. Fix this to speed up builds. (From OE-Core rev: 124b82c32c4545bb216a8249954817f692f9795a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: rootfs-postcommands: add skip option to overlayfs_qa_checkClaudius Heine2022-05-031-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The overlayfs_qa_check checks if the current root file system has a mount configured for each overlayfs, when the overlayfs class is used. However there are certain instances where this mount point is created at runtime and not static in a fstab entry or systemd mount unit. One such case would be if overlayfs-etc is used, where the device is mounted in the preinit script and not via a mount unit or fstab entry. However there are other possibilities for this as well, like startup scripts that support a dynamic partition layout. For instance when systemd-repart is used. This adds the `OVERLAYFS_QA_SKIP` variable, which allows to define QA skips via its flags. In principle it supports multiple QA skip flags separated by whitespace, but only one (`mount-configured`) is implemented here. To skip this QA check simply add `mount-configured` to the flag of `OVERLAYFS_QA_SKIP` with the same name. For instance if a overlayfs is configured as: OVERLAYFS_MOUNT_POINT[data] = "/data" Skipping this QA check can be done by setting: OVERLAYFS_QA_SKIP[data] = "mount-configured" Also add a testcase and fix a typo (fstat -> fstab). (From OE-Core rev: 2ce9173169a2a86392c4a85fe9be7fbbd7353b7f) Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: tag tests that use runqemuRoss Burton2022-04-011-1/+5
| | | | | | | | | | | There may be environments or machines which don't have working runqemu, so tag all of the tests which use runqemu() so that they can be skipped. (From OE-Core rev: 3f45ce6d2b1dfde8bc3d554397d55f81846c52d5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: selftest: overlayfs: add test for image with fstab entryStefan Herbrechtsmeier2022-03-041-27/+55
| | | | | | | (From OE-Core rev: 67f1959a46beec5edf133f2f8b02635feea7e599) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: rootfs-postcommands: include /etc/fstab in overlayfs_qa_checkStefan Herbrechtsmeier2022-03-041-2/+2
| | | | | | | | | | | | | | | | | The systemd init manager support mount point configuration via mount units and /etc/fstab. 'Mounts listed in /etc/fstab will be converted into native units dynamically at boot and when the configuration of the system manager is reloaded. In general, configuring mount points through /etc/fstab is the preferred approach.' [1] Read mount points from /etc/fstab to determine dynamic mount units. [1] https://www.freedesktop.org/software/systemd/man/systemd.mount.html (From OE-Core rev: 9db988dae6dbf6da7b066728bc13b59a5c45b75c) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: unit tests for overlayfs-etcVyacheslav Yurkov2021-12-121-0/+184
| | | | | | | (From OE-Core rev: 3ca1ce7a3779d0b875385eb4045bd5a51dc839da) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: overlayfs helper functionVyacheslav Yurkov2021-12-121-16/+16
| | | | | | | | | Move helper functions out of class scope so they can be used in other tests (From OE-Core rev: 439a5a575b8ca27910431c71f01bf310122ff7ab) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: extend overlayfs testVyacheslav Yurkov2021-10-301-0/+42
| | | | | | | | | | | Test that overlayfs.bbclass generates one systemd unit, that applications can set dependencies on, and that this unit mounts all required overlays (From OE-Core rev: b0e335268de78cfe163f3cfdc0209ae26309fc78) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: refactor common functionsVyacheslav Yurkov2021-10-301-9/+7
| | | | | | | (From OE-Core rev: 66de5de793f3c86502d193f7e3abc8fa17642369) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: overlayfs unit testsVyacheslav Yurkov2021-08-121-0/+171
Unit tests for overlayfs.bbclass (From OE-Core rev: b393e1982090063d9d0610fdcfd3601e78a501c0) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>