summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRandy MacLeod <Randy.MacLeod@windriver.com>2019-05-13 23:57:15 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-15 17:53:29 +0100
commit5ee06716de105456911419fb33031783c3cf8643 (patch)
treeb8006fd25ca7354c60c38f562133680523515572 /meta
parentac087b259e78163863ca35bfe150ee297aa8ff5b (diff)
downloadpoky-5ee06716de105456911419fb33031783c3cf8643.tar.gz
valgrind: adjust test filters and expected output
Skip two filters in filter_xml_frames since they are intended to filter filesystem paths under '/usr' that vary from platform to platform. In the ptest case for Yocto's valgrind, the ptest executables are placed under: /usr/lib/valgrind/ptest and if these frames are filtered out, then several 'drd' tests fail the comparision between expected and actual output. Also adjust the std_list expected output to agree with that produced when the --yocto-ptest option to vg_regtest is used. (From OE-Core rev: 38cc663b69ec96ae1470f040f7dcb05e816deb2e) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch39
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch32
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.15.0.bb2
3 files changed, 73 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
new file mode 100644
index 0000000000..bf0f0ded21
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
@@ -0,0 +1,39 @@
1From d1dea3c2bcf1e22baab39e2c0b8ca59db8a5bc37 Mon Sep 17 00:00:00 2001
2From: Randy MacLeod <Randy.MacLeod@windriver.com>
3Date: Mon, 13 May 2019 17:12:21 -0400
4Subject: [PATCH 1/2] valgrind: filter_xml_frames: do not filter /usr
5
6filter_xml_frames is intended to filter system paths under
7'/usr' that vary from platform to platform. In the ptest case
8for Yocto's valgrind, the ptest executables are placed under:
9 /usr/lib/valgrind/ptest
10and if these frames are filtered out, then the 'drd' tests fail
11the comparision between exepected and actual output.
12
13Changing this filter allows the comparison to succeed without
14any negative impact.
15
16Upstream-Status: Inappropriate [Yocto specific]
17
18Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
19---
20 tests/filter_xml_frames | 3 ++-
21 1 file changed, 2 insertions(+), 1 deletion(-)
22
23diff --git a/tests/filter_xml_frames b/tests/filter_xml_frames
24index f1fa3f070..04fbc82de 100755
25--- a/tests/filter_xml_frames
26+++ b/tests/filter_xml_frames
27@@ -47,7 +47,8 @@ while (my $line = <>)
28 $has_function_name = 1 if ($line =~ /<fn>/);
29 # This may require tweaking; currently /lib and /usr/lib are matched
30 $has_system_obj = 1 if ($line =~ /<obj>\/lib/);
31- $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
32+# for Yocto, skip /usr since tests are under /usr/lib/...
33+# $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
34 }
35 }
36
37--
382.17.0
39
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
new file mode 100644
index 0000000000..a82972ec1b
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
@@ -0,0 +1,32 @@
1From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
2From: Randy MacLeod <Randy.MacLeod@windriver.com>
3Date: Mon, 13 May 2019 17:26:26 -0400
4Subject: [PATCH 2/2] valgrind: adjust std_list expected output
5
6The run-ptest script uses a custom --yocto-ptest option
7to change the summary statistics that valgrind issues
8to a format that matches what ptest-runner expects.
9
10Only this std_list test which checks that strcpy() works
11properly on Ubuntu-12.04 and later is affected by this change.
12It's normal output when called with --yocto-ptest is a blank
13line so adjust the expected output.
14
15Upstream-Status: Inappropriate [Yocto specific]
16
17Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
18---
19 drd/tests/std_list.stderr.exp | 2 --
20 1 file changed, 2 deletions(-)
21
22diff --git a/drd/tests/std_list.stderr.exp b/drd/tests/std_list.stderr.exp
23index 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--
312.17.0
32
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
index 5f95b5a740..4ab2952fde 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
@@ -37,6 +37,8 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
37 file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \ 37 file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
38 file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ 38 file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
39 file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ 39 file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \
40 file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
41 file://0002-valgrind-adjust-std_list-expected-output.patch \
40 " 42 "
41SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" 43SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975"
42SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1" 44SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"