Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Trevor Woerner" <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [meta-selftest][PATCH] selftest-chown: add test for fifos
Date: Sun, 27 Dec 2020 00:24:01 -0500	[thread overview]
Message-ID: <20201227052401.40000-1-twoerner@gmail.com> (raw)

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


                 reply	other threads:[~2020-12-27  5:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201227052401.40000-1-twoerner@gmail.com \
    --to=twoerner@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox