Openembedded Core Discussions
 help / color / mirror / Atom feed
* [meta-selftest][PATCH] selftest-chown: add test for fifos
@ 2020-12-27  5:24 Trevor Woerner
  0 siblings, 0 replies; only message in thread
From: Trevor Woerner @ 2020-12-27  5:24 UTC (permalink / raw)
  To: openembedded-core

Verify that fifos are properly handled by the build system.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 meta-selftest/recipes-test/selftest-chown/selftest-chown.bb | 5 +++++
 meta/lib/oeqa/selftest/cases/package.py                     | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
index 87bf9438b8..440471fe80 100644
--- a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
+++ b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
@@ -3,6 +3,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
 
 LICENSE = "MIT"
 
+DEPENDS += "coreutils-native"
+
 S = "${WORKDIR}"
 
 inherit useradd allarch
@@ -16,10 +18,13 @@ do_install() {
 	install -d   ${TESTDIR}/dir
 	touch        ${TESTDIR}/file
 	ln -s ./file ${TESTDIR}/symlink
+	install -d   ${TESTDIR}/fifotest
+	mkfifo       ${TESTDIR}/fifotest/fifo
 
 	chown    test:test ${TESTDIR}/file
 	chown -R test:test ${TESTDIR}/dir
 	chown -h test:test ${TESTDIR}/symlink
+	chown -R test:test ${TESTDIR}/fifotest
 }
 
 FILES_${PN} = "${sysconfdir}/selftest-chown/*"
diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py
index 3010b1af49..7166c3991f 100644
--- a/meta/lib/oeqa/selftest/cases/package.py
+++ b/meta/lib/oeqa/selftest/cases/package.py
@@ -168,6 +168,7 @@ class PackageTests(OESelftestTestCase):
         with runqemu('core-image-minimal') as qemu:
             for path in [ sysconfdir + "/selftest-chown/file",
                           sysconfdir + "/selftest-chown/dir",
-                          sysconfdir + "/selftest-chown/symlink"]:
+                          sysconfdir + "/selftest-chown/symlink",
+                          sysconfdir + "/selftest-chown/fifotest/fifo"]:
                 if not check_ownership(qemu, "test", "test", path):
                     self.fail('Test ownership %s failed' % path)
-- 
2.30.0.rc0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-27  5:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-27  5:24 [meta-selftest][PATCH] selftest-chown: add test for fifos Trevor Woerner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox