]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
classes: rootfs-postcommands: add skip option to overlayfs_qa_check
authorClaudius Heine <ch@denx.de>
Tue, 3 May 2022 08:22:33 +0000 (10:22 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 3 May 2022 16:49:34 +0000 (17:49 +0100)
commit2ce9173169a2a86392c4a85fe9be7fbbd7353b7f
tree85a5af4164cfbef20c868f0bac9c8cb4866c709b
parentfe7bc6f16184d5ebdb1dd914b6dcb75c9e5e0c9c
classes: rootfs-postcommands: add skip option to overlayfs_qa_check

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).

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>
meta/classes/rootfs-postcommands.bbclass
meta/lib/oeqa/selftest/cases/overlayfs.py