mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 00:32:12 +02:00
selftest-chown: add test for fifos
Verify that fifos are properly handled by the build system. (From OE-Core rev: 53988b6389ce618d4cff52bd09ae91108beca354) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
53afafe429
commit
50734c7f71
@@ -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/*"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user