From eee7d70a4dbbd89645098df2397aa3f4e5d8baa0 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Thu, 27 May 2021 01:23:47 -0500 Subject: subtree updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit meta-openembedded: 346681e7bf..11eae11452: Aditya.Tayade (1): neon: Add ptest Andrei Gherzan (1): nss: Fix warnings generated by getcwd Andrej Kozemcak (1): libupnp: Fix CVE-2020-13848 Armin Kuster (3): wireguard: fix build issue with updated 5.4 kernel nostromo: Blacklist and exclude from world builds packagegroup-meta-webserver: remove nostromo from pkg grp Clément Péron (1): nodejs: 12.20.2 -> 12.21.0 Khem Raj (1): linuxptp: Fix cross build Marek Vasut (1): freerdp: Add missing libxkbcommon WL dependency Martin Jansa (9): opencv: refresh patches with devtool to apply cleanly ceres-solver: prevent fetching git hook during do_configure packagegroup-meta-oe: include nodejs without meta-python2 conditional packagegroup-meta-oe: move the packages depending on meta-python2 to separate packages packagegroup-meta-oe: add guider uml-utilities: fix installed-vs-shipped with usrmerge telepathy-glib: respect GI_DATA_ENABLED when enabling vala-bindings libyui: switch to libyui-old repo which still has this SRCREV ostree: switch from default master branch to main to fix do_fetch failure Mingli Yu (2): hostapd: fix CVE-2019-5061 hostapd: fix CVE-2021-0326 and CVE-2021-27803 Neetika Singh (1): opencv: Security fixes Peace Lee (2): guider: Upgrade to 3.9.7 Update commit for version 3.9.7 Rahul Taya (1): nghttp2: Add fix for CVE-2020-11080 Saloni Jain (1): fuse: Whitelisted CVE-2019-14860 Sana Kazi (1): mdns: Whitelisted CVE-2007-0613 for mdns Sean Nyekjaer (1): nodejs: 12.20.1 -> 12.20.2 Stefan Ghinea (1): hostapd: fix CVE-2021-30004 changqing.li@windriver.com (1): thin-provisioning-tools: switch branch from master to main poky: d20ef1f5a5..6ebb33bdac: Alejandro Hernandez Samaniego (1): devtool: Fix do_kernel_configme task Alexander Kanavin (11): selftest/reproducible: enable world reproducibility test selftest/reproducible: add an exclusion list for items that are not yet reproducible selftest/reproducible: track unusued entries in the exclusion list oeqa: tear down oeqa decorators if one of them raises an exception in setup meta/lib/oeqa/core/tests/cases/timeout.py: add a testcase for the previous fix diffoscope: add native libraries to LD_LIBRARY_PATH Revert "oeqa: Set LD_LIBRARY_PATH when executing native commands" ovmf: update to 202002 ovmf: update to 202005 ovmf: update edk2-stable202005 -> edk2-stable202008 linux-firmware: upgrade 20210208 -> 20210315 Anatol Belski (2): glibc: Pull latest 2.31 HEAD tar: Fix CVE-2021-20193 Anton D. Kachalov (1): run-postinsts: do not remove postinsts directory. Anuj Mittal (1): lsb-release: fix reproducibility failure Bruce Ashfield (14): linux-yocto/5.4: update to v5.4.99 linux-yocto/5.4: update to v5.4.101 linux-yocto/5.4: update to v5.4.103 linux-yocto/5.4: update to v5.4.105 linux-yocto/5.4: update to v5.4.107 linux-yocto/5.4: update to v5.4.109 linux-yocto/5.4: update to v5.4.111 linux-yocto/5.4: update to v5.4.112 linux-yocto/5.4: fix arm defconfig warnings linux-yocto/5.4: update to v5.4.114 linux-yocto/5.4: update to v5.4.116 perf: fix python-audit RDEPENDS make-mod-scripts: add HOSTCXX definitions and gmp-native dependency linux-yocto/5.4: qemuppc32: reduce serial shutdown issues Catalin Enache (1): connman: fix CVE-2021-26675, CVE-2021-26676 Charlie Davies (1): bitbake-bblayers/create: Fix incorrect priority help message Chee Yang Lee (1): initrdscripts: init-install-efi.sh install extra files for ESP Chen Qi (4): python3-jinja2: set CVE_PRODUCT cups: use /run instead /var/run in systemd's unit file populate_sdk_ext: record METADATA_REVISION db: update CVE_PRODUCT Christophe Chapuis (1): rootfs.py: find .ko.gz and .ko.xz kernel modules as well Christopher Larson (2): buildhistory: add missing vardepsexcludes image,populate_sdk_base: move 'func' flag setting for sdk command vars Denys Dmytriyenko (1): maintainers: update own email address Diego Santa Cruz (1): iputils: fix various arping regressions Diego Sueiro (1): oeqa/selftest/bblayers: Add test case for bitbake-layers layerindex-show-depends Dorinda (7): meta/recipes-rt: Add HOMEPAGE / DESCRIPTION meta-skeleton: Add HOMEPAGE / DESCRIPTION meta/recipes-extended: Add HOMEPAGE / DESCRIPTION meta/recipes-support: Add HOMEPAGE / DESCRIPTION meta/recipes-kernel: Add HOMEPAGE / DESCRIPTION meta/recipes-multimedia: Add HOMEPAGE / DESCRIPTION meta/recipes-graphics: Add HOMEPAGE / DESCRIPTION Dorinda Bassey (3): meta/recipes-devtools: Add HOMEPAGE / DESCRIPTION meta-selftest: Add HOMEPAGE / DESCRIPTION devshell.bbclass: Exceptions displayed within devpyshell Douglas Royds (4): cmake: Fully-qualified path to ar externalsrc: Detect code changes in submodules Revert "externalsrc: Detect code changes in submodules" externalsrc: Detect code changes in submodules Florian Bezdeka (1): wic: Warn if an ext filesystem affected by the Y2038 problem is used Gavin Li (1): kmod: do not symlink config.guess/config.sub during autoreconf Guillaume Champagne (1): image-live.bbclass: optional depends when ROOTFS empty He Zhe (1): cryptodev-module: Backport a patch to fix build failure with kernel v5.8 Jan Brzezanski (1): bitbake: Force parser shutdown after catching an exception Jon Mason (1): runqemu: use "raw" instead of "bin" for ovmf Jose Quaresma (1): ptest-runner: libgcc must be installed for pthread_cancel to work Joshua Watt (1): classes/image: Use xargs to set file timestamps Kai Uwe Broulik (1): gstreamer1.0-plugins-good: on wayland qt5 needs qtwayland Khem Raj (6): oeqa/pam: Need shadow installed for the tests rxvt-unicode: Do not use throw specifications dtc: Fix array-bounds error documentation-audit.sh: Fix typo in specifying LICENSE_FLAGS_WHITELIST ca-certificates: Fix openssl runtime cert dependencies cml1.bbclass: Return sorted list of cfg files Konrad Weihmann (1): cve-update-db-native: skip on empty cpe23Uri Lee Chee Yang (7): cve-update-db-native: consider version suffix when update CVE db cve-check: CVE_VERSION_SUFFIX to work with patched release binutils: fix CVE-2021-3487 subversion: fix CVE-2020-17525 qemu: fix CVE-2021-3392 tiff: fix CVE-2020-35523 CVE-2020-35524 python3-jinja2: 2.11.2 -> 2.11.3 Li Wang (1): linux-dummy: add empty dependent packages Marek Vasut (1): linux-firmware: Package RSI 911x WiFi firmware Mark Hatle (2): populate_sdk_ext: Avoid copying and producing .pyc files kernel.bbclass: Remove do_install[prefunc] no longer needed Martin Jansa (2): iso-codes: fix protocol in SRC_URI wpa-supplicant: update CVE-2021-27803.patch Meh Mbeh Ida Delphine (6): recipes-gnome: Add missing HOMEPAGE and DESCRIPTION for recipes recipes-graphics: Add missing HOMEPAGE and DESCRIPTION for recipes. recipes-kernel: Add missing HOMEPAGE and DESCRIPTION for recipes. recipes-multimedia: Add missing HOMEPAGE and DESCRIPTION for recipes. recipes-sato: Add missing HOMEPAGE and DESCRIPTION for recipes recipes-support: Add missing HOMEPAGE and DESCRIPTION for recipes Michael Opdenacker (1): sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message Michael Trensch (1): linux-firmware: Fix packaging Mike Crowe (1): curl: Patch CVE-2021-22876 & CVE-2021-22890 Mikko Rapeli (3): openssl: update to 1.1.1k to fix CVE-2021-3450 and CVE-2021-3449 bitbake: bitbake: tests/fetch: fix test execution without .gitconfig bitbake: bitbake: tests/fetch: remove write protected files too Mingli Yu (3): libtool: make sure autoheader run before autoconf libtool: make sure autoheader run before automake groff: not ship /usr/bin/grap2graph Minjae Kim (3): wpa-supplicant: fix CVE-2021-27803 qemu: fix CVE-2021-20203 git: fix CVE-2021-21300 Naveen Saini (1): cryptodev-module: fix build failure with kernel v5.10 Niels Avonds (1): bitbake: fetch/gitsm: Fix crash when using git LFS and submodules Peter Budny (1): lib/oe/terminal: Fix tmux new-session on older tmux versions (<1.9) Peter Morrow (2): goarch: map target os to windows for mingw* TARGET_OS go_1.14: don't set -buildmode=pie when building for windows targets Petr Vorel (1): scripts/verify-bashisms: Update checkbashisms.pl URL Purushottam Choudhary (1): shadow: whitelist CVE-2013-4235 Reto Schneider (2): license_image.bbclass: Detect broken symlinks license_image.bbclass: Fix symlink to generic license files Richard Purdie (44): libid3tag: Fix reproducibility issue syslinux: Fix reproducibility issues swig: Fix reproducibility issue efivar: Fix reproducibility issue selftest/reproducible: Add ability to pull some objects from sstate build-appliance-image: Drop kernel module handling bitbake: runqueue: Fix task execution corruption issue bitbake: runqueue: Add setscene task overlap sanity check selftest/wic: Fix dependency issue in rawcopy test build-appliance-image: Update to dunfell head revision selftest/reproducible: Sort the unused exclusion list diffoscope: Upgrade 136 -> 168 diffoscope: Upgrade 168 -> 172 oeqa/selftest: Hardcode test assumptions about heartbeat event timings oeqa/selftest: Ensure packages classes are set correctly for maintainers test sanity: Add error check for '%' in build path sanity: Further improve directory sanity tests pseudo: Upgrade to add trailing slashes ignore path fix yocto-check-layer: Avoid bug when iterating and autoadding dependencies bitbake: runqueue: Fix deferred task issues yocto-uninative: Update to 3.1 which includes a patchelf fix pybootchart/draw: Avoid divide by zero error glibc: Document and whitelist CVE-2019-1010022-25 qemu: Exclude CVE-2017-5957 from cve-check qemu: Exclude CVE-2007-0998 from cve-check qemu: Exclude CVE-2018-18438 from cve-check jquery: Exclude CVE-2007-2379 from cve-check logrotate: Exclude CVE-2011-1548,1549,1550 from cve-check openssh: Exclude CVE-2007-2768 from cve-check openssh: Exclude CVE-2008-3844 from cve-check unzip: Exclude CVE-2008-0888 from cve-check cpio: Exclude CVE-2010-4226 from cve-check ghostscript: Exclude CVE-2013-6629 from cve-check bluez: Exclude CVE-2020-12352 CVE-2020-24490 from cve-check tiff: Exclude CVE-2015-7313 from cve-check coreutils: Exclude CVE-2016-2781 from cve-check librsvg: Exclude CVE-2018-1000041 from cve-check avahi: Exclude CVE-2021-26720 from cve-check oeqa/qemurunner: Improve logging thread exit handling for qemu shutdown test oeqa/qemurunner: Fix binary vs str issue oeqa/qemurunner: Improve handling of run_serial for shutdown commands Revert "cml1.bbclass: Return sorted list of cfg files" sstate: Handle manifest 'corruption' issue build-appliance-image: Update to dunfell head revision Robert P. J. Day (4): bitbake-whatchanged: change ending quote to proper period bitbake.conf: correct description of HOSTTOOLS_DIR image.bbclass: fix comment "pacackages" -> "packages" meta/lib/oe/rootfs.py: Fix typo "Restoreing" -> "Restoring" Romain Naour (1): dejagnu: needs expect at runtime Ross Burton (7): ptest-packagelists: remove libinput-ptest insane: don't check for a warning string that is never output insane: clean up some more warning messages cairo: backport patch for CVE-2020-35492 libnotify: whitelist CVE-2013-7381 (specific to the NodeJS bindings) builder: whitelist CVE-2008-4178 (a different builder) bitbake: providers: selected version not available should be a warning Stefan Ghinea (2): wpa-supplicant: fix CVE-2021-30004 boost: fix do_fetch failure Stefan Schmidt (1): systemd-conf: do not ask for DHCP if configured on kernel command line Steve Sakoman (11): Revert "sstatesig.py: show an error instead of warning when sstate manifest isn't found" documentation: prepare for 3.1.7 release poky.conf: Bump version for 3.1.7 release selftest/reproducible: adjust exclusion list for dunfell lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for intercepts reproducible.py: add quilt-ptest and valgrind-ptest poky-tiny.conf: set PREFERRED_VERSION_linux-yocto-tiny to 5.4% ref-system-requirements.rst: Add Fedora 33 to list of supported distros documentation: prepare for 3.1.8 release poky.conf: Add fedora33 as a supported distro poky.conf: Bump version for 3.1.8 release Vinay Kumar (1): Binutils: Fix CVE-2021-20197 Yanfei Xu (1): parselogs: ignore floppy error on qemu-system-x86 at boot stage Yann Dirson (1): linux-firmware: include all relevant files in -bcm4356 Yi Fan Yu (2): valgrind: Increase timeout duration 30 -> 90 s libevent: Increase ptest timing tolerance 50 ms -> 100 ms Zhang Qiang (1): kernel.bbclass: Configuration for environment with HOSTCXX zhengruoqin (1): wireless-regdb: upgrade 2020.11.20 -> 2021.04.21 meta-security: c74cc97641..93232ae6d5: Armin Kuster (1): kas-security-base: drop DL_DIR Ming Liu (12): ima-evm-utils: set native REQUIRED_DISTRO_FEATURES to empty initramfs-framework-ima: fix a wrong path ima-evm-keys: add recipe initramfs-framework-ima: RDEPENDS on ima-evm-keys meta: refactor IMA/EVM sign rootfs README.md: update according to the refactoring in ima-evm-rootfs.bbclass initramfs-framework-ima: let ima_enabled return 0 ima-evm-rootfs.bbclass: avoid generating /etc/fstab for wic ima-policy-hashed: add CGROUP2_SUPER_MAGIC fsmagic ima-evm-keys: add file-checksums to IMA_EVM_X509 meta: drop IMA_POLICY from policy recipes initramfs-framework-ima: introduce IMA_FORCE Omer Akram (4): Update apparmor to 2.13.6 backport cross-compile python binding fix Use C preprocessor from the yocto build environment tests: correctly escape # in Makefile Signed-off-by: Patrick Williams Change-Id: Ibb369f72ca2601f5582a5608d6bdd516d90bea2a --- poky/meta/lib/oeqa/selftest/cases/bblayers.py | 5 ++ poky/meta/lib/oeqa/selftest/cases/buildoptions.py | 6 +- poky/meta/lib/oeqa/selftest/cases/cve_check.py | 8 ++ poky/meta/lib/oeqa/selftest/cases/distrodata.py | 2 +- poky/meta/lib/oeqa/selftest/cases/reproducible.py | 96 +++++++++++++++++++++-- poky/meta/lib/oeqa/selftest/cases/runqemu.py | 9 +-- poky/meta/lib/oeqa/selftest/cases/wic.py | 18 +++-- 7 files changed, 123 insertions(+), 21 deletions(-) (limited to 'poky/meta/lib/oeqa/selftest/cases') diff --git a/poky/meta/lib/oeqa/selftest/cases/bblayers.py b/poky/meta/lib/oeqa/selftest/cases/bblayers.py index f131d9856c..7d74833f61 100644 --- a/poky/meta/lib/oeqa/selftest/cases/bblayers.py +++ b/poky/meta/lib/oeqa/selftest/cases/bblayers.py @@ -12,6 +12,11 @@ from oeqa.selftest.case import OESelftestTestCase class BitbakeLayers(OESelftestTestCase): + def test_bitbakelayers_layerindexshowdepends(self): + result = runCmd('bitbake-layers layerindex-show-depends meta-poky') + find_in_contents = re.search("openembedded-core", result.output) + self.assertTrue(find_in_contents, msg = "openembedded-core should have been listed at this step. bitbake-layers layerindex-show-depends meta-poky output: %s" % result.output) + def test_bitbakelayers_showcrossdepends(self): result = runCmd('bitbake-layers show-cross-depends') self.assertIn('aspell', result.output) diff --git a/poky/meta/lib/oeqa/selftest/cases/buildoptions.py b/poky/meta/lib/oeqa/selftest/cases/buildoptions.py index e91f0bd18f..b1b9ea7e55 100644 --- a/poky/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/poky/meta/lib/oeqa/selftest/cases/buildoptions.py @@ -57,15 +57,15 @@ class ImageOptionsTests(OESelftestTestCase): class DiskMonTest(OESelftestTestCase): def test_stoptask_behavior(self): - self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"') + self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"') res = bitbake("delay -c delay", ignore_status = True) self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output, msg = "Tasks should have stopped. Disk monitor is set to STOPTASK: %s" % res.output) self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output)) - self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"') + self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"') res = bitbake("delay -c delay", ignore_status = True) self.assertTrue('ERROR: Immediately abort since the disk space monitor action is "ABORT"!' in res.output, "Tasks should have been aborted immediatelly. Disk monitor is set to ABORT: %s" % res.output) self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output)) - self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"') + self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"') res = bitbake("delay -c delay") self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output) diff --git a/poky/meta/lib/oeqa/selftest/cases/cve_check.py b/poky/meta/lib/oeqa/selftest/cases/cve_check.py index 3f343a2841..d1947baffc 100644 --- a/poky/meta/lib/oeqa/selftest/cases/cve_check.py +++ b/poky/meta/lib/oeqa/selftest/cases/cve_check.py @@ -34,3 +34,11 @@ class CVECheck(OESelftestTestCase): self.assertTrue( result ,msg="Failed to compare version with suffix '1.0b' < '1.0r'") result = Version("1.0b","alphabetical") > Version("1.0","alphabetical") self.assertTrue( result ,msg="Failed to compare version with suffix '1.0b' > '1.0'") + + # consider the trailing "p" and "patch" as patched released when comparing + result = Version("1.0","patch") < Version("1.0p1","patch") + self.assertTrue( result ,msg="Failed to compare version with suffix '1.0' < '1.0p1'") + result = Version("1.0p2","patch") > Version("1.0p1","patch") + self.assertTrue( result ,msg="Failed to compare version with suffix '1.0p2' > '1.0p1'") + result = Version("1.0_patch2","patch") < Version("1.0_patch3","patch") + self.assertTrue( result ,msg="Failed to compare version with suffix '1.0_patch2' < '1.0_patch3'") diff --git a/poky/meta/lib/oeqa/selftest/cases/distrodata.py b/poky/meta/lib/oeqa/selftest/cases/distrodata.py index e1cfc3b621..8e5e24db3d 100644 --- a/poky/meta/lib/oeqa/selftest/cases/distrodata.py +++ b/poky/meta/lib/oeqa/selftest/cases/distrodata.py @@ -63,7 +63,7 @@ but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please re return True return False - feature = 'require conf/distro/include/maintainers.inc\nLICENSE_FLAGS_WHITELIST += " commercial"\nPARSE_ALL_RECIPES = "1"\n' + feature = 'require conf/distro/include/maintainers.inc\nLICENSE_FLAGS_WHITELIST += " commercial"\nPARSE_ALL_RECIPES = "1"\nPACKAGE_CLASSES = "package_ipk package_deb package_rpm"\n' self.write_config(feature) with bb.tinfoil.Tinfoil() as tinfoil: diff --git a/poky/meta/lib/oeqa/selftest/cases/reproducible.py b/poky/meta/lib/oeqa/selftest/cases/reproducible.py index 7f74cec28f..0e44ce4dbf 100644 --- a/poky/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/poky/meta/lib/oeqa/selftest/cases/reproducible.py @@ -17,6 +17,62 @@ import stat import os import datetime +# For sample packages, see: +# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-0t7wr_oo/ +# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-4s9ejwyp/ +# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-haiwdlbr/ +# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-hwds3mcl/ +# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201203-sua0pzvc/ +# (both packages/ and packages-excluded/) +exclude_packages = [ + 'acpica-src', + 'babeltrace2-ptest', + 'bind', + 'bootchart2-doc', + 'epiphany', + 'gcr', + 'git', + 'glide', + 'go-dep', + 'go-helloworld', + 'go-runtime', + 'go_', + 'gstreamer1.0-python', + 'hwlatdetect', + 'kernel-devsrc', + 'libaprutil', + 'libcap-ng', + 'libjson', + 'libproxy', + 'lsb-release', + 'lttng-tools-dbg', + 'lttng-tools-ptest', + 'ltp', + 'ovmf-shell-efi', + 'parted-ptest', + 'perf', + 'piglit', + 'pybootchartgui', + 'qemu', + 'quilt-ptest', + "rpm", + 'rsync', + 'ruby', + 'stress-ng', + 'systemd-bootchart', + 'systemtap', + 'valgrind-ptest', + 'vim', + 'webkitgtk', + ] + +def is_excluded(package): + package_name = os.path.basename(package) + for i in exclude_packages: + if package_name.startswith(i): + return i + return None + MISSING = 'MISSING' DIFFERENT = 'DIFFERENT' SAME = 'SAME' @@ -39,14 +95,21 @@ class PackageCompareResults(object): self.total = [] self.missing = [] self.different = [] + self.different_excluded = [] self.same = [] + self.active_exclusions = set() def add_result(self, r): self.total.append(r) if r.status == MISSING: self.missing.append(r) elif r.status == DIFFERENT: - self.different.append(r) + exclusion = is_excluded(r.reference) + if exclusion: + self.different_excluded.append(r) + self.active_exclusions.add(exclusion) + else: + self.different.append(r) else: self.same.append(r) @@ -54,10 +117,14 @@ class PackageCompareResults(object): self.total.sort() self.missing.sort() self.different.sort() + self.different_excluded.sort() self.same.sort() def __str__(self): - return 'same=%i different=%i missing=%i total=%i' % (len(self.same), len(self.different), len(self.missing), len(self.total)) + return 'same=%i different=%i different_excluded=%i missing=%i total=%i\nunused_exclusions=%s' % (len(self.same), len(self.different), len(self.different_excluded), len(self.missing), len(self.total), self.unused_exclusions()) + + def unused_exclusions(self): + return sorted(set(exclude_packages) - self.active_exclusions) def compare_file(reference, test, diffutils_sysroot): result = CompareResult() @@ -78,8 +145,14 @@ def compare_file(reference, test, diffutils_sysroot): return result class ReproducibleTests(OESelftestTestCase): + # Test the reproducibility of whatever is built between sstate_targets and targets + package_classes = ['deb', 'ipk'] - images = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline'] + + # targets are the things we want to test the reproducibility of + targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'world'] + # sstate targets are things to pull from sstate to potentially cut build/debugging time + sstate_targets = [] save_results = False if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ: save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT'] @@ -150,10 +223,17 @@ class ReproducibleTests(OESelftestTestCase): PACKAGE_CLASSES = "{package_classes}" INHIBIT_PACKAGE_STRIP = "1" TMPDIR = "{tmpdir}" + LICENSE_FLAGS_WHITELIST = "commercial" + DISTRO_FEATURES_append = ' systemd pam' ''').format(package_classes=' '.join('package_%s' % c for c in self.package_classes), tmpdir=tmpdir) if not use_sstate: + if self.sstate_targets: + self.logger.info("Building prebuild for %s (sstate allowed)..." % (name)) + self.write_config(config) + bitbake(' '.join(self.sstate_targets)) + # This config fragment will disable using shared and the sstate # mirror, forcing a complete build from scratch config += textwrap.dedent('''\ @@ -164,7 +244,8 @@ class ReproducibleTests(OESelftestTestCase): self.logger.info("Building %s (sstate%s allowed)..." % (name, '' if use_sstate else ' NOT')) self.write_config(config) d = get_bb_vars(capture_vars) - bitbake(' '.join(self.images)) + # targets used to be called images + bitbake(' '.join(getattr(self, 'images', self.targets))) return d def test_reproducible_builds(self): @@ -212,6 +293,7 @@ class ReproducibleTests(OESelftestTestCase): self.write_package_list(package_class, 'missing', result.missing) self.write_package_list(package_class, 'different', result.different) + self.write_package_list(package_class, 'different_excluded', result.different_excluded) self.write_package_list(package_class, 'same', result.same) if self.save_results: @@ -219,8 +301,12 @@ class ReproducibleTests(OESelftestTestCase): self.copy_file(d.reference, '/'.join([save_dir, 'packages', strip_topdir(d.reference)])) self.copy_file(d.test, '/'.join([save_dir, 'packages', strip_topdir(d.test)])) + for d in result.different_excluded: + self.copy_file(d.reference, '/'.join([save_dir, 'packages-excluded', strip_topdir(d.reference)])) + self.copy_file(d.test, '/'.join([save_dir, 'packages-excluded', strip_topdir(d.test)])) + if result.missing or result.different: - fails.append("The following %s packages are missing or different: %s" % + fails.append("The following %s packages are missing or different and not in exclusion list: %s" % (c, '\n'.join(r.test for r in (result.missing + result.different)))) # Clean up empty directories diff --git a/poky/meta/lib/oeqa/selftest/cases/runqemu.py b/poky/meta/lib/oeqa/selftest/cases/runqemu.py index 7e676bcb41..da22f77b27 100644 --- a/poky/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/poky/meta/lib/oeqa/selftest/cases/runqemu.py @@ -163,12 +163,11 @@ class QemuTest(OESelftestTestCase): bitbake(cls.recipe) def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, timeout): + # Allow the runner's LoggingThread instance to exit without errors + # (such as the exception "Console connection closed unexpectedly") + # as qemu will disappear when we shut it down + qemu.runner.allowexit() qemu.run_serial("shutdown -h now") - # Stop thread will stop the LoggingThread instance used for logging - # qemu through serial console, stop thread will prevent this code - # from facing exception (Console connection closed unexpectedly) - # when qemu was shutdown by the above shutdown command - qemu.runner.stop_thread() time_track = 0 try: while True: diff --git a/poky/meta/lib/oeqa/selftest/cases/wic.py b/poky/meta/lib/oeqa/selftest/cases/wic.py index 0435aa29c9..f7abdba015 100644 --- a/poky/meta/lib/oeqa/selftest/cases/wic.py +++ b/poky/meta/lib/oeqa/selftest/cases/wic.py @@ -905,14 +905,18 @@ class Wic2(WicTestCase): @only_for_arch(['i586', 'i686', 'x86_64']) def test_rawcopy_plugin_qemu(self): """Test rawcopy plugin in qemu""" - # build ext4 and wic images - for fstype in ("ext4", "wic"): - config = 'IMAGE_FSTYPES = "%s"\nWKS_FILE = "test_rawcopy_plugin.wks.in"\n' % fstype - self.append_config(config) - self.assertEqual(0, bitbake('core-image-minimal').status) - self.remove_config(config) + # build ext4 and then use it for a wic image + config = 'IMAGE_FSTYPES = "ext4"\n' + self.append_config(config) + self.assertEqual(0, bitbake('core-image-minimal').status) + self.remove_config(config) - with runqemu('core-image-minimal', ssh=False, image_fstype='wic') as qemu: + config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_rawcopy_plugin.wks.in"\n' + self.append_config(config) + self.assertEqual(0, bitbake('core-image-minimal-mtdutils').status) + self.remove_config(config) + + with runqemu('core-image-minimal-mtdutils', ssh=False, image_fstype='wic') as qemu: cmd = "grep sda. /proc/partitions |wc -l" status, output = qemu.run_serial(cmd) self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) -- cgit v1.2.3