oeqa/selftest: Add lower layer test for overlayfs-etc

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>
This commit is contained in:
Vyacheslav Yurkov
2022-09-07 21:51:39 +02:00
committed by Richard Purdie
parent c3ec554ba5
commit 6cd5db1e62
2 changed files with 84 additions and 33 deletions

View File

@@ -12,6 +12,11 @@ OVERLAYFS_WRITABLE_PATHS[mnt-overlay] += "/usr/share/my-application"
do_install() {
install -d ${D}/usr/share/my-application
install -d ${D}${sysconfdir}
echo "Original file in /etc" >> ${D}${sysconfdir}/lower-layer-test.txt
}
FILES:${PN} += "/usr"
FILES:${PN} += "\
${exec_prefix} \
${sysconfdir \
"