[oe-commits] [openembedded-core] 11/12: valgrind: adjust test filters and expected output

git at git.openembedded.org git at git.openembedded.org
Tue May 14 11:24:59 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit ad54dd540aba541e249248dac3c3de4e648af7d4
Author: Randy MacLeod <Randy.MacLeod at windriver.com>
AuthorDate: Mon May 13 23:57:15 2019 -0400

    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.
    
    Signed-off-by: Randy MacLeod <Randy.MacLeod at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...grind-filter_xml_frames-do-not-filter-usr.patch | 39 ++++++++++++++++++++++
 ...-valgrind-adjust-std_list-expected-output.patch | 32 ++++++++++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.15.0.bb  |  2 ++
 3 files changed, 73 insertions(+)

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 0000000..bf0f0de
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
@@ -0,0 +1,39 @@
+From d1dea3c2bcf1e22baab39e2c0b8ca59db8a5bc37 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod at 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 at 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
+
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 0000000..a82972e
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
@@ -0,0 +1,32 @@
+From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod at 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 at 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
+
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
index 4c5a4b3..8fecdef 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 \
            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"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list