diff options
| author | Trevor Woerner <twoerner@gmail.com> | 2020-12-27 00:24:01 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-30 14:01:07 +0000 |
| commit | 50734c7f71c7ead1e71cd447918463ff56465d11 (patch) | |
| tree | 2d217695fd8506d073804d5acef79d5bac31a70e | |
| parent | 53afafe42930aada4924cfa2fb5b6be587713312 (diff) | |
| download | poky-50734c7f71c7ead1e71cd447918463ff56465d11.tar.gz | |
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>
| -rw-r--r-- | meta-selftest/recipes-test/selftest-chown/selftest-chown.bb | 5 | ||||
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/package.py | 3 |
2 files changed, 7 insertions, 1 deletions
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 | |||
| 3 | 3 | ||
| 4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
| 5 | 5 | ||
| 6 | DEPENDS += "coreutils-native" | ||
| 7 | |||
| 6 | S = "${WORKDIR}" | 8 | S = "${WORKDIR}" |
| 7 | 9 | ||
| 8 | inherit useradd allarch | 10 | inherit useradd allarch |
| @@ -16,10 +18,13 @@ do_install() { | |||
| 16 | install -d ${TESTDIR}/dir | 18 | install -d ${TESTDIR}/dir |
| 17 | touch ${TESTDIR}/file | 19 | touch ${TESTDIR}/file |
| 18 | ln -s ./file ${TESTDIR}/symlink | 20 | ln -s ./file ${TESTDIR}/symlink |
| 21 | install -d ${TESTDIR}/fifotest | ||
| 22 | mkfifo ${TESTDIR}/fifotest/fifo | ||
| 19 | 23 | ||
| 20 | chown test:test ${TESTDIR}/file | 24 | chown test:test ${TESTDIR}/file |
| 21 | chown -R test:test ${TESTDIR}/dir | 25 | chown -R test:test ${TESTDIR}/dir |
| 22 | chown -h test:test ${TESTDIR}/symlink | 26 | chown -h test:test ${TESTDIR}/symlink |
| 27 | chown -R test:test ${TESTDIR}/fifotest | ||
| 23 | } | 28 | } |
| 24 | 29 | ||
| 25 | FILES_${PN} = "${sysconfdir}/selftest-chown/*" | 30 | 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): | |||
| 168 | with runqemu('core-image-minimal') as qemu: | 168 | with runqemu('core-image-minimal') as qemu: |
| 169 | for path in [ sysconfdir + "/selftest-chown/file", | 169 | for path in [ sysconfdir + "/selftest-chown/file", |
| 170 | sysconfdir + "/selftest-chown/dir", | 170 | sysconfdir + "/selftest-chown/dir", |
| 171 | sysconfdir + "/selftest-chown/symlink"]: | 171 | sysconfdir + "/selftest-chown/symlink", |
| 172 | sysconfdir + "/selftest-chown/fifotest/fifo"]: | ||
| 172 | if not check_ownership(qemu, "test", "test", path): | 173 | if not check_ownership(qemu, "test", "test", path): |
| 173 | self.fail('Test ownership %s failed' % path) | 174 | self.fail('Test ownership %s failed' % path) |
