diff mbox series

[RFC,1/5] valgrind: make ptest depend on all components

Message ID 20231109012555.4074359-1-Randy.MacLeod@windriver.com
State New
Headers show
Series [RFC,1/5] valgrind: make ptest depend on all components | expand

Commit Message

Randy MacLeod Nov. 9, 2023, 1:25 a.m. UTC
From: Randy MacLeod <Randy.MacLeod@windriver.com>

When the helper scripts were split into separate packages, they
weren't added as ptest dependencies. Fix that.

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
 meta/recipes-devtools/valgrind/valgrind_3.21.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Randy MacLeod Nov. 9, 2023, 1:31 a.m. UTC | #1
On 2023-11-08 8:25 p.m., Randy MacLeod via lists.openembedded.org wrote:
> From: Randy MacLeod<Randy.MacLeod@windriver.com>
>
> Full release notes:https://valgrind.org/docs/manual/dist.news.html
>
> In summary, there is a new configure option: --with-gdbscripts-dir
> that lets you install the gdb valgrind python monitor scripts in a specific location.
> It's not used in the valgrind recipe yet. Also, there were a few Memcheck and Cachegrind
> improvements made and many bugs fixed.
>
> The update required removing the patch:
>     0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch
> as it's dealt with by these commits:
>     f7e4bb4af Bug 382034 - Testcases build fixes for musl
>     306232d40 musl: another fix for building testcases
> as described on:https://bugs.kde.org/show_bug.cgi?id=382034
>
> Ptest Resutls for qemux86-64/kvm
>
> glibc:
> === Test Summary ===
> TOTAL: 792
> PASSED: 759
> FAILED: 14
I haven't checked but I think these are 14 *new* ptest failures so we 
shouldn't merge until they are fixed.

The tests that fail are:

root@qemux86-64:/usr/lib/valgrind/ptest# grep FAIL 
valgrind_ptest_20231109-001351.log
FAIL: memcheck/tests/linux/dlclose_leak-no-keep
FAIL: memcheck/tests/linux/dlclose_leak
FAIL: memcheck/tests/wrap1
FAIL: memcheck/tests/wrap2
FAIL: memcheck/tests/wrap3
FAIL: memcheck/tests/wrap4
FAIL: memcheck/tests/wrap5
FAIL: memcheck/tests/wrap6
FAIL: memcheck/tests/wrap7
FAIL: memcheck/tests/wrap8
FAIL: cachegrind/tests/wrap5
FAIL: massif/tests/bug469146
FAIL: massif/tests/new-cpp
FAIL: massif/tests/overloaded-new

I may not get time to work on them any more this week so I'm sending the 
update
in case anyone (Alex!) wants to take a look.

../Rnady

> SKIPPED: 19
>
> musl:
> === Test Summary ===
> TOTAL: 792
> PASSED: 559
> FAILED: 211
> SKIPPED: 22
>
> Signed-off-by: Randy MacLeod<Randy.MacLeod@windriver.com>
> ---
>   ...inux-seg_override.c-add-missing-incl.patch | 30 -------------------
>   ...{valgrind_3.21.0.bb => valgrind_3.22.0.bb} |  3 +-
>   2 files changed, 1 insertion(+), 32 deletions(-)
>   delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch
>   rename meta/recipes-devtools/valgrind/{valgrind_3.21.0.bb => valgrind_3.22.0.bb} (98%)
>
> diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch
> deleted file mode 100644
> index 5e36c28523..0000000000
> --- a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -From 978d9ed7f857f2cdcd2a8632f3c2feb56b99c825 Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin<alex@linutronix.de>
> -Date: Mon, 8 May 2023 11:56:35 +0200
> -Subject: [PATCH] none/tests/x86-linux/seg_override.c: add missing include for
> - musl builds
> -
> -Otherwise SYS_modify_ldt is undefined.
> -
> -Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=382034]
> -Signed-off-by: Alexander Kanavin<alex@linutronix.de>
> -
> ----
> - none/tests/x86-linux/seg_override.c | 4 ++++
> - 1 file changed, 4 insertions(+)
> -
> -diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c
> -index ca8fbfe..4ef4394 100644
> ---- a/none/tests/x86-linux/seg_override.c
> -+++ b/none/tests/x86-linux/seg_override.c
> -@@ -3,6 +3,10 @@
> - #include <errno.h>
> - #include <string.h>
> - #include "../../../config.h"
> -+#if defined(MUSL_LIBC)
> -+#include <syscall.h>
> -+#include <unistd.h>
> -+#endif
> -
> -
> - /* Stuff from Wine. */
> diff --git a/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
> similarity index 98%
> rename from meta/recipes-devtools/valgrind/valgrind_3.21.0.bb
> rename to meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
> index a2feda6aae..6dcd028075 100644
> --- a/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb
> +++ b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
> @@ -36,9 +36,8 @@ SRC_URI ="https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ 
> file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ 
> file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ 
> file://0001-docs-Disable-manual-validation.patch \ - 
> file://0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch \ "
> -SRC_URI[sha256sum] = "10ce1618bb3e33fad16eb79552b0a3e1211762448a0d7fce11c8a6243b9ac971"
> +SRC_URI[sha256sum] = "c811db5add2c5f729944caf47c4e7a65dcaabb9461e472b578765dd7bf6d2d4c"
>   UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
>   
>   COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#190369):https://lists.openembedded.org/g/openembedded-core/message/190369
> Mute This Topic:https://lists.openembedded.org/mt/102477899/3616765
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Randy MacLeod Nov. 9, 2023, 1:39 a.m. UTC | #2
On 2023-11-08 8:25 p.m., Randy MacLeod via lists.openembedded.org wrote:
> From: Randy MacLeod<Randy.MacLeod@windriver.com>
>
> Drop 002-context-APIs-are-not-available-on-musl.patch
I tested the update to 3.22 including ptests and then did a careful 
review of the patches

so that's why these 'drop' commits come after the recipe update commit.


Strangely enough, the build/ptest results didn't change as I dropped 
each patch
since upstream took a different approach to each problem and the patches
were simply not required.

I _could_ squash all these 'drop' commits into the recipe update but
I prefer to do them one at a time.

../Randy


> since this is handled in a different way by the following
> upstream commits:
>     c9e88f345 configure, drd: Only build the swapcontext test if swapcontext() is available
>     7cd4d7816 memcheck/tests/linux/stack_changes: Only run this test if setcontext() is available
> And the that tracked the error:
>     https://bugs.kde.org/show_bug.cgi?id=434775
> is closed.
>
> No regression in musl qemux86-64/kvm ptest resutls.:
>
> Signed-off-by: Randy MacLeod<Randy.MacLeod@windriver.com>
> ---
>   ...ntext-APIs-are-not-available-on-musl.patch | 92 -------------------
>   .../valgrind/valgrind_3.22.0.bb               |  1 -
>   2 files changed, 93 deletions(-)
>   delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
>
> diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
> deleted file mode 100644
> index 7f0e38cb95..0000000000
> --- a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
> +++ /dev/null
> @@ -1,92 +0,0 @@
> -From 26c104adf6c5162572b7aa2fac89d0835b7f8f0b Mon Sep 17 00:00:00 2001
> -From: Randy MacLeod<Randy.MacLeod@windriver.com>
> -Date: Tue, 16 Oct 2018 21:27:46 -0400
> -Subject: [PATCH] context APIs are not available on musl
> -
> -Updated patch for valgrind-3.14
> -
> -Signed-off-by: Khem Raj<raj.khem@gmail.com>
> -Signed-off-by: Randy MacLeod<Randy.MacLeod@windriver.com>
> -
> -Apply same patch to drd/tests/swapcontext.c
> -for valgrind-3.17.
> -
> -Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=434775]
> -
> -Signed-off-by: Yi Fan Yu<yifan.yu@windriver.com>
> ----
> - drd/tests/swapcontext.c              | 6 ++++++
> - memcheck/tests/linux/stack_changes.c | 7 ++++++-
> - 2 files changed, 12 insertions(+), 1 deletion(-)
> -
> -diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c
> -index 622c70bc5..5e72bb0f3 100644
> ---- a/drd/tests/swapcontext.c
> -+++ b/drd/tests/swapcontext.c
> -@@ -20,6 +20,7 @@
> -
> - #define STACKSIZE (PTHREAD_STACK_MIN + 4096)
> -
> -+#ifdef __GLIBC__
> - typedef struct thread_local {
> -   ucontext_t uc[3];
> -   size_t nrsw;
> -@@ -67,9 +68,11 @@ void *worker(void *data)
> -   swapcontext(&tlocal->uc[0], &tlocal->uc[1]);
> -   return NULL;
> - }
> -+#endif
> -
> - int main(int argc, char *argv[])
> - {
> -+#ifdef __GLIBC__
> -   enum { NR = 32 };
> -   thread_local_t tlocal[NR];
> -   pthread_t thread[NR];
> -@@ -94,6 +97,9 @@ int main(int argc, char *argv[])
> -
> -   for (i = 0; i < NR; i++)
> -     pthread_join(thread[i], NULL);
> -+#else
> -+    printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
> -+#endif
> -
> -   return 0;
> - }
> -diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
> -index 7f97b90a5..a26cb4ae6 100644
> ---- a/memcheck/tests/linux/stack_changes.c
> -+++ b/memcheck/tests/linux/stack_changes.c
> -@@ -10,6 +10,7 @@
> - // This test is checking the libc context calls (setcontext, etc.) and
> - // checks that Valgrind notices their stack changes properly.
> -
> -+#ifdef __GLIBC__
> - typedef  ucontext_t  mycontext;
> -
> - mycontext ctx1, ctx2, oldc;
> -@@ -51,9 +52,11 @@ int init_context(mycontext *uc)
> -
> -     return ret;
> - }
> -+#endif
> -
> - int main(int argc, char **argv)
> - {
> -+#ifdef __GLIBC__
> -     int c1 = init_context(&ctx1);
> -     int c2 = init_context(&ctx2);
> -
> -@@ -66,6 +69,8 @@ int main(int argc, char **argv)
> -     //free(ctx1.uc_stack.ss_sp);
> -     VALGRIND_STACK_DEREGISTER(c2);
> -     //free(ctx2.uc_stack.ss_sp);
> --
> -+#else
> -+    printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
> -+#endif
> -     return 0;
> - }
> ---
> -2.17.1
> -
> diff --git a/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
> index 6dcd028075..0ebf08eb28 100644
> --- a/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
> +++ b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
> @@ -25,7 +25,6 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
>              file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch  \
>              file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch  \
>              file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch  \
> -file://0002-context-APIs-are-not-available-on-musl.patch  \
>              file://0003-correct-include-directive-path-for-config.h.patch  \
>              file://0001-fix-opcode-not-supported-on-mips32-linux.patch  \
>              file://0001-Make-local-functions-static-to-avoid-assembler-error.patch  \
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#190370):https://lists.openembedded.org/g/openembedded-core/message/190370
> Mute This Topic:https://lists.openembedded.org/mt/102477900/3616765
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb
index 68ab319a1b..a2feda6aae 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb
@@ -139,7 +139,9 @@  RDEPENDS:${PN}-ptest += " bash coreutils curl file \
    perl-module-overloading perl-module-cwd perl-module-ipc-open3 \
    perl-module-carp perl-module-symbol \
    procps sed ${PN}-dbg ${PN}-src ${TCLIBC}-src gcc-runtime-dbg \
-   util-linux-taskset"
+   util-linux-taskset \
+   ${PN}-cachegrind ${PN}-massif ${PN}-callgrind \
+"
 RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-gconv-utf-32"
 
 # One of the tests contains a bogus interpreter path on purpose.