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>
This commit is contained in:
Randy MacLeod
2019-05-13 23:57:15 -04:00
committed by Richard Purdie
parent ac087b259e
commit 5ee06716de
3 changed files with 73 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
From d1dea3c2bcf1e22baab39e2c0b8ca59db8a5bc37 Mon Sep 17 00:00:00 2001
From: Randy MacLeod <Randy.MacLeod@windriver.com>
Date: Mon, 13 May 2019 17:12:21 -0400
Subject: [PATCH 1/2] valgrind: filter_xml_frames: do not filter /usr
filter_xml_frames is intended to filter system 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 the 'drd' tests fail
the comparision between exepected and actual output.
Changing this filter allows the comparison to succeed without
any negative impact.
Upstream-Status: Inappropriate [Yocto specific]
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
tests/filter_xml_frames | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/filter_xml_frames b/tests/filter_xml_frames
index f1fa3f070..04fbc82de 100755
--- a/tests/filter_xml_frames
+++ b/tests/filter_xml_frames
@@ -47,7 +47,8 @@ while (my $line = <>)
$has_function_name = 1 if ($line =~ /<fn>/);
# This may require tweaking; currently /lib and /usr/lib are matched
$has_system_obj = 1 if ($line =~ /<obj>\/lib/);
- $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
+# for Yocto, skip /usr since tests are under /usr/lib/...
+# $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
}
}
--
2.17.0

View File

@@ -0,0 +1,32 @@
From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
From: Randy MacLeod <Randy.MacLeod@windriver.com>
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 <Randy.MacLeod@windriver.com>
---
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

View File

@@ -37,6 +37,8 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
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 \
"
SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975"
SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"