diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-01-27 15:19:07 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-02 16:57:21 +0000 |
commit | 85a0d6102580da2fa90ae06ccff0716fe755a9d0 (patch) | |
tree | dff54caf0549a5ab55edb113dbbab2a930fed457 /meta | |
parent | c404b8895904abdb7b67aeaf854805ab40bc2c45 (diff) | |
download | poky-85a0d6102580da2fa90ae06ccff0716fe755a9d0.tar.gz |
valgrind: fix the remaining ptest failures
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.
(From OE-Core rev: 64bc13f3c9c96584494f0984da5253a306e8a140)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
4 files changed, 55 insertions, 66 deletions
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 new file mode 100644 index 0000000000..d641998d72 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 24 Jan 2020 17:55:39 +0100 | ||
4 | Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths | ||
5 | |||
6 | In oe-core, /tmp is linked to /var/volatile/tmp and | ||
7 | valgrind output changes accordingly | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-core specific] | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | none/tests/fdleak_cmsg.stderr.exp | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/none/tests/fdleak_cmsg.stderr.exp b/none/tests/fdleak_cmsg.stderr.exp | ||
16 | index 6e5a797b9..0ede1ab18 100644 | ||
17 | --- a/none/tests/fdleak_cmsg.stderr.exp | ||
18 | +++ b/none/tests/fdleak_cmsg.stderr.exp | ||
19 | @@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null | ||
20 | |||
21 | |||
22 | FILE DESCRIPTORS: 6 open at exit. | ||
23 | -Open file descriptor ...: /tmp/data2 | ||
24 | +Open file descriptor ...: ... | ||
25 | ... | ||
26 | |||
27 | -Open file descriptor ...: /tmp/data1 | ||
28 | +Open file descriptor ...: ... | ||
29 | ... | ||
30 | |||
31 | Open AF_UNIX socket ...: <unknown> | ||
32 | -- | ||
33 | 2.17.1 | ||
34 | |||
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 deleted file mode 100644 index a82972ec1b..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001 | ||
2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
3 | Date: Mon, 13 May 2019 17:26:26 -0400 | ||
4 | Subject: [PATCH 2/2] valgrind: adjust std_list expected output | ||
5 | |||
6 | The run-ptest script uses a custom --yocto-ptest option | ||
7 | to change the summary statistics that valgrind issues | ||
8 | to a format that matches what ptest-runner expects. | ||
9 | |||
10 | Only this std_list test which checks that strcpy() works | ||
11 | properly on Ubuntu-12.04 and later is affected by this change. | ||
12 | It's normal output when called with --yocto-ptest is a blank | ||
13 | line so adjust the expected output. | ||
14 | |||
15 | Upstream-Status: Inappropriate [Yocto specific] | ||
16 | |||
17 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
18 | --- | ||
19 | drd/tests/std_list.stderr.exp | 2 -- | ||
20 | 1 file changed, 2 deletions(-) | ||
21 | |||
22 | diff --git a/drd/tests/std_list.stderr.exp b/drd/tests/std_list.stderr.exp | ||
23 | index d18786f80..8b1378917 100644 | ||
24 | --- a/drd/tests/std_list.stderr.exp | ||
25 | +++ b/drd/tests/std_list.stderr.exp | ||
26 | @@ -1,3 +1 @@ | ||
27 | |||
28 | - | ||
29 | -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) | ||
30 | -- | ||
31 | 2.17.0 | ||
32 | |||
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 deleted file mode 100644 index 05886c743d..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 10 Jun 2017 01:20:32 -0700 | ||
4 | Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding | ||
5 | offset to it | ||
6 | |||
7 | Fixes | ||
8 | error: invalid use of undefined type 'struct __pthread' | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | drd/tests/pth_detached3.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c | ||
18 | index c02eef1..35d43a6 100644 | ||
19 | --- a/drd/tests/pth_detached3.c | ||
20 | +++ b/drd/tests/pth_detached3.c | ||
21 | @@ -21,7 +21,7 @@ int main(int argc, char** argv) | ||
22 | pthread_detach(thread); | ||
23 | |||
24 | /* Invoke pthread_detach() with an invalid thread ID. */ | ||
25 | - pthread_detach(thread + 8); | ||
26 | + pthread_detach((pthread_t*)(&thread + 8)); | ||
27 | |||
28 | fprintf(stderr, "Finished.\n"); | ||
29 | |||
30 | -- | ||
31 | 2.13.1 | ||
32 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb index 6a3834cfdc..0f86aa44ca 100644 --- a/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +++ b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb | |||
@@ -29,7 +29,6 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | |||
29 | file://0003-correct-include-directive-path-for-config.h.patch \ | 29 | file://0003-correct-include-directive-path-for-config.h.patch \ |
30 | file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \ | 30 | file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \ |
31 | file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \ | 31 | file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \ |
32 | file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \ | ||
33 | file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \ | 32 | file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \ |
34 | file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \ | 33 | file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \ |
35 | file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ | 34 | 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 \ | |||
38 | file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ | 37 | file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ |
39 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ | 38 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ |
40 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ | 39 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ |
41 | file://0002-valgrind-adjust-std_list-expected-output.patch \ | ||
42 | file://0001-adjust-path-filter-for-2-memcheck-tests.patch \ | 40 | file://0001-adjust-path-filter-for-2-memcheck-tests.patch \ |
43 | file://s390x_vec_op_t.patch \ | 41 | file://s390x_vec_op_t.patch \ |
42 | file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ | ||
44 | " | 43 | " |
45 | SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" | 44 | SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" |
46 | SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1" | 45 | SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1" |
@@ -205,4 +204,24 @@ do_install_ptest() { | |||
205 | # handle multilib | 204 | # handle multilib |
206 | sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest | 205 | sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest |
207 | sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest | 206 | sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest |
207 | |||
208 | # This test fails on the host as well, using both 3.15 and git master (as of Jan 24 2020) | ||
209 | # https://bugs.kde.org/show_bug.cgi?id=402833 | ||
210 | rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest | ||
211 | |||
212 | # As the binary isn't stripped or debug-splitted, the source file isn't fetched | ||
213 | # via dwarfsrcfiles either, so it needs to be installed manually. | ||
214 | mkdir -p ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/ | ||
215 | install ${S}/none/tests/tls.c ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/ | ||
208 | } | 216 | } |
217 | |||
218 | # avoid stripping some generated binaries otherwise some of the tests will fail | ||
219 | # run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail | ||
220 | INHIBIT_PACKAGE_STRIP_FILES = "\ | ||
221 | ${PKGD}${PTEST_PATH}/none/tests/tls \ | ||
222 | ${PKGD}${PTEST_PATH}/none/tests/tls.so \ | ||
223 | ${PKGD}${PTEST_PATH}/none/tests/tls2.so \ | ||
224 | ${PKGD}${PTEST_PATH}/helgrind/tests/tc09_bad_unlock \ | ||
225 | ${PKGD}${PTEST_PATH}/memcheck/tests/manuel1 \ | ||
226 | ${PKGD}${PTEST_PATH}/drd/tests/pth_detached3 \ | ||
227 | " | ||