From 82c905dc58a36aeae40b1b273a12f63fb1973cf4 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Mon, 13 Apr 2020 13:39:40 -0500 Subject: meta-openembedded and poky: subtree updates Squash of the following due to dependencies among them and OpenBMC changes: meta-openembedded: subtree update:d0748372d2..9201611135 meta-openembedded: subtree update:9201611135..17fd382f34 poky: subtree update:9052e5b32a..2e11d97b6c poky: subtree update:2e11d97b6c..a8544811d7 The change log was too large for the jenkins plugin to handle therefore it has been removed. Here is the first and last commit of each subtree: meta-openembedded:d0748372d2 cppzmq: bump to version 4.6.0 meta-openembedded:17fd382f34 mpv: Remove X11 dependency poky:9052e5b32a package_ipk: Remove pointless comment to trigger rebuild poky:a8544811d7 pbzip2: Fix license warning Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6 Signed-off-by: Andrew Geissler --- ...1-memcheck-tests-Fix-timerfd-syscall-test.patch | 98 ++++++++++++++++++++++ ...s-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34 ++++++++ ...pthread_detatch-call-portable-across-plat.patch | 87 +++++++++++++++++++ ...-valgrind-adjust-std_list-expected-output.patch | 32 ------- ...d3.c-Dereference-pthread_t-before-adding-.patch | 32 ------- .../valgrind/valgrind/remove-for-aarch64 | 1 + .../valgrind/valgrind/s390x_vec_op_t.patch | 19 +++++ .../recipes-devtools/valgrind/valgrind_3.15.0.bb | 31 ++++++- 8 files changed, 266 insertions(+), 68 deletions(-) create mode 100644 poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch create mode 100644 poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch create mode 100644 poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch delete mode 100644 poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch delete mode 100644 poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch create mode 100644 poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch (limited to 'poky/meta/recipes-devtools/valgrind') diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch new file mode 100644 index 000000000..15fbbe954 --- /dev/null +++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch @@ -0,0 +1,98 @@ +From 5d411fd147d652e9d7bb259f4048693c6e4742aa Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 9 Mar 2020 16:30:19 -0700 +Subject: [PATCH] memcheck/tests: Fix timerfd syscall test + +modern libc provides these functions, moreover this also ensures that we +are 64bit time_t safe. Fallback to existing definitions if libc does not +have the implementation or syscall is not defined + +Upstream-Status: Submitted [https://sourceforge.net/p/valgrind/mailman/message/36943897/] +Signed-off-by: Khem Raj +--- + config.h.in | 9 +++++++++ + configure.ac | 3 +++ + memcheck/tests/linux/timerfd-syscall.c | 10 ++++++++-- + 5 files changed, 32 insertions(+), 2 deletions(-) + +--- a/config.h.in ++++ b/config.h.in +@@ -301,6 +301,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_SYSNVL_H + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TIMERFD_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_TIME_H + +--- a/configure.ac ++++ b/configure.ac +@@ -4098,6 +4098,7 @@ AC_CHECK_HEADERS([ \ + sys/syscall.h \ + sys/sysnvl.h \ + sys/time.h \ ++ sys/timerfd.h \ + sys/types.h \ + ]) + +--- a/memcheck/tests/linux/timerfd-syscall.c ++++ b/memcheck/tests/linux/timerfd-syscall.c +@@ -45,6 +45,9 @@ + #if defined(HAVE_SYS_TIME_H) + #include + #endif ++#if defined(HAVE_SYS_TIMERFD_H) ++#include ++#endif + #if defined(HAVE_SYS_TYPES_H) + #include + #endif +@@ -54,7 +57,8 @@ + * timerfd_* system call numbers introduced in 2.6.23. These constants are + * not yet in the glibc 2.7 headers, that is why they are defined here. + */ +-#ifndef __NR_timerfd_create ++#if !defined(HAVE_SYS_TIMERFD_H) ++#if !defined(__NR_timerfd_create) + #if defined(__x86_64__) + #define __NR_timerfd_create 283 + #elif defined(__i386__) +@@ -67,8 +71,10 @@ + #error Cannot detect your architecture! + #endif + #endif ++#endif + +-#ifndef __NR_timerfd_settime ++#if !defined(HAVE_SYS_TIMERFD_H) ++#if !defined(__NR_timerfd_settime) + #if defined(__x86_64__) + #define __NR_timerfd_settime 286 + #define __NR_timerfd_gettime 287 +@@ -85,7 +91,7 @@ + #error Cannot detect your architecture! + #endif + #endif +- ++#endif + + + /* Definitions from include/linux/timerfd.h */ +@@ -127,6 +133,7 @@ void set_timespec(struct timespec *tmr, + tmr->tv_nsec = (long) (1000ULL * (ustime % 1000000ULL)); + } + ++#if !defined(HAVE_SYS_TIMERFD_H) + int timerfd_create(int clockid, int flags) + { + return syscall(__NR_timerfd_create, clockid, flags); +@@ -142,6 +149,7 @@ int timerfd_gettime(int ufc, struct itim + { + return syscall(__NR_timerfd_gettime, ufc, otmr); + } ++#endif + + long waittmr(int tfd, int timeo) + { diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file mode 100644 index 000000000..d641998d7 --- /dev/null +++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch @@ -0,0 +1,34 @@ +From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +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 +--- + 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 ...: +-- +2.17.1 + diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch new file mode 100644 index 000000000..f407d8191 --- /dev/null +++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch @@ -0,0 +1,87 @@ +From 92fcf75d6d3903e45492b041bf4ad07787d2e58a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 27 Jan 2020 19:50:04 -0800 +Subject: [PATCH] drd/tests/pth_detached3: Make pthread_detach() call portable + across platforms + +pthread_t is opaque type therefore we can not apply simple arithmetic to +variables of pthread_t type this test needs to pass a invalid pthread_t +handle, typcasting to uintptr_t works too and is portable across glibc and +musl + +Fixes +| pth_detached3.c:24:25: error: invalid use of undefined type 'struct __pthread' +| 24 | pthread_detach(thread + 8); +| | ^ + +[ bvanassche: reformatted patch description and fixed up line numbers ] + +Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=92fcf75d6d3903e45492b041bf4ad07787d2e58a] +Signed-off-by: Khem Raj +--- + drd/tests/pth_detached3.c | 3 ++- + drd/tests/pth_detached3.stderr.exp1 | 4 ++-- + drd/tests/pth_detached3.stderr.exp2 | 4 ++-- + 3 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c +index c02eef1..efeb15b 100644 +--- a/drd/tests/pth_detached3.c ++++ b/drd/tests/pth_detached3.c +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + static void* thread_func(void* arg) + { +@@ -21,7 +22,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)((uintptr_t)thread + 8)); + + fprintf(stderr, "Finished.\n"); + +diff --git a/drd/tests/pth_detached3.stderr.exp1 b/drd/tests/pth_detached3.stderr.exp1 +index 58412ec..8dd58ba 100644 +--- a/drd/tests/pth_detached3.stderr.exp1 ++++ b/drd/tests/pth_detached3.stderr.exp1 +@@ -1,11 +1,11 @@ + + pthread_detach(): invalid thread ID 0x........ + at 0x........: pthread_detach (drd_pthread_intercepts.c:?) +- by 0x........: main (pth_detached3.c:21) ++ by 0x........: main (pth_detached3.c:22) + + pthread_detach(): invalid thread ID 0x........ + at 0x........: pthread_detach (drd_pthread_intercepts.c:?) +- by 0x........: main (pth_detached3.c:24) ++ by 0x........: main (pth_detached3.c:25) + + Finished. + +diff --git a/drd/tests/pth_detached3.stderr.exp2 b/drd/tests/pth_detached3.stderr.exp2 +index bdc5cf8..e82dee1 100644 +--- a/drd/tests/pth_detached3.stderr.exp2 ++++ b/drd/tests/pth_detached3.stderr.exp2 +@@ -2,12 +2,12 @@ + pthread_detach(): invalid thread ID 0x........ + at 0x........: vgDrd_set_joinable (drd_pthread_intercepts.c:?) + by 0x........: pthread_detach (drd_pthread_intercepts.c:?) +- by 0x........: main (pth_detached3.c:21) ++ by 0x........: main (pth_detached3.c:22) + + pthread_detach(): invalid thread ID 0x........ + at 0x........: vgDrd_set_joinable (drd_pthread_intercepts.c:?) + by 0x........: pthread_detach (drd_pthread_intercepts.c:?) +- by 0x........: main (pth_detached3.c:24) ++ by 0x........: main (pth_detached3.c:25) + + Finished. + +-- +2.9.3 + diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch deleted file mode 100644 index a82972ec1..000000000 --- a/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001 -From: Randy MacLeod -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 ---- - 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 - diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted file mode 100644 index 05886c743..000000000 --- a/poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 ---- - 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 - diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 index acf4fd1bc..a3a0c6e50 100644 --- a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 +++ b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 @@ -1,3 +1,4 @@ +gdbserver_tests/hgtls cachegrind/tests/ann1 callgrind/tests/simwork1 callgrind/tests/simwork2 diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch b/poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch new file mode 100644 index 000000000..eea671da0 --- /dev/null +++ b/poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch @@ -0,0 +1,19 @@ +s390x_vec_op_t is not needed anywhere, only elements of enum are accessed +removing it ensures that valgrind can be built with -fno-common option + +Fixes +ld: ../../VEX/libvex-amd64-linux.a(libvex_amd64_linux_a-guest_s390_helpers.o):/usr/src/debug/valgrind/3.15.0-r0/build/VEX/../../valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: multiple definition of `s390x_vec_op_t'; ../../VEX/libvexmultiarch-amd64-linux.a(libvexmultiarch_amd64_linux_a-multiarch_main_main.o):/usr/src/debug/valgrind/3.15.0-r0/build/VEX/../../valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: first defined here + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- a/VEX/priv/guest_s390_defs.h ++++ b/VEX/priv/guest_s390_defs.h +@@ -286,7 +286,7 @@ enum { + S390_VEC_OP_VFCHE = 18, + S390_VEC_OP_VFTCI = 19, + S390_VEC_OP_LAST = 20 // supposed to be the last element in enum +-} s390x_vec_op_t; ++}; + + /* Arguments of s390x_dirtyhelper_vec_op(...) which are packed into one + ULong variable. diff --git a/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb index 63f972945..7954437a1 100644 --- a/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb @@ -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,8 +37,11 @@ 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 \ + file://0001-tests-Make-pthread_detatch-call-portable-across-plat.patch \ + file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ " SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1" @@ -63,7 +65,8 @@ COMPATIBLE_HOST_linux-gnun32 = 'null' # Disable for powerpc64 with musl COMPATIBLE_HOST_libc-musl_powerpc64 = 'null' -inherit autotools ptest multilib_header +# brokenseip is unfortunately required by ptests to pass +inherit autotools-brokensep ptest multilib_header EXTRA_OECONF = "--enable-tls --without-mpicc" EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" @@ -115,7 +118,7 @@ RDEPENDS_${PN}-ptest += " bash coreutils file \ gdb libgomp \ perl \ perl-module-getopt-long perl-module-file-basename perl-module-file-glob \ - procps sed ${PN}-dbg" + procps sed ${PN}-dbg ${PN}-src" RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" # One of the tests contains a bogus interpreter path on purpose. @@ -203,4 +206,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 \ +" -- cgit v1.2.3