mirror of
https://git.yoctoproject.org/poky
synced 2026-09-29 07:36:20 +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"
|
LICENSE = "MIT"
|
||||||
|
|
||||||
|
DEPENDS += "coreutils-native"
|
||||||
|
|
||||||
S = "${WORKDIR}"
|
S = "${WORKDIR}"
|
||||||
|
|
||||||
inherit useradd allarch
|
inherit useradd allarch
|
||||||
@@ -16,10 +18,13 @@ do_install() {
|
|||||||
install -d ${TESTDIR}/dir
|
install -d ${TESTDIR}/dir
|
||||||
touch ${TESTDIR}/file
|
touch ${TESTDIR}/file
|
||||||
ln -s ./file ${TESTDIR}/symlink
|
ln -s ./file ${TESTDIR}/symlink
|
||||||
|
install -d ${TESTDIR}/fifotest
|
||||||
|
mkfifo ${TESTDIR}/fifotest/fifo
|
||||||
|
|
||||||
chown test:test ${TESTDIR}/file
|
chown test:test ${TESTDIR}/file
|
||||||
chown -R test:test ${TESTDIR}/dir
|
chown -R test:test ${TESTDIR}/dir
|
||||||
chown -h test:test ${TESTDIR}/symlink
|
chown -h test:test ${TESTDIR}/symlink
|
||||||
|
chown -R test:test ${TESTDIR}/fifotest
|
||||||
}
|
}
|
||||||
|
|
||||||
FILES_${PN} = "${sysconfdir}/selftest-chown/*"
|
FILES_${PN} = "${sysconfdir}/selftest-chown/*"
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ class PackageTests(OESelftestTestCase):
|
|||||||
with runqemu('core-image-minimal') as qemu:
|
with runqemu('core-image-minimal') as qemu:
|
||||||
for path in [ sysconfdir + "/selftest-chown/file",
|
for path in [ sysconfdir + "/selftest-chown/file",
|
||||||
sysconfdir + "/selftest-chown/dir",
|
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):
|
if not check_ownership(qemu, "test", "test", path):
|
||||||
self.fail('Test ownership %s failed' % path)
|
self.fail('Test ownership %s failed' % path)
|
||||||
|
|||||||
Reference in New Issue
Block a user