diff options
author | Stacy Gaikovaia <Stacy.Gaikovaia@windriver.com> | 2020-09-16 19:23:04 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 09:47:46 +0100 |
commit | 14ccd72b3fb551784069bfce94d294f44cdf240a (patch) | |
tree | bead7c80fc37a6424269e396a6ed73e05e210287 /meta/recipes-devtools/valgrind | |
parent | 4064756e20bb4eff59d53f495b89d16ff479bb4d (diff) | |
download | poky-14ccd72b3fb551784069bfce94d294f44cdf240a.tar.gz |
valgrind: fix memcheck vgtests remove fullpath-after flags
Previously in:
f75792b28e valgrind: make a few more ptests pass
the vagrind test runner was adjusted to suppress part
of a path that only exists when run in the yocto ptest
environment. Unfortunately this change includes the
valgrind version and when valgrind was last updated,
the patch was not changed. Rather than continually updating
the patch or even generating the version dynamically,
we can simply change the expected output for two tests.
The reason the option: --fullpath-after=foo was
introduced into the effected valgrind ptests was to
deal with builds where ccache is used. Compiling with
ccache enabled sometimes causes the source file absolute
name to be found in a full path that is not the same as $PWD.
See commit c80f32e662dfa2a4f046960a25d5b8b7a8821bea in
valgrind for more information about changes to the
arguments that test badfree3 and varinfo5 run with.
There is also a minor fix to add the missing overloading.pm
perl package and put the dependencies in alphabetic order.
(From OE-Core rev: 9c82b9302c6ee84864e9a9cc870729395804e794)
Signed-off-by: Stacy Gaikovaia <Stacy.Gaikovaia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/valgrind')
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/0001-memcheck-vgtests-remove-fullpath-after-flags.patch (renamed from meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch) | 30 | ||||
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind_3.16.1.bb | 16 |
2 files changed, 30 insertions, 16 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-vgtests-remove-fullpath-after-flags.patch index 4bc4bb086c..dce8b52ba3 100644 --- a/meta/recipes-devtools/valgrind/valgrind/0001-adjust-path-filter-for-2-memcheck-tests.patch +++ b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-vgtests-remove-fullpath-after-flags.patch | |||
@@ -1,40 +1,42 @@ | |||
1 | From bf63e35c3036e6040c8cfecabc7160b1f36b0591 Mon Sep 17 00:00:00 2001 | 1 | From 3ff82dcb844f98dbf67c69f11f6516bc234725a9 Mon Sep 17 00:00:00 2001 |
2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | 2 | From: Stacy Gaikovaia <Stacy.Gaikovaia@windriver.com> |
3 | Date: Wed, 28 Aug 2019 12:31:15 -0400 | 3 | Date: Wed, 16 Sep 2020 13:45:07 -0400 |
4 | Subject: [PATCH] adjust path filter for 2 memcheck tests | 4 | Subject: [PATCH] memcheck vgtests remove fullpath-after flags |
5 | 5 | ||
6 | Test executables produced when cross-compiling can contain | 6 | Test executables produced when cross-compiling can contain |
7 | relative paths such as: | 7 | relative paths containing version number, such as: |
8 | coregrind/tests/../../../valgrind-3.15.0/coregrind/ | 8 | coregrind/tests/../../../valgrind-3.16.1/coregrind |
9 | Use the --fullpath-after option to match and therefore | 9 | |
10 | suppress more of the prefix to enable test to pass. | 10 | Remove the --fullpath-after option so yocto project doesn't |
11 | have to upgrade patch every valgrind uprev. Upgrade test stderr | ||
12 | paths in corresponding tests .bb script. | ||
11 | 13 | ||
12 | Upstream-Status: Inappropriate [embedded specific] | 14 | Upstream-Status: Inappropriate [embedded specific] |
13 | 15 | ||
14 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | 16 | Signed-off-by: Stacy Gaikovaia <Stacy.Gaikovaia@windriver.com> |
15 | --- | 17 | --- |
16 | memcheck/tests/badfree3.vgtest | 2 +- | 18 | memcheck/tests/badfree3.vgtest | 2 +- |
17 | memcheck/tests/varinfo5.vgtest | 2 +- | 19 | memcheck/tests/varinfo5.vgtest | 2 +- |
18 | 2 files changed, 2 insertions(+), 2 deletions(-) | 20 | 2 files changed, 2 insertions(+), 2 deletions(-) |
19 | 21 | ||
20 | diff --git a/memcheck/tests/badfree3.vgtest b/memcheck/tests/badfree3.vgtest | 22 | diff --git a/memcheck/tests/badfree3.vgtest b/memcheck/tests/badfree3.vgtest |
21 | index 3dfc5fd8a..57eec21f3 100644 | 23 | index 3dfc5fd8a..4ee03f00a 100644 |
22 | --- a/memcheck/tests/badfree3.vgtest | 24 | --- a/memcheck/tests/badfree3.vgtest |
23 | +++ b/memcheck/tests/badfree3.vgtest | 25 | +++ b/memcheck/tests/badfree3.vgtest |
24 | @@ -1,3 +1,3 @@ | 26 | @@ -1,3 +1,3 @@ |
25 | prog: badfree | 27 | prog: badfree |
26 | -vgopts: -q --fullpath-after=memcheck/ --fullpath-after=coregrind/ | 28 | -vgopts: -q --fullpath-after=memcheck/ --fullpath-after=coregrind/ |
27 | +vgopts: -q --fullpath-after=/valgrind-3.15.0/memcheck/ --fullpath-after=/valgrind-3.15.0/coregrind/ | 29 | +vgopts: -q |
28 | stderr_filter_args: badfree.c | 30 | stderr_filter_args: badfree.c |
29 | diff --git a/memcheck/tests/varinfo5.vgtest b/memcheck/tests/varinfo5.vgtest | 31 | diff --git a/memcheck/tests/varinfo5.vgtest b/memcheck/tests/varinfo5.vgtest |
30 | index 063d00dce..6907bb2f6 100644 | 32 | index 063d00dce..79c4a72a4 100644 |
31 | --- a/memcheck/tests/varinfo5.vgtest | 33 | --- a/memcheck/tests/varinfo5.vgtest |
32 | +++ b/memcheck/tests/varinfo5.vgtest | 34 | +++ b/memcheck/tests/varinfo5.vgtest |
33 | @@ -1,3 +1,3 @@ | 35 | @@ -1,3 +1,3 @@ |
34 | prog: varinfo5 | 36 | prog: varinfo5 |
35 | -vgopts: --fullpath-after=memcheck/ --fullpath-after=coregrind/ --read-var-info=yes --read-inline-info=yes -q | 37 | -vgopts: --fullpath-after=memcheck/ --fullpath-after=coregrind/ --read-var-info=yes --read-inline-info=yes -q |
36 | +vgopts: --fullpath-after=/valgrind-3.15.0/memcheck/ --fullpath-after=/valgrind-3.15.0/coregrind/ --read-var-info=yes --read-inline-info=yes -q | 38 | +vgopts: --read-var-info=yes --read-inline-info=yes -q |
37 | stderr_filter: filter_varinfo3 | 39 | stderr_filter: filter_varinfo3 |
38 | -- | 40 | -- |
39 | 2.22.0 | 41 | 2.25.1 |
40 | 42 | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb b/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb index 484a229a1a..d4ca1a7752 100644 --- a/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb +++ b/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb | |||
@@ -36,7 +36,7 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | |||
36 | file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ | 36 | file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ |
37 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ | 37 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ |
38 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ | 38 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ |
39 | file://0001-adjust-path-filter-for-2-memcheck-tests.patch \ | 39 | file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch \ |
40 | file://s390x_vec_op_t.patch \ | 40 | file://s390x_vec_op_t.patch \ |
41 | file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ | 41 | file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ |
42 | file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ | 42 | file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ |
@@ -47,6 +47,17 @@ UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" | |||
47 | 47 | ||
48 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' | 48 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' |
49 | 49 | ||
50 | # patch 0001-memcheck-vgtests-remove-fullpath-after-flags.patch removes relative path | ||
51 | # argument. Change expected stderr files accordingly. | ||
52 | do_patch_append() { | ||
53 | bb.build.exec_func('do_sed_paths', d) | ||
54 | } | ||
55 | |||
56 | do_sed_paths() { | ||
57 | sed -i -e 's|tests/||' ${S}/memcheck/tests/badfree3.stderr.exp | ||
58 | sed -i -e 's|tests/||' ${S}/memcheck/tests/varinfo5.stderr.exp | ||
59 | } | ||
60 | |||
50 | # valgrind supports armv7 and above | 61 | # valgrind supports armv7 and above |
51 | COMPATIBLE_HOST_armv4 = 'null' | 62 | COMPATIBLE_HOST_armv4 = 'null' |
52 | COMPATIBLE_HOST_armv5 = 'null' | 63 | COMPATIBLE_HOST_armv5 = 'null' |
@@ -118,7 +129,8 @@ RRECOMMENDS_${PN} += "${TCLIBC}-dbg" | |||
118 | RDEPENDS_${PN}-ptest += " bash coreutils file \ | 129 | RDEPENDS_${PN}-ptest += " bash coreutils file \ |
119 | gdb libgomp \ | 130 | gdb libgomp \ |
120 | perl \ | 131 | perl \ |
121 | perl-module-getopt-long perl-module-file-basename perl-module-file-glob \ | 132 | perl-module-file-basename perl-module-file-glob perl-module-getopt-long \ |
133 | perl-module-overloading \ | ||
122 | procps sed ${PN}-dbg ${PN}-src" | 134 | procps sed ${PN}-dbg ${PN}-src" |
123 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" | 135 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" |
124 | 136 | ||