From: Randy MacLeod <Randy.MacLeod@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [v2 3/4] valgrind: ptest improvements to run-ptest and more
Date: Tue, 10 Sep 2019 17:41:35 -0400 [thread overview]
Message-ID: <20190910214136.22971-3-Randy.MacLeod@windriver.com> (raw)
In-Reply-To: <20190910214136.22971-1-Randy.MacLeod@windriver.com>
Make some changes to the run-ptest script:
- after main tests run integrity check like the pkg Makefile.
- aesthetic and ordering changes
Add the .in_place directory and its contents which allows valgrind
to be run in-place thereby enabling the gdbserver_tests to
complete rather than hang. Unfortunately directory paths embedded
in binaries still cause many of these test to fail.
Add the exp-sgcheck tests.
With core-image-minimal on qemux86-64/kvm:
Recipe | Passed | Failed | Skipped | Time(s)
before | 648 | 12 | 60 | 1541
after | 662 | 20 | 38 | 1429
ppc-no-gdbserv | 415 | 196 | 34 | 10689
Since fewer tests timeout, the overall time has decreased.
With core-image-sato on qemux86-64/kvm the results are now
the same as core-image-minimal.
qemuppc/arm64 runs result in the oom-killer eventually running since
some processes do not terminate properly and accumulate as defunct
processes in memory. Without the gdbserver_tests, the tests
complete without defunct process or the oom-killer running for
ppc but not for arm64.
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
.../valgrind/valgrind/run-ptest | 27 ++++++++++---
.../valgrind/valgrind_3.15.0.bb | 38 ++++++++++++-------
2 files changed, 47 insertions(+), 18 deletions(-)
diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest
index 447d33c8cb..5b3ad2a2ed 100755
--- a/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -4,13 +4,30 @@
# wraps the valgrind regression script vg_regtest.
#
# Dave Lerner <dave.lerner@windriver.com>
+# Randy MacLeod <Randy.MacLeod@windriver.com>
###############################################################
-VALGRINDLIB=@libdir@/valgrind
-LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"
+VALGRIND_LIB=@libdir@/valgrind
+VALGRIND_BIN=@bindir@/valgrind
-cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \
- --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \
- --yocto-ptest 2>&1|tee ${LOG}
+LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"
+
+TOOLS="memcheck cachegrind callgrind helgrind drd massif dhat lackey none"
+EXP_TOOLS="exp-bbv exp-dhat exp-sgcheck"
+
+GDB_BIN=@bindir@/gdb
+cd ${VALGRIND_LIB}/ptest && ./gdbserver_tests/make_local_links ${GDB_BIN}
+
+cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \
+ --valgrind=${VALGRIND_BIN} \
+ --valgrind-lib=${VALGRIND_LIB} \
+ --yocto-ptest \
+ gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
+ 2>&1|tee ${LOG}
+
+cd ${VALGRIND_LIB}/ptest && \
+ ./tests/post_regtest_checks $(pwd) \
+ gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
+ 2>&1|tee -a ${LOG}
passed=`grep PASS: ${LOG}|wc -l`
failed=`grep FAIL: ${LOG}|wc -l`
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
index bf0ca57c93..6d47b6d01d 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
@@ -110,7 +110,11 @@ RDEPENDS_${PN} += "perl"
# redirect functions like strlen.
RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-RDEPENDS_${PN}-ptest += " bash file libgomp perl perl-module-file-glob procps sed ${PN}-dbg"
+RDEPENDS_${PN}-ptest += " bash coreutils file \
+ gdb libgomp \
+ perl \
+ perl-module-getopt-long perl-module-file-basename perl-module-file-glob \
+ procps sed ${PN}-dbg"
RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
# One of the tests contains a bogus interpreter path on purpose.
@@ -136,12 +140,11 @@ do_install_ptest() {
cd $parent_dir
subdirs=" \
+ .in_place \
cachegrind/tests \
callgrind/tests \
dhat/tests \
drd/tests \
- exp-bbv/tests \
- exp-dhat/tests \
gdbserver_tests \
helgrind/tests \
lackey/tests \
@@ -149,6 +152,9 @@ do_install_ptest() {
memcheck/tests \
none/tests \
tests \
+ exp-bbv/tests \
+ exp-dhat/tests \
+ exp-sgcheck/tests \
"
# Get the vg test scripts, filters, and expected files
for dir in $subdirs ; do
@@ -156,16 +162,24 @@ do_install_ptest() {
done
cd $saved_dir
done
+
+ # The scripts reference config.h so add it to the top ptest dir.
cp ${B}/config.h ${D}${PTEST_PATH}
+
+ # Add an executable need by none/tests/bigcode
mkdir ${D}${PTEST_PATH}/perf
cp ${B}/perf/bigcode ${D}${PTEST_PATH}/perf
- # needed by memcheck/tests/vcpu_bz2
+
+ # Add an executable needed by memcheck/tests/vcpu_bz2
cp ${B}/perf/bz2 ${D}${PTEST_PATH}/perf
- # Hide then restore a.c that is used by ann[12].vgtest in call/cachegrind
- mv ${D}${PTEST_PATH}/cachegrind/tests/a.c ${D}${PTEST_PATH}/cachegrind/tests/a_c
- # clean out build artifacts before building the package. Keep config.h for ptests.
- mv ${D}${PTEST_PATH}/config.h ${D}${PTEST_PATH}/config_h
+ # Make the ptest dir look like the top level valgrind src dir
+ # This is checked by the gdbserver_tests/make_local_links script
+ mkdir ${D}${PTEST_PATH}/coregrind
+ cp ${B}/coregrind/vgdb ${D}${PTEST_PATH}/coregrind
+
+ # Add an executable needed by massif tests
+ cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
find ${D}${PTEST_PATH} \
\( \
@@ -173,9 +187,9 @@ do_install_ptest() {
-o -name "*.o" \
\) \
-exec rm {} \;
- mv ${D}${PTEST_PATH}/cachegrind/tests/a_c ${D}${PTEST_PATH}/cachegrind/tests/a.c
+
+ # These files need to be newer so touch them.
touch ${D}${PTEST_PATH}/cachegrind/tests/a.c -r ${D}${PTEST_PATH}/cachegrind/tests/cgout-test
- mv ${D}${PTEST_PATH}/config_h ${D}${PTEST_PATH}/config.h
# find *_annotate in ${bindir} for yocto build
sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann1.vgtest
@@ -184,9 +198,7 @@ do_install_ptest() {
sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest
sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest
- # needed by massif tests
- cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
-
# handle multilib
sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
+ sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest
}
--
2.22.0
next prev parent reply other threads:[~2019-09-10 21:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 21:41 [v2 1/4] valgrind: enable ~500 more ptests Randy MacLeod
2019-09-10 21:41 ` [v2 2/4] valgrind: make a few more ptests pass Randy MacLeod
2019-09-10 21:41 ` Randy MacLeod [this message]
2019-09-10 21:41 ` [v2 4/4] valgrind: disable 256 ptests for aarch64 Randy MacLeod
2019-09-11 12:32 ` Adrian Bunk
2019-09-11 13:38 ` Randy MacLeod
2019-09-11 14:00 ` Adrian Bunk
2019-09-11 18:01 ` Randy MacLeod
2019-09-12 8:13 ` Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190910214136.22971-3-Randy.MacLeod@windriver.com \
--to=randy.macleod@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.