From 82c905dc58a36aeae40b1b273a12f63fb1973cf4 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Mon, 13 Apr 2020 13:39:40 -0500 Subject: meta-openembedded and poky: subtree updates Squash of the following due to dependencies among them and OpenBMC changes: meta-openembedded: subtree update:d0748372d2..9201611135 meta-openembedded: subtree update:9201611135..17fd382f34 poky: subtree update:9052e5b32a..2e11d97b6c poky: subtree update:2e11d97b6c..a8544811d7 The change log was too large for the jenkins plugin to handle therefore it has been removed. Here is the first and last commit of each subtree: meta-openembedded:d0748372d2 cppzmq: bump to version 4.6.0 meta-openembedded:17fd382f34 mpv: Remove X11 dependency poky:9052e5b32a package_ipk: Remove pointless comment to trigger rebuild poky:a8544811d7 pbzip2: Fix license warning Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6 Signed-off-by: Andrew Geissler --- poky/meta/lib/oeqa/selftest/cases/package.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'poky/meta/lib/oeqa/selftest/cases/package.py') diff --git a/poky/meta/lib/oeqa/selftest/cases/package.py b/poky/meta/lib/oeqa/selftest/cases/package.py index 291627877..3010b1af4 100644 --- a/poky/meta/lib/oeqa/selftest/cases/package.py +++ b/poky/meta/lib/oeqa/selftest/cases/package.py @@ -135,7 +135,7 @@ class PackageTests(OESelftestTestCase): return False # Check debugging symbols works correctly - elif re.match("Breakpoint 1.*hello\.c.*4", l): + elif re.match(r"Breakpoint 1.*hello\.c.*4", l): return True self.logger.error("GDB result:\n%d: %s", status, output) @@ -148,3 +148,26 @@ class PackageTests(OESelftestTestCase): '/usr/libexec/hello4']: if not gdbtest(qemu, binary): self.fail('GDB %s failed' % binary) + + def test_preserve_ownership(self): + import os, stat, oe.cachedpath + features = 'IMAGE_INSTALL_append = " selftest-chown"\n' + self.write_config(features) + bitbake("core-image-minimal") + + sysconfdir = get_bb_var('sysconfdir', 'selftest-chown') + def check_ownership(qemu, gid, uid, path): + self.logger.info("Check ownership of %s", path) + status, output = qemu.run_serial(r'/bin/stat -c "%U %G" ' + path, timeout=60) + output = output.split(" ") + if output[0] != uid or output[1] != gid : + self.logger.error("Incrrect ownership %s [%s:%s]", path, output[0], output[1]) + return False + return True + + with runqemu('core-image-minimal') as qemu: + for path in [ sysconfdir + "/selftest-chown/file", + sysconfdir + "/selftest-chown/dir", + sysconfdir + "/selftest-chown/symlink"]: + if not check_ownership(qemu, "test", "test", path): + self.fail('Test ownership %s failed' % path) -- cgit v1.2.3