Skip to contentSkip to conversation

core-image-sato-sdk-ptest: do not pull in ptest-pkgs

PATCH In review Alexander Kanavin 4 participants 19 messages Jan 27, 2020 – Jan 28, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 core-image-sato-sdk-ptest: do not pull in ptest-pkgs

The lists of ptests are defined via PTESTS_FAST and PTESTS_SLOW; ptests-pkgs also pulls in additional items that are specifically excluded from those due to causing issues with ptesting.

---
 meta/recipes-sato/images/core-image-sato-sdk-ptest.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +0 -2
index ff297fe324c..7490b773d2e 100644
@@ -3,8 +3,6 @@ require conf/distro/include/ptest-packagelists.inc
 
 DESCRIPTION += "Also includes ptest packages."
 
-IMAGE_FEATURES += "ptest-pkgs"
-
 PROVIDES += "core-image-sato-ptest"
 
 # Also include ptests which may not otherwise be included in a sato image
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/9 default-distrovars.inc: add vfat to DISTRO_FEATURES

This is beneficial for parted ptests in particular, as they expect vfat functionality to work.

---
 meta/conf/distro/include/default-distrovars.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/distro/include/default-distrovars.inc +1 -1
index 10d86cf7b17..433d4b6651d 100644
@@ -10,7 +10,7 @@ LOCALE_UTF8_ONLY ?= "0"
 LOCALE_UTF8_IS_DEFAULT ?= "1"
 LOCALE_UTF8_IS_DEFAULT_class-nativesdk = "0"
 
-DISTRO_FEATURES_DEFAULT ?= "acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11"
+DISTRO_FEATURES_DEFAULT ?= "acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat"
 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}"
 IMAGE_FEATURES ?= ""
 
Signature · 1 line
2.17.1
#2 lore raw

PATCH 3/9 mdadm: correctly set up testing location for ptests

In reply to Alexander Kanavin

1. Do not clutter /, create a special-purpose dir
2. Clean up the dir after tests are done (if this is not performed, disk will overflow later in ptesting).
3. Fix up more locations in ptests to use the dir.

Upstream default /var/tmp is not suitable as it is not big enough (mdadm needs about 500 Mb)

---
 meta/recipes-extended/mdadm/files/run-ptest | 3 +++
 meta/recipes-extended/mdadm/mdadm_4.1.bb    | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
meta/recipes-extended/mdadm/files/run-ptest +3 -0
index e4a9c2b08b9..7959c055ad5 100644
@@ -1,4 +1,7 @@
 #!/bin/sh
 
+mkdir -p /mdadm-testing-dir
 # make the test continue to execute even one fail
 ./test --keep-going
+
+rm -rf /mdadm-testing-dir/*
meta/recipes-extended/mdadm/mdadm_4.1.bb +2 -1
index 64f519e7502..40c5273e005 100644
@@ -75,7 +75,8 @@ do_compile_ptest() {
 do_install_ptest() {
 	cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests
 	cp ${S}/test ${D}${PTEST_PATH}
-	sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
+	sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test
+	sed -e 's!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/tests/*
         sed -i -e '/echo -ne "$_script... "/d' \
                -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \
                -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \
Signature · 1 line
2.17.1
#3 lore raw

PATCH 4/9 elfutils: additional ptest fixes

In reply to Alexander Kanavin

This should address ARM64 specific failures in particular.

eu-objdump is now installed on all architectures; ptests fail in its absence and pass when it is present, so it's useful at least in some scenarios in non-x86 architectures and fails gracefully otherwise.

The original decision to exclude it was here:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5283

---
 meta/recipes-devtools/elfutils/elfutils_0.178.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.178.bb +2 -5
index 9393628dd13..8f5deb2c62a 100644
@@ -58,11 +58,7 @@ RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
 
 EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
 
-do_install_append() {
-	if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
-		rm -f ${D}${bindir}/eu-objdump
-	fi
-}
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
 
 do_compile_ptest() {
 	cd ${B}/tests
@@ -139,6 +135,7 @@ INHIBIT_PACKAGE_STRIP_FILES = "\
     ${PKGD}${PTEST_PATH}/tests/elfstrmerge \
     ${PKGD}${PTEST_PATH}/tests/backtrace-child \
     ${PKGD}${PTEST_PATH}/tests/backtrace-data \
+    ${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \
     ${PKGD}${PTEST_PATH}/tests/deleted \
     ${PKGD}${PTEST_PATH}/src/strip \
     ${PKGD}${PTEST_PATH}/src/addr2line \
Signature · 1 line
2.17.1
#4 lore raw

PATCH 5/9 meson: update 0.52.1 -> 0.53.0

In reply to Alexander Kanavin

Unset LD, and do not set ld in cross file from LD as new version of meson passes that value directly to -fuse-ld=... which requires one of lld, bfd, gold.

---
 meta/classes/meson.bbclass                       |  5 ++++-
 meta/recipes-devtools/meson/meson.inc            |  4 ++--
 .../0001-Make-CPU-family-warnings-fatal.patch    | 12 ++++++------
 ...-do-not-manipulate-the-environment-when.patch | 16 ++++++++--------
 ...-Support-building-allarch-recipes-again.patch |  6 +++---
 .../meson/meson/0003-native_bindir.patch         | 16 ++++++++--------
 .../meson/{meson_0.52.1.bb => meson_0.53.0.bb}   |  0
 ...meson_0.52.1.bb => nativesdk-meson_0.53.0.bb} |  1 -
 8 files changed, 31 insertions(+), 29 deletions(-)
 rename meta/recipes-devtools/meson/{meson_0.52.1.bb => meson_0.53.0.bb} (100%)
 rename meta/recipes-devtools/meson/{nativesdk-meson_0.52.1.bb => nativesdk-meson_0.53.0.bb} (99%)
meta/classes/meson.bbclass +4 -1
index 1ef34a999c8..04329f32b11 100644
@@ -91,7 +91,6 @@ c = ${@meson_array('CC', d)}
 cpp = ${@meson_array('CXX', d)}
 ar = ${@meson_array('AR', d)}
 nm = ${@meson_array('NM', d)}
-ld = ${@meson_array('LD', d)}
 strip = ${@meson_array('STRIP', d)}
 readelf = ${@meson_array('READELF', d)}
 pkgconfig = 'pkg-config'
@@ -122,6 +121,10 @@ EOF
 CONFIGURE_FILES = "meson.build"
 
 meson_do_configure() {
+    # Meson requires this to be 'bfd, 'lld' or 'gold' from 0.53 onwards
+    # https://github.com/mesonbuild/meson/commit/ef9aeb188ea2bc7353e59916c18901cde90fa2b3
+    unset LD
+
     # Work around "Meson fails if /tmp is mounted with noexec #2972"
     mkdir -p "${B}/meson-private/tmp"
     export TMPDIR="${B}/meson-private/tmp"
meta/recipes-devtools/meson/meson.inc +2 -2
index 881a14c7f0a..c0ce7d338bc 100644
@@ -17,8 +17,8 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
            file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \
            file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
            "
-SRC_URI[sha256sum] = "0c277472e49950a5537e3de3e60c57b80dbf425788470a1a8ed27446128fc035"
-SRC_URI[md5sum] = "a5f0c99567d772508f649a28ded7f8ad"
+SRC_URI[sha256sum] = "035e75993ab6fa6c9ebf902b835c64cf397a763eb8e65c9bb6e1cc9730a9d3f6"
+SRC_URI[md5sum] = "3a0313d040ded973d84cbec368c2e1d3"
 
 SRC_URI_append_class-native = " \
     file://0001-Make-CPU-family-warnings-fatal.patch \
meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch +6 -6
index d4264cee526..74d5b4ca66e 100644
@@ -1,4 +1,4 @@
-From cd980c763f11cfd928255346cc7e86f24add985e Mon Sep 17 00:00:00 2001
+From 8ce7a1ddbc9b7775568a98fcd50e39a01513c902 Mon Sep 17 00:00:00 2001
 From: Ross Burton <[email protected]>
 Date: Tue, 3 Jul 2018 13:59:09 +0100
 Subject: [PATCH] Make CPU family warnings fatal
@@ -12,10 +12,10 @@ Signed-off-by: Ross Burton <[email protected]>
  2 files changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 29d7422..5fb00a4 100644
+index 0f277a7..24578ea 100644
 --- a/mesonbuild/envconfig.py
 +++ b/mesonbuild/envconfig.py
-@@ -190,7 +190,7 @@ class MachineInfo:
+@@ -192,7 +192,7 @@ class MachineInfo:
  
          cpu_family = literal['cpu_family']
          if cpu_family not in known_cpu_families:
@@ -25,15 +25,15 @@ index 29d7422..5fb00a4 100644
          endian = literal['endian']
          if endian not in ('little', 'big'):
 diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index a9bc2b8..b91c8da 100644
+index dc8b14f..3aab71e 100644
 --- a/mesonbuild/environment.py
 +++ b/mesonbuild/environment.py
-@@ -348,9 +348,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
+@@ -354,9 +354,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
          trial = 'parisc'
  
      if trial not in known_cpu_families:
 -        mlog.warning('Unknown CPU family {!r}, please report this at '
--                     'https://github.com/mesonbuild/meson/issues/new with the'
+-                     'https://github.com/mesonbuild/meson/issues/new with the '
 -                     'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial))
 +        raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
  
meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch +8 -8
index bf715d1e9f4..eb0e90dbdda 100644
@@ -1,4 +1,4 @@
-From 3cb2c811dc6d4890342afa5b709cd30cf7b8f3ca Mon Sep 17 00:00:00 2001
+From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Mon, 19 Nov 2018 14:24:26 +0100
 Subject: [PATCH] python module: do not manipulate the environment when calling
@@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin <[email protected]>
  1 file changed, 12 deletions(-)
 
 diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
-index 9cfbd6f..3ff687a 100644
+index 07be318..b770603 100644
 --- a/mesonbuild/modules/python.py
 +++ b/mesonbuild/modules/python.py
-@@ -75,11 +75,6 @@ class PythonDependency(ExternalDependency):
+@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency):
                  old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
                  old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
  
@@ -25,10 +25,10 @@ index 9cfbd6f..3ff687a 100644
 -                    os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
 -
                  try:
-                     self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs)
-                     mlog.debug('Found "python-{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_version, pkg_libdir))
-@@ -88,13 +83,6 @@ class PythonDependency(ExternalDependency):
-                     mlog.debug('"python-{}" could not be found in LIBPC ({})'.format(pkg_version, pkg_libdir))
+                     self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs)
+                     mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir))
+@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency):
+                     mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir))
                      mlog.debug(e)
  
 -                if old_pkg_path is not None:
@@ -39,5 +39,5 @@ index 9cfbd6f..3ff687a 100644
 -                else:
 -                    os.environ.pop('PKG_CONFIG_LIBDIR', None)
              else:
-                 mlog.debug('"python-{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_version, pkg_libdir))
+                 mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir))
  
meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch +3 -3
index c8c7b298de3..1529ebe9fea 100644
@@ -1,4 +1,4 @@
-From 4d223562c3e510e0dd62b608d184604e2cab6198 Mon Sep 17 00:00:00 2001
+From cc6e47da801ce3c274485775c62784416fd22977 Mon Sep 17 00:00:00 2001
 From: Peter Kjellerstedt <[email protected]>
 Date: Thu, 26 Jul 2018 16:32:49 +0200
 Subject: [PATCH] Support building allarch recipes again
@@ -13,7 +13,7 @@ Signed-off-by: Peter Kjellerstedt <[email protected]>
  1 file changed, 1 insertion(+)
 
 diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 5fb00a4..f5702ba 100644
+index 24578ea..216e71f 100644
 --- a/mesonbuild/envconfig.py
 +++ b/mesonbuild/envconfig.py
 @@ -36,6 +36,7 @@ _T = typing.TypeVar('_T')
@@ -22,5 +22,5 @@ index 5fb00a4..f5702ba 100644
  known_cpu_families = (
 +    'allarch',
      'aarch64',
+     'alpha',
      'arc',
-     'arm',
meta/recipes-devtools/meson/meson/0003-native_bindir.patch +8 -8
index 14a9a136664..76c1aa9ac1c 100644
@@ -1,4 +1,4 @@
-From baf7b94fec5a31b2d0cb162e43dbd28cc019f38e Mon Sep 17 00:00:00 2001
+From af2554b9b08af973181b4e4181bd1cb936fdbb8f Mon Sep 17 00:00:00 2001
 From: Ricardo Ribalda Delgado <[email protected]>
 Date: Wed, 15 Nov 2017 15:05:01 +0100
 Subject: [PATCH] native_bindir
@@ -22,7 +22,7 @@ Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
  2 files changed, 14 insertions(+), 11 deletions(-)
 
 diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
-index 35f0175..b39cba6 100644
+index f17b9f2..b5c9c92 100644
 --- a/mesonbuild/dependencies/base.py
 +++ b/mesonbuild/dependencies/base.py
 @@ -184,7 +184,7 @@ class Dependency:
@@ -43,7 +43,7 @@ index 35f0175..b39cba6 100644
          raise DependencyException('Method "get_pkgconfig_variable()" is '
                                    'invalid for an internal dependency')
  
-@@ -670,15 +670,18 @@ class PkgConfigDependency(ExternalDependency):
+@@ -673,15 +673,18 @@ class PkgConfigDependency(ExternalDependency):
          return s.format(self.__class__.__name__, self.name, self.is_found,
                          self.version_reqs)
  
@@ -65,7 +65,7 @@ index 35f0175..b39cba6 100644
          # Always copy the environment since we're going to modify it
          # with pkg-config variables
          if env is None:
-@@ -698,7 +701,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -701,7 +704,7 @@ class PkgConfigDependency(ExternalDependency):
          targs = tuple(args)
          cache = PkgConfigDependency.pkgbin_cache
          if (self.pkgbin, targs, fenv) not in cache:
@@ -73,8 +73,8 @@ index 35f0175..b39cba6 100644
 +            cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env, use_native)
          return cache[(self.pkgbin, targs, fenv)]
  
-     def _convert_mingw_paths(self, args):
-@@ -885,7 +888,7 @@ class PkgConfigDependency(ExternalDependency):
+     def _convert_mingw_paths(self, args: List[str]) -> List[str]:
+@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
                                        (self.name, out_raw))
          self.link_args, self.raw_link_args = self._search_libs(out, out_raw)
  
@@ -83,7 +83,7 @@ index 35f0175..b39cba6 100644
          options = ['--variable=' + variable_name, self.name]
  
          if 'define_variable' in kwargs:
-@@ -898,7 +901,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -920,7 +923,7 @@ class PkgConfigDependency(ExternalDependency):
  
              options = ['--define-variable=' + '='.join(definition)] + options
  
@@ -93,7 +93,7 @@ index 35f0175..b39cba6 100644
          if ret != 0:
              if self.required:
 diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
-index 6d784e6..73a9e13 100644
+index bdcc4a7..e2de847 100644
 --- a/mesonbuild/dependencies/ui.py
 +++ b/mesonbuild/dependencies/ui.py
 @@ -330,7 +330,7 @@ class QtBaseDependency(ExternalDependency):
meta/recipes-devtools/meson/meson_0.53.0.bb renamed from meta/recipes-devtools/meson/meson_0.52.1.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/meson/meson_0.52.1.bb
rename to meta/recipes-devtools/meson/meson_0.53.0.bb
meta/recipes-devtools/meson/nativesdk-meson_0.53.0.bb renamed from meta/recipes-devtools/meson/nativesdk-meson_0.52.1.bb +0 -1
similarity index 99%
rename from meta/recipes-devtools/meson/nativesdk-meson_0.52.1.bb
rename to meta/recipes-devtools/meson/nativesdk-meson_0.53.0.bb
index 1756f342ce3..67add2c25e1 100644
@@ -31,7 +31,6 @@ c = @CC
 cpp = @CXX
 ar = @AR
 nm = @NM
-ld = @LD
 strip = @STRIP
 pkgconfig = 'pkg-config'
 
Signature · 1 line
2.17.1
#5 lore raw

PATCH 6/9 lttng-tools: install additional scripts needed for ptests

In reply to Alexander Kanavin
---
 meta/recipes-kernel/lttng/lttng-tools_2.11.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/lttng/lttng-tools_2.11.0.bb +1 -1
index a2797567410..639d4b62114 100644
@@ -66,7 +66,7 @@ do_install_append () {
 }
 
 do_install_ptest () {
-    for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/load-42*.lttng tests/regression/tools/save-load/configuration/load-42*.lttng ; do
+    for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/load-42*.lttng tests/regression/tools/save-load/configuration/load-42*.lttng tests/regression/tools/health/test_health.sh tests/regression/tools/metadata/utils.sh tests/regression/tools/rotation/rotate_utils.sh; do
         install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
     done
 
Signature · 1 line
2.17.1
#6 lore raw

PATCH 7/9 core-image-sato-sdk-ptest: use 2G of RAM

In reply to Alexander Kanavin

Particularly, 1G wasn't enough for lttng-tools ptests as half of that went to /tmp, and lttng-tools needs more.

---
 meta/recipes-sato/images/core-image-sato-sdk-ptest.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +2 -1
index 7490b773d2e..58c257c49fb 100644
@@ -16,4 +16,5 @@ IMAGE_OVERHEAD_FACTOR = "1.0"
 IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
 
 # ptests need more memory than standard to avoid the OOM killer
-QB_MEM = "-m 1024"
+# also lttng-tools needs /tmp that has at least 1G
+QB_MEM = "-m 2048"
Signature · 1 line
2.17.1
#7 lore raw

Re: [PATCH 7/9] core-image-sato-sdk-ptest: use 2G of RAM

Quoted 14 lines · Alexander Kanavin

Particularly, 1G wasn't enough for lttng-tools ptests as half of that went to /tmp, and lttng-tools needs more.

---
 meta/recipes-sato/images/core-image-sato-sdk-ptest.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +0 -0
index 7490b773d2e..58c257c49fb 100644

meta/recipes-sato/images/core-image-sato-sdk-ptest.bb IMAGE_OVERHEAD_FACTOR = "1.0" · line 20

Quoted 6 lines
meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +2 -1
@@ -16,4 +16,5 @@ IMAGE_OVERHEAD_FACTOR = "1.0"
 IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
 
 # ptests need more memory than standard to avoid the OOM killer
-QB_MEM = "-m 1024"
+# also lttng-tools needs /tmp that has at least 1G
+QB_MEM = "-m 2048"

perhaps we need to be cautious here and check if all qemu machines can support 2G emulation.

Quoted 8 lines

--
2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw

Re: [PATCH 7/9] core-image-sato-sdk-ptest: use 2G of RAM

This is only used on x86_64 and arm64 by the autobuilder, so we should be fine.

Alex

Quoted 36 lines · Khem Raj

Review

Quoted 10 lines · Alexander Kanavin

Particularly, 1G wasn't enough for lttng-tools ptests as half of that went to /tmp, and lttng-tools needs more.

---
 meta/recipes-sato/images/core-image-sato-sdk-ptest.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb

meta/recipes-sato/images/core-image-sato-sdk-ptest.bb IMAGE_OVERHEAD_FACTOR = "1.0" · line 20

Quoted 10 lines

index 7490b773d2e..58c257c49fb 100644

meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +2 -1
@@ -16,4 +16,5 @@ IMAGE_OVERHEAD_FACTOR = "1.0"
 IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
 
 # ptests need more memory than standard to avoid the OOM killer
-QB_MEM = "-m 1024"
+# also lttng-tools needs /tmp that has at least 1G
+QB_MEM = "-m 2048"

perhaps we need to be cautious here and check if all qemu machines can support 2G emulation.

Quoted 8 lines

--
2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#9 lore raw

Re: [PATCH 7/9] core-image-sato-sdk-ptest: use 2G of RAM

Quoted 3 lines · Alexander Kanavin

This is only used on x86_64 and arm64 by the autobuilder, so we should be fine.

OK. lets set this for those two architectures for now. The image can be built beyond Autobuilders for
other arches as well. Perhaps this setting is a candidate for auto.conf on AB

Quoted 38 lines

Alex

Quoted 35 lines · Khem Raj
Quoted 14 lines · Alexander Kanavin

Particularly, 1G wasn't enough for lttng-tools ptests as half of that went to /tmp, and lttng-tools needs more.

---
 meta/recipes-sato/images/core-image-sato-sdk-ptest.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +0 -0
index 7490b773d2e..58c257c49fb 100644

meta/recipes-sato/images/core-image-sato-sdk-ptest.bb IMAGE_OVERHEAD_FACTOR = "1.0" · line 20

Quoted 6 lines
meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +2 -1
@@ -16,4 +16,5 @@ IMAGE_OVERHEAD_FACTOR = "1.0"
 IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
 
 # ptests need more memory than standard to avoid the OOM killer
-QB_MEM = "-m 1024"
+# also lttng-tools needs /tmp that has at least 1G
+QB_MEM = "-m 2048"

perhaps we need to be cautious here and check if all qemu machines can support 2G emulation.

Quoted 8 lines

--
2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#10 lore raw

Re: [PATCH 7/9] core-image-sato-sdk-ptest: use 2G of RAM

This would be over-engineering; I highly doubt anyone would want to run this in qemu for any other architecture than those two. Without kvm or other HW accelerated virtualization many of those ptests will simply fail on timeout, and if not, they'll still be running when the heat death of the universe occurs.

Alex

Quoted 52 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin

This is only used on x86_64 and arm64 by the autobuilder, so we should

be fine.

Quoted 1 line

OK. lets set this for those two architectures for now. The image can be built beyond Autobuilders for
other arches as well. Perhaps this setting is a candidate for auto.conf on AB

Quoted 10 lines

Alex

Quoted 7 lines · Khem Raj
Quoted 4 lines · Alexander Kanavin

Particularly, 1G wasn't enough for lttng-tools ptests as half of that went to /tmp, and lttng-tools needs more.

Quoted 6 lines
Quoted 6 lines

Review

Quoted 6 lines
---
 meta/recipes-sato/images/core-image-sato-sdk-ptest.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb

Quoted 22 lines
Quoted 22 lines

meta/recipes-sato/images/core-image-sato-sdk-ptest.bb IMAGE_OVERHEAD_FACTOR = "1.0" · line 20

Quoted 10 lines

index 7490b773d2e..58c257c49fb 100644

meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +2 -1
@@ -16,4 +16,5 @@ IMAGE_OVERHEAD_FACTOR = "1.0"
 IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
 
 # ptests need more memory than standard to avoid the OOM killer
-QB_MEM = "-m 1024"
+# also lttng-tools needs /tmp that has at least 1G
+QB_MEM = "-m 2048"

perhaps we need to be cautious here and check if all qemu machines can support 2G emulation.

Quoted 8 lines

--
2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#11 lore raw

Re: [PATCH 7/9] core-image-sato-sdk-ptest: use 2G of RAM

Quoted 2 lines · Alexander Kanavin

This would be over-engineering; I highly doubt anyone would want to run this in qemu for any other architecture than those two. Without kvm or other HW accelerated virtualization many of those ptests will simply fail on timeout, and if not, they'll still be running when the heat death of the universe occurs.

I was not aware if this image is only meant for x86/arm64. I do build the same images as AB for qemumips and boot them, although tests are not run yet regularly matter of time. But building them itself catches many build issues.

if these images do not have value for other machines then perhaps some message or comment in recipe, will save some debugging time for someone in future who is trying to boot it on other arches.

Quoted 53 lines

Alex

Quoted 49 lines · Khem Raj
Quoted 3 lines · Alexander Kanavin

This is only used on x86_64 and arm64 by the autobuilder, so we should be fine.

OK. lets set this for those two architectures for now. The image can be built beyond Autobuilders for
other arches as well. Perhaps this setting is a candidate for auto.conf on AB

Quoted 38 lines

Alex

Quoted 35 lines · Khem Raj
Quoted 14 lines · Alexander Kanavin

Particularly, 1G wasn't enough for lttng-tools ptests as half of that went to /tmp, and lttng-tools needs more.

---
 meta/recipes-sato/images/core-image-sato-sdk-ptest.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +0 -0
index 7490b773d2e..58c257c49fb 100644

meta/recipes-sato/images/core-image-sato-sdk-ptest.bb IMAGE_OVERHEAD_FACTOR = "1.0" · line 20

Quoted 6 lines
meta/recipes-sato/images/core-image-sato-sdk-ptest.bb +2 -1
@@ -16,4 +16,5 @@ IMAGE_OVERHEAD_FACTOR = "1.0"
 IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
 
 # ptests need more memory than standard to avoid the OOM killer
-QB_MEM = "-m 1024"
+# also lttng-tools needs /tmp that has at least 1G
+QB_MEM = "-m 2048"

perhaps we need to be cautious here and check if all qemu machines can support 2G emulation.

Quoted 8 lines

--
2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#12 lore raw

PATCH 8/9 valgrind: fix the remaining ptest failures

In reply to Alexander Kanavin

Particularly, one test is disabled as it is failing everywhere, two patches that actually cause failures are dropped and some binaries are prevented from being stripped where that is expected.

---
 ...eak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34 +++++++++++++++++++
 ...rind-adjust-std_list-expected-output.patch | 32 -----------------
 ...Dereference-pthread_t-before-adding-.patch | 32 -----------------
 .../valgrind/valgrind_3.15.0.bb               | 23 +++++++++++--
 4 files changed, 55 insertions(+), 66 deletions(-)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +34 -0
new file mode 100644
index 00000000000..d641998d721
@@ -0,0 +1,34 @@
+From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Fri, 24 Jan 2020 17:55:39 +0100
+Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths
+
+In oe-core, /tmp is linked to /var/volatile/tmp and
+valgrind output changes accordingly
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ none/tests/fdleak_cmsg.stderr.exp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/fdleak_cmsg.stderr.exp b/none/tests/fdleak_cmsg.stderr.exp
+index 6e5a797b9..0ede1ab18 100644
+--- a/none/tests/fdleak_cmsg.stderr.exp
++++ b/none/tests/fdleak_cmsg.stderr.exp
+@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
+ 
+ 
+ FILE DESCRIPTORS: 6 open at exit.
+-Open file descriptor ...: /tmp/data2
++Open file descriptor ...: ...
+    ...
+ 
+-Open file descriptor ...: /tmp/data1
++Open file descriptor ...: ...
+    ...
+ 
+ Open AF_UNIX socket ...: <unknown>
+-- 
+2.17.1
+
meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -32
deleted file mode 100644
index a82972ec1b6..00000000000
@@ -1,32 +0,0 @@
-From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
-From: Randy MacLeod <[email protected]>
-Date: Mon, 13 May 2019 17:26:26 -0400
-Subject: [PATCH 2/2] valgrind: adjust std_list expected output
-
-The run-ptest script uses a custom --yocto-ptest option
-to change the summary statistics that valgrind issues
-to a format that matches what ptest-runner expects.
-
-Only this std_list test which checks that strcpy() works
-properly on Ubuntu-12.04 and later is affected by this change.
-It's normal output when called with --yocto-ptest is a blank
-line so adjust the expected output.
-
-Upstream-Status: Inappropriate [Yocto specific]
-
-Signed-off-by: Randy MacLeod <[email protected]>
----
- drd/tests/std_list.stderr.exp | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/drd/tests/std_list.stderr.exp b/drd/tests/std_list.stderr.exp
-index d18786f80..8b1378917 100644
---- a/drd/tests/std_list.stderr.exp
-+++ b/drd/tests/std_list.stderr.exp
-@@ -1,3 +1 @@
- 
--
--ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
--- 
-2.17.0
-
meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -32
deleted file mode 100644
index 05886c743dc..00000000000
@@ -1,32 +0,0 @@
-From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Sat, 10 Jun 2017 01:20:32 -0700
-Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding
- offset to it
-
-Fixes
-error: invalid use of undefined type 'struct __pthread'
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <[email protected]>
----
- drd/tests/pth_detached3.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
-index c02eef1..35d43a6 100644
---- a/drd/tests/pth_detached3.c
-+++ b/drd/tests/pth_detached3.c
-@@ -21,7 +21,7 @@ int main(int argc, char** argv)
-   pthread_detach(thread);
- 
-   /* Invoke pthread_detach() with an invalid thread ID. */
--  pthread_detach(thread + 8);
-+  pthread_detach((pthread_t*)(&thread + 8));
- 
-   fprintf(stderr, "Finished.\n");
- 
--- 
-2.13.1
-
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +21 -2
index 6a3834cfdc6..0f86aa44ca6 100644
@@ -29,7 +29,6 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
            file://0003-correct-include-directive-path-for-config.h.patch \
            file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \
            file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \
-           file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \
            file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
            file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
            file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
@@ -38,9 +37,9 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
            file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
            file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \
            file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
-           file://0002-valgrind-adjust-std_list-expected-output.patch \
            file://0001-adjust-path-filter-for-2-memcheck-tests.patch \
            file://s390x_vec_op_t.patch \
+           file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
            "
 SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975"
 SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"
@@ -205,4 +204,24 @@ do_install_ptest() {
     # handle multilib
     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
     sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest
+
+    # This test fails on the host as well, using both 3.15 and git master (as of Jan 24 2020)
+    # https://bugs.kde.org/show_bug.cgi?id=402833
+    rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest
+
+    # As the binary isn't stripped or debug-splitted, the source file isn't fetched
+    # via dwarfsrcfiles either, so it needs to be installed manually.
+    mkdir -p ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/
+    install ${S}/none/tests/tls.c ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/
 }
+
+# avoid stripping some generated binaries otherwise some of the tests will fail
+# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
+INHIBIT_PACKAGE_STRIP_FILES = "\
+    ${PKGD}${PTEST_PATH}/none/tests/tls \
+    ${PKGD}${PTEST_PATH}/none/tests/tls.so \
+    ${PKGD}${PTEST_PATH}/none/tests/tls2.so \
+    ${PKGD}${PTEST_PATH}/helgrind/tests/tc09_bad_unlock \
+    ${PKGD}${PTEST_PATH}/memcheck/tests/manuel1 \
+    ${PKGD}${PTEST_PATH}/drd/tests/pth_detached3 \
+"
Signature · 1 line
2.17.1
#13 lore raw

Re: [PATCH 8/9] valgrind: fix the remaining ptest failures

Quoted 4 lines · Alexander Kanavin

Particularly, one test is disabled as it is failing everywhere, two patches that actually cause failures are dropped and some binaries are prevented from being stripped where that is expected.

So this will address either
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13666  and
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13520 ?

- armin

Quoted 176 lines
---
 ...eak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34 +++++++++++++++++++
 ...rind-adjust-std_list-expected-output.patch | 32 -----------------
 ...Dereference-pthread_t-before-adding-.patch | 32 -----------------
 .../valgrind/valgrind_3.15.0.bb               | 23 +++++++++++--
 4 files changed, 55 insertions(+), 66 deletions(-)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +34 -0
new file mode 100644
index 00000000000..d641998d721
@@ -0,0 +1,34 @@
+From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Fri, 24 Jan 2020 17:55:39 +0100
+Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths
+
+In oe-core, /tmp is linked to /var/volatile/tmp and
+valgrind output changes accordingly
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ none/tests/fdleak_cmsg.stderr.exp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/fdleak_cmsg.stderr.exp b/none/tests/fdleak_cmsg.stderr.exp
+index 6e5a797b9..0ede1ab18 100644
+--- a/none/tests/fdleak_cmsg.stderr.exp
++++ b/none/tests/fdleak_cmsg.stderr.exp
+@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
+ 
+ 
+ FILE DESCRIPTORS: 6 open at exit.
+-Open file descriptor ...: /tmp/data2
++Open file descriptor ...: ...
+    ...
+ 
+-Open file descriptor ...: /tmp/data1
++Open file descriptor ...: ...
+    ...
+ 
+ Open AF_UNIX socket ...: <unknown>
+-- 
+2.17.1
+
meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -32
deleted file mode 100644
index a82972ec1b6..00000000000
@@ -1,32 +0,0 @@
-From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
-From: Randy MacLeod <[email protected]>
-Date: Mon, 13 May 2019 17:26:26 -0400
-Subject: [PATCH 2/2] valgrind: adjust std_list expected output
-
-The run-ptest script uses a custom --yocto-ptest option
-to change the summary statistics that valgrind issues
-to a format that matches what ptest-runner expects.
-
-Only this std_list test which checks that strcpy() works
-properly on Ubuntu-12.04 and later is affected by this change.
-It's normal output when called with --yocto-ptest is a blank
-line so adjust the expected output.
-
-Upstream-Status: Inappropriate [Yocto specific]
-
-Signed-off-by: Randy MacLeod <[email protected]>
----
- drd/tests/std_list.stderr.exp | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/drd/tests/std_list.stderr.exp b/drd/tests/std_list.stderr.exp
-index d18786f80..8b1378917 100644
---- a/drd/tests/std_list.stderr.exp
-+++ b/drd/tests/std_list.stderr.exp
-@@ -1,3 +1 @@
- 
--
--ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
--- 
-2.17.0
-
meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -32
deleted file mode 100644
index 05886c743dc..00000000000
@@ -1,32 +0,0 @@
-From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Sat, 10 Jun 2017 01:20:32 -0700
-Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding
- offset to it
-
-Fixes
-error: invalid use of undefined type 'struct __pthread'
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <[email protected]>
----
- drd/tests/pth_detached3.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
-index c02eef1..35d43a6 100644
---- a/drd/tests/pth_detached3.c
-+++ b/drd/tests/pth_detached3.c
-@@ -21,7 +21,7 @@ int main(int argc, char** argv)
-   pthread_detach(thread);
- 
-   /* Invoke pthread_detach() with an invalid thread ID. */
--  pthread_detach(thread + 8);
-+  pthread_detach((pthread_t*)(&thread + 8));
- 
-   fprintf(stderr, "Finished.\n");
- 
--- 
-2.13.1
-
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +21 -2
index 6a3834cfdc6..0f86aa44ca6 100644
@@ -29,7 +29,6 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
            file://0003-correct-include-directive-path-for-config.h.patch \
            file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \
            file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \
-           file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \
            file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
            file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
            file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
@@ -38,9 +37,9 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
            file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
            file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \
            file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
-           file://0002-valgrind-adjust-std_list-expected-output.patch \
            file://0001-adjust-path-filter-for-2-memcheck-tests.patch \
            file://s390x_vec_op_t.patch \
+           file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
            "
 SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975"
 SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"
@@ -205,4 +204,24 @@ do_install_ptest() {
     # handle multilib
     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
     sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest
+
+    # This test fails on the host as well, using both 3.15 and git master (as of Jan 24 2020)
+    # https://bugs.kde.org/show_bug.cgi?id=402833
+    rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest
+
+    # As the binary isn't stripped or debug-splitted, the source file isn't fetched
+    # via dwarfsrcfiles either, so it needs to be installed manually.
+    mkdir -p ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/
+    install ${S}/none/tests/tls.c ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/
 }
+
+# avoid stripping some generated binaries otherwise some of the tests will fail
+# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
+INHIBIT_PACKAGE_STRIP_FILES = "\
+    ${PKGD}${PTEST_PATH}/none/tests/tls \
+    ${PKGD}${PTEST_PATH}/none/tests/tls.so \
+    ${PKGD}${PTEST_PATH}/none/tests/tls2.so \
+    ${PKGD}${PTEST_PATH}/helgrind/tests/tc09_bad_unlock \
+    ${PKGD}${PTEST_PATH}/memcheck/tests/manuel1 \
+    ${PKGD}${PTEST_PATH}/drd/tests/pth_detached3 \
+"
#14 lore raw

Re: [PATCH 8/9] valgrind: fix the remaining ptest failures

Now that ptests are actually run on the autobuilder for both x86 and arm64, we can look at whether anything still fails with this patchset. I tested on the x86 with 100% pass, but not on arm.

My goal is to drop @expectedfail from ptests, because otherwise ptests keep regressing with nobody caring or paying attention. Better to catch and reject regressions when they happen I think.

Alex

Quoted 223 lines · On Mon, 27 Jan 2020 at 16:53, akuster808 <[email protected]> wrote:
Quoted 4 lines · Alexander Kanavin

Particularly, one test is disabled as it is failing everywhere, two patches that actually cause failures are dropped and some binaries are prevented from being stripped where that is expected.

So this will address either
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13666 and
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13520 ?

- armin

Quoted 9 lines
---
 ...eak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34 +++++++++++++++++++
 ...rind-adjust-std_list-expected-output.patch | 32 -----------------
 ...Dereference-pthread_t-before-adding-.patch | 32 -----------------
 .../valgrind/valgrind_3.15.0.bb               | 23 +++++++++++--
 4 files changed, 55 insertions(+), 66 deletions(-)
 create mode 100644

meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch

Quoted 1 line
 delete mode 100644

meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch

Quoted 1 line
 delete mode 100644

meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch

Quoted 2 lines

diff --git

a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch

Quoted 4 lines

new file mode 100644
index 00000000000..d641998d721
--- /dev/null
+++

b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch

Quoted 6 lines
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +5 -0
@@ -0,0 +1,34 @@
+From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Fri, 24 Jan 2020 17:55:39 +0100
+Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths
+

meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch line 15

Quoted 10 lines
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +10 -0
+In oe-core, /tmp is linked to /var/volatile/tmp and
+valgrind output changes accordingly
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ none/tests/fdleak_cmsg.stderr.exp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/fdleak_cmsg.stderr.exp

b/none/tests/fdleak_cmsg.stderr.exp

Quoted 19 lines
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +19 -0
+index 6e5a797b9..0ede1ab18 100644
+--- a/none/tests/fdleak_cmsg.stderr.exp
++++ b/none/tests/fdleak_cmsg.stderr.exp
+@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
+
+
+ FILE DESCRIPTORS: 6 open at exit.
+-Open file descriptor ...: /tmp/data2
++Open file descriptor ...: ...
+    ...
+
+-Open file descriptor ...: /tmp/data1
++Open file descriptor ...: ...
+    ...
+
+ Open AF_UNIX socket ...: <unknown>
+--
+2.17.1
+
Quoted 1 line

diff --git

a/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch b/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch

Quoted 3 lines

deleted file mode 100644
index a82972ec1b6..00000000000
---

a/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch

Quoted 14 lines

+++ /dev/null

meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -12
@@ -1,32 +0,0 @@
-From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
-From: Randy MacLeod <[email protected]>
-Date: Mon, 13 May 2019 17:26:26 -0400
-Subject: [PATCH 2/2] valgrind: adjust std_list expected output
-
-The run-ptest script uses a custom --yocto-ptest option
-to change the summary statistics that valgrind issues
-to a format that matches what ptest-runner expects.
-
-Only this std_list test which checks that strcpy() works
-properly on Ubuntu-12.04 and later is affected by this change.
-It's normal output when called with --yocto-ptest is a blank

meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch line 22

Quoted 10 lines
meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -10
-line so adjust the expected output.
-
-Upstream-Status: Inappropriate [Yocto specific]
-
-Signed-off-by: Randy MacLeod <[email protected]>
----
- drd/tests/std_list.stderr.exp | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/drd/tests/std_list.stderr.exp

b/drd/tests/std_list.stderr.exp

Quoted 11 lines
meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -10
-index d18786f80..8b1378917 100644
---- a/drd/tests/std_list.stderr.exp
-+++ b/drd/tests/std_list.stderr.exp
-@@ -1,3 +1 @@
-
--
--ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
---
-2.17.0
-

diff --git

a/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch b/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch

Quoted 3 lines

deleted file mode 100644
index 05886c743dc..00000000000
---

a/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch

meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch line 4

Quoted 6 lines

+++ /dev/null

meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -4
@@ -1,32 +0,0 @@
-From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Sat, 10 Jun 2017 01:20:32 -0700
-Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before

adding

Review

Quoted 29 lines
meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -28
- offset to it
-
-Fixes
-error: invalid use of undefined type 'struct __pthread'
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <[email protected]>
----
- drd/tests/pth_detached3.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
-index c02eef1..35d43a6 100644
---- a/drd/tests/pth_detached3.c
-+++ b/drd/tests/pth_detached3.c
-@@ -21,7 +21,7 @@ int main(int argc, char** argv)
-   pthread_detach(thread);
-
-   /* Invoke pthread_detach() with an invalid thread ID. */
--  pthread_detach(thread + 8);
-+  pthread_detach((pthread_t*)(&thread + 8));
-
-   fprintf(stderr, "Finished.\n");
-
---
-2.13.1
-
(quoted diff) +0 -0

b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb SRC_URI = "

Quoted 4 lines

index 6a3834cfdc6..0f86aa44ca6 100644

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +0 -0
@@ -29,7 +29,6 @@ SRC_URI = "

https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \

Quoted 1 line

file://0003-correct-include-directive-path-for-config.h.patch \

Quoted 2 lines
            file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \

file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \

Quoted 1 line

-

file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \

Quoted 1 line

file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \

Quoted 1 line
            file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch

\

Quoted 1 line

file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb SRC_URI = "

Quoted 1 line
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +0 -0
@@ -38,9 +37,9 @@ SRC_URI = "

https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \

Quoted 1 line

file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \

Quoted 2 lines
            file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \

file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \

Quoted 4 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +1 -1
-           file://0002-valgrind-adjust-std_list-expected-output.patch \
            file://0001-adjust-path-filter-for-2-memcheck-tests.patch \
            file://s390x_vec_op_t.patch \
+

file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \

Quoted 3 lines
            "

SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" SRC_URI[sha256sum] =

"417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() { · line 208

Quoted 6 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +2 -0
@@ -205,4 +204,24 @@ do_install_ptest() {
     # handle multilib
     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
     sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest
+
+    # This test fails on the host as well, using both 3.15 and git

master (as of Jan 24 2020)

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() {

Quoted 4 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +4 -0
+    # https://bugs.kde.org/show_bug.cgi?id=402833
+    rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest
+
+    # As the binary isn't stripped or debug-splitted, the source file

isn't fetched

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() { · line 214

Quoted 2 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +2 -0
+    # via dwarfsrcfiles either, so it needs to be installed manually.
+    mkdir -p

${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() { · line 215

Quoted 1 line
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +1 -0
+    install ${S}/none/tests/tls.c

${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() {

Quoted 3 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +2 -0
 }
+
+# avoid stripping some generated binaries otherwise some of the tests

will fail

Quoted 9 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +9 -0
+# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
+INHIBIT_PACKAGE_STRIP_FILES = "\
+    ${PKGD}${PTEST_PATH}/none/tests/tls \
+    ${PKGD}${PTEST_PATH}/none/tests/tls.so \
+    ${PKGD}${PTEST_PATH}/none/tests/tls2.so \
+    ${PKGD}${PTEST_PATH}/helgrind/tests/tc09_bad_unlock \
+    ${PKGD}${PTEST_PATH}/memcheck/tests/manuel1 \
+    ${PKGD}${PTEST_PATH}/drd/tests/pth_detached3 \
+"
#15 lore raw

Re: [PATCH 8/9] valgrind: fix the remaining ptest failures

(obviously drop @expectedfail once 100% pass rate is achieved on ptests)

Alex

Quoted 235 lines · Alexander Kanavin

Now that ptests are actually run on the autobuilder for both x86 and arm64, we can look at whether anything still fails with this patchset. I tested on the x86 with 100% pass, but not on arm.

My goal is to drop @expectedfail from ptests, because otherwise ptests keep regressing with nobody caring or paying attention. Better to catch and reject regressions when they happen I think.

Alex

Quoted 223 lines · On Mon, 27 Jan 2020 at 16:53, akuster808 <[email protected]> wrote:
Quoted 4 lines · Alexander Kanavin

Particularly, one test is disabled as it is failing everywhere, two patches that actually cause failures are dropped and some binaries are prevented from being stripped where that is expected.

So this will address either
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13666 and
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13520 ?

- armin

Quoted 9 lines
---
 ...eak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34 +++++++++++++++++++
 ...rind-adjust-std_list-expected-output.patch | 32 -----------------
 ...Dereference-pthread_t-before-adding-.patch | 32 -----------------
 .../valgrind/valgrind_3.15.0.bb               | 23 +++++++++++--
 4 files changed, 55 insertions(+), 66 deletions(-)
 create mode 100644

meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch

Quoted 1 line
 delete mode 100644

meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch

Quoted 1 line
 delete mode 100644

meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch

Quoted 2 lines

diff --git

a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch

Quoted 4 lines

new file mode 100644
index 00000000000..d641998d721
--- /dev/null
+++

b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch

Quoted 6 lines
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +5 -0
@@ -0,0 +1,34 @@
+From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Fri, 24 Jan 2020 17:55:39 +0100
+Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths
+

meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch line 15

Quoted 10 lines
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +10 -0
+In oe-core, /tmp is linked to /var/volatile/tmp and
+valgrind output changes accordingly
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ none/tests/fdleak_cmsg.stderr.exp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/fdleak_cmsg.stderr.exp

b/none/tests/fdleak_cmsg.stderr.exp

Quoted 19 lines
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +19 -0
+index 6e5a797b9..0ede1ab18 100644
+--- a/none/tests/fdleak_cmsg.stderr.exp
++++ b/none/tests/fdleak_cmsg.stderr.exp
+@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
+
+
+ FILE DESCRIPTORS: 6 open at exit.
+-Open file descriptor ...: /tmp/data2
++Open file descriptor ...: ...
+    ...
+
+-Open file descriptor ...: /tmp/data1
++Open file descriptor ...: ...
+    ...
+
+ Open AF_UNIX socket ...: <unknown>
+--
+2.17.1
+
Quoted 1 line

diff --git

a/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch b/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch

Quoted 3 lines

deleted file mode 100644
index a82972ec1b6..00000000000
---

a/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch

Quoted 14 lines

+++ /dev/null

meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -12
@@ -1,32 +0,0 @@
-From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
-From: Randy MacLeod <[email protected]>
-Date: Mon, 13 May 2019 17:26:26 -0400
-Subject: [PATCH 2/2] valgrind: adjust std_list expected output
-
-The run-ptest script uses a custom --yocto-ptest option
-to change the summary statistics that valgrind issues
-to a format that matches what ptest-runner expects.
-
-Only this std_list test which checks that strcpy() works
-properly on Ubuntu-12.04 and later is affected by this change.
-It's normal output when called with --yocto-ptest is a blank

meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch line 22

Quoted 10 lines
meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -10
-line so adjust the expected output.
-
-Upstream-Status: Inappropriate [Yocto specific]
-
-Signed-off-by: Randy MacLeod <[email protected]>
----
- drd/tests/std_list.stderr.exp | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/drd/tests/std_list.stderr.exp

b/drd/tests/std_list.stderr.exp

Quoted 11 lines
meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -10
-index d18786f80..8b1378917 100644
---- a/drd/tests/std_list.stderr.exp
-+++ b/drd/tests/std_list.stderr.exp
-@@ -1,3 +1 @@
-
--
--ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
---
-2.17.0
-

diff --git

a/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch b/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch

Quoted 3 lines

deleted file mode 100644
index 05886c743dc..00000000000
---

a/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch

meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch line 4

Quoted 6 lines

+++ /dev/null

meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -4
@@ -1,32 +0,0 @@
-From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Sat, 10 Jun 2017 01:20:32 -0700
-Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before

adding

Review

Quoted 29 lines
meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -28
- offset to it
-
-Fixes
-error: invalid use of undefined type 'struct __pthread'
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <[email protected]>
----
- drd/tests/pth_detached3.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
-index c02eef1..35d43a6 100644
---- a/drd/tests/pth_detached3.c
-+++ b/drd/tests/pth_detached3.c
-@@ -21,7 +21,7 @@ int main(int argc, char** argv)
-   pthread_detach(thread);
-
-   /* Invoke pthread_detach() with an invalid thread ID. */
--  pthread_detach(thread + 8);
-+  pthread_detach((pthread_t*)(&thread + 8));
-
-   fprintf(stderr, "Finished.\n");
-
---
-2.13.1
-
(quoted diff) +0 -0

b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb SRC_URI = "

Quoted 4 lines

index 6a3834cfdc6..0f86aa44ca6 100644

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +0 -0
@@ -29,7 +29,6 @@ SRC_URI = "

https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \

Quoted 1 line

file://0003-correct-include-directive-path-for-config.h.patch \

Quoted 2 lines
            file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \

file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \

Quoted 1 line

-

file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \

Quoted 1 line

file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \

Quoted 1 line

file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \

Quoted 1 line

file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb SRC_URI = "

Quoted 1 line
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +0 -0
@@ -38,9 +37,9 @@ SRC_URI = "

https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \

Quoted 1 line

file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \

Quoted 2 lines
            file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \

file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \

Quoted 4 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +1 -1
-           file://0002-valgrind-adjust-std_list-expected-output.patch \
            file://0001-adjust-path-filter-for-2-memcheck-tests.patch \
            file://s390x_vec_op_t.patch \
+

file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \

Quoted 3 lines
            "

SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" SRC_URI[sha256sum] =

"417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() { · line 208

Quoted 6 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +2 -0
@@ -205,4 +204,24 @@ do_install_ptest() {
     # handle multilib
     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
     sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest
+
+    # This test fails on the host as well, using both 3.15 and git

master (as of Jan 24 2020)

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() {

Quoted 4 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +4 -0
+    # https://bugs.kde.org/show_bug.cgi?id=402833
+    rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest
+
+    # As the binary isn't stripped or debug-splitted, the source file

isn't fetched

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() { · line 214

Quoted 2 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +2 -0
+    # via dwarfsrcfiles either, so it needs to be installed manually.
+    mkdir -p

${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() { · line 215

Quoted 1 line
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +1 -0
+    install ${S}/none/tests/tls.c

${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/

meta/recipes-devtools/valgrind/valgrind_3.15.0.bb do_install_ptest() {

Quoted 3 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +2 -0
 }
+
+# avoid stripping some generated binaries otherwise some of the tests

will fail

Quoted 9 lines
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +9 -0
+# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
+INHIBIT_PACKAGE_STRIP_FILES = "\
+    ${PKGD}${PTEST_PATH}/none/tests/tls \
+    ${PKGD}${PTEST_PATH}/none/tests/tls.so \
+    ${PKGD}${PTEST_PATH}/none/tests/tls2.so \
+    ${PKGD}${PTEST_PATH}/helgrind/tests/tc09_bad_unlock \
+    ${PKGD}${PTEST_PATH}/memcheck/tests/manuel1 \
+    ${PKGD}${PTEST_PATH}/drd/tests/pth_detached3 \
+"
#16 lore raw

Re: [PATCH 8/9] valgrind: fix the remaining ptest failures

In reply to Alexander Kanavin
Quoted 117 lines · Alexander Kanavin

Particularly, one test is disabled as it is failing everywhere, two patches that actually cause failures are dropped and some binaries are prevented from being stripped where that is expected.

---
 ...eak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34 +++++++++++++++++++
 ...rind-adjust-std_list-expected-output.patch | 32 -----------------
 ...Dereference-pthread_t-before-adding-.patch | 32 -----------------
 .../valgrind/valgrind_3.15.0.bb               | 23 +++++++++++--
 4 files changed, 55 insertions(+), 66 deletions(-)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file +34 -0
new file mode 100644
index 00000000000..d641998d721
@@ -0,0 +1,34 @@
+From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Fri, 24 Jan 2020 17:55:39 +0100
+Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths
+
+In oe-core, /tmp is linked to /var/volatile/tmp and
+valgrind output changes accordingly
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ none/tests/fdleak_cmsg.stderr.exp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/fdleak_cmsg.stderr.exp b/none/tests/fdleak_cmsg.stderr.exp
+index 6e5a797b9..0ede1ab18 100644
+--- a/none/tests/fdleak_cmsg.stderr.exp
++++ b/none/tests/fdleak_cmsg.stderr.exp
+@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
+
+
+ FILE DESCRIPTORS: 6 open at exit.
+-Open file descriptor ...: /tmp/data2
++Open file descriptor ...: ...
+    ...
+
+-Open file descriptor ...: /tmp/data1
++Open file descriptor ...: ...
+    ...
+
+ Open AF_UNIX socket ...: <unknown>
+--
+2.17.1
+
meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted +0 -32
deleted file mode 100644
index a82972ec1b6..00000000000
@@ -1,32 +0,0 @@
-From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
-From: Randy MacLeod <[email protected]>
-Date: Mon, 13 May 2019 17:26:26 -0400
-Subject: [PATCH 2/2] valgrind: adjust std_list expected output
-
-The run-ptest script uses a custom --yocto-ptest option
-to change the summary statistics that valgrind issues
-to a format that matches what ptest-runner expects.
-
-Only this std_list test which checks that strcpy() works
-properly on Ubuntu-12.04 and later is affected by this change.
-It's normal output when called with --yocto-ptest is a blank
-line so adjust the expected output.
-
-Upstream-Status: Inappropriate [Yocto specific]
-
-Signed-off-by: Randy MacLeod <[email protected]>
----
- drd/tests/std_list.stderr.exp | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/drd/tests/std_list.stderr.exp b/drd/tests/std_list.stderr.exp
-index d18786f80..8b1378917 100644
---- a/drd/tests/std_list.stderr.exp
-+++ b/drd/tests/std_list.stderr.exp
-@@ -1,3 +1 @@
-
--
--ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
---
-2.17.0
-
meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -16
deleted file mode 100644
index 05886c743dc..00000000000
@@ -1,32 +0,0 @@
-From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Sat, 10 Jun 2017 01:20:32 -0700
-Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding
- offset to it
-
-Fixes
-error: invalid use of undefined type 'struct __pthread'
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <[email protected]>
----
- drd/tests/pth_detached3.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-

meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch line 26

Quoted 10 lines
meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -10
-diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
-index c02eef1..35d43a6 100644
---- a/drd/tests/pth_detached3.c
-+++ b/drd/tests/pth_detached3.c
-@@ -21,7 +21,7 @@ int main(int argc, char** argv)
-   pthread_detach(thread);
-
-   /* Invoke pthread_detach() with an invalid thread ID. */
--  pthread_detach(thread + 8);
-+  pthread_detach((pthread_t*)(&thread + 8));

Lets not drop this patch since it will fail musl builds again a portable and working fix is to replace this pthread_detach call with

pthread_detach((pthread_t)((long)thread + 8));

this will ensure this works portably across musl and glibc.

Quoted 62 lines
meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted +0 -6
-
-   fprintf(stderr, "Finished.\n");
-
---
-2.13.1
-
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +21 -3
index 6a3834cfdc6..0f86aa44ca6 100644
@@ -29,7 +29,6 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
            file://0003-correct-include-directive-path-for-config.h.patch \
            file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \
            file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \
-           file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \
            file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
            file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
            file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
@@ -38,9 +37,9 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
            file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
            file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \
            file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
-           file://0002-valgrind-adjust-std_list-expected-output.patch \
            file://0001-adjust-path-filter-for-2-memcheck-tests.patch \
            file://s390x_vec_op_t.patch \
+           file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
            "
 SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975"
 SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"
@@ -205,4 +204,24 @@ do_install_ptest() {
     # handle multilib
     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
     sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest
+
+    # This test fails on the host as well, using both 3.15 and git master (as of Jan 24 2020)
+    # https://bugs.kde.org/show_bug.cgi?id=402833
+    rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest
+
+    # As the binary isn't stripped or debug-splitted, the source file isn't fetched
+    # via dwarfsrcfiles either, so it needs to be installed manually.
+    mkdir -p ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/
+    install ${S}/none/tests/tls.c ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/
 }
+
+# avoid stripping some generated binaries otherwise some of the tests will fail
+# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
+INHIBIT_PACKAGE_STRIP_FILES = "\
+    ${PKGD}${PTEST_PATH}/none/tests/tls \
+    ${PKGD}${PTEST_PATH}/none/tests/tls.so \
+    ${PKGD}${PTEST_PATH}/none/tests/tls2.so \
+    ${PKGD}${PTEST_PATH}/helgrind/tests/tc09_bad_unlock \
+    ${PKGD}${PTEST_PATH}/memcheck/tests/manuel1 \
+    ${PKGD}${PTEST_PATH}/drd/tests/pth_detached3 \
+"
--

2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#17 lore raw

PATCH 9/9 lttng-tools: disable tests that sporadically fail

In reply to Alexander Kanavin

Upstream is aware, and will investigate and fix.

---
 ...ression-disable-the-tools-live-tests.patch | 29 +++++++++++++++++++
 .../lttng/lttng-tools_2.11.0.bb               |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch
meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch new file +29 -0
new file mode 100644
index 00000000000..a558a0993f9
@@ -0,0 +1,29 @@
+From 5f0ef3e007ed83c1ce7ae817308e5942decc1230 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Fri, 24 Jan 2020 18:03:25 +0100
+Subject: [PATCH] tests/regression: disable the tools/live tests
+
+They have been found to sporadically fail; the issue has been
+reported upstream and they will work to investigate and fix:
+https://bugs.lttng.org/issues/1217
+
+Upstream-Status: Inappropriate [upstream is working on a real fix]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ tests/regression/Makefile.am | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am
+index 73eb9f7..92fc18f 100644
+--- a/tests/regression/Makefile.am
++++ b/tests/regression/Makefile.am
+@@ -9,9 +9,6 @@ TESTS = tools/filtering/test_invalid_filter \
+ 	tools/filtering/test_valid_filter \
+ 	tools/streaming/test_ust \
+ 	tools/health/test_thread_ok \
+-	tools/live/test_ust \
+-	tools/live/test_ust_tracefile_count \
+-	tools/live/test_lttng_ust \
+ 	tools/tracefile-limits/test_tracefile_count \
+ 	tools/tracefile-limits/test_tracefile_size \
+ 	tools/exclusion/test_exclusion \
meta/recipes-kernel/lttng/lttng-tools_2.11.0.bb +1 -0
index 639d4b62114..9cb896314b8 100644
@@ -33,6 +33,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
            file://0001-tests-do-not-strip-a-helper-library.patch \
            file://run-ptest \
            file://lttng-sessiond.service \
+           file://0001-tests-regression-disable-the-tools-live-tests.patch \
            "
 
 SRC_URI[md5sum] = "e6c23244a36e2a09783d03a362eb63cb"
Signature · 1 line
2.17.1
Acked-by on v1 9/9
#18 lore raw

Re: [PATCH 9/9] lttng-tools: disable tests that sporadically fail

Hi,

Quoted 1 line · Alexander Kanavin

Upstream is aware, and will investigate and fix.

For reference: https://bugs.lttng.org/issues/1217

Quoted 63 lines
---
 ...ression-disable-the-tools-live-tests.patch | 29 +++++++++++++++++++
 .../lttng/lttng-tools_2.11.0.bb               |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch
meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch new file +29 -0
new file mode 100644
index 00000000000..a558a0993f9
@@ -0,0 +1,29 @@
+From 5f0ef3e007ed83c1ce7ae817308e5942decc1230 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Fri, 24 Jan 2020 18:03:25 +0100
+Subject: [PATCH] tests/regression: disable the tools/live tests
+
+They have been found to sporadically fail; the issue has been
+reported upstream and they will work to investigate and fix:
+https://bugs.lttng.org/issues/1217
+
+Upstream-Status: Inappropriate [upstream is working on a real fix]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ tests/regression/Makefile.am | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am
+index 73eb9f7..92fc18f 100644
+--- a/tests/regression/Makefile.am
++++ b/tests/regression/Makefile.am
+@@ -9,9 +9,6 @@ TESTS = tools/filtering/test_invalid_filter \
+ 	tools/filtering/test_valid_filter \
+ 	tools/streaming/test_ust \
+ 	tools/health/test_thread_ok \
+-	tools/live/test_ust \
+-	tools/live/test_ust_tracefile_count \
+-	tools/live/test_lttng_ust \
+ 	tools/tracefile-limits/test_tracefile_count \
+ 	tools/tracefile-limits/test_tracefile_size \
+ 	tools/exclusion/test_exclusion \
meta/recipes-kernel/lttng/lttng-tools_2.11.0.bb +1 -0
index 639d4b62114..9cb896314b8 100644
@@ -33,6 +33,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
            file://0001-tests-do-not-strip-a-helper-library.patch \
            file://run-ptest \
            file://lttng-sessiond.service \
+           file://0001-tests-regression-disable-the-tools-live-tests.patch \
            "
 
 SRC_URI[md5sum] = "e6c23244a36e2a09783d03a362eb63cb"
Signature · 7 lines
2.17.1

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
Jonathan Rajotte-Julien
EfficiOS