summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind
AgeCommit message (Collapse)Author
2019-09-16valgrind: disable 256 ptests for aarch64Randy MacLeod
On qemuarm64 systems, about half of the valgrind tests fail and often result in defunct processes, eg: root 819 818 25 00:12 pts/0 00:01:52 /usr/bin/valgrind --command-line-only=yes --memcheck:leak-check=no --tool=memcheck -q --track-origins= root 861 420 0 00:13 pts/0 00:00:00 [sh] <defunct> Eventually these processes use so much memory that the out of memory killer runs. Hide the tests that fail as a horrid work-around until the root cause has been resolved since this at least allows the ptest run to complete. This work-around is done in the run-ptest script using a sorted list of tests so that they can be easily restored one by one without a rebuild during testing. With core-image-minimal on qemuarm64: Recipe | Passed | Failed | Skipped | Time(s) valgrind | 333 | 49 | 17 | 7637 Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-16valgrind: ptest improvements to run-ptest and moreRandy MacLeod
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> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-16valgrind: make a few more ptests passRandy MacLeod
Adjust two memcheck vgtest files to deal with relative paths that are in test executables when cross-compiling. Add libgomp to enable OpenMP tests. Add the bz2 executable for memcheck/tests/vcpu_bz2. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-16valgrind: enable ~500 more ptestsRandy MacLeod
Add valgrind's top level config.h to the ptest package since it is used by several scripts to determine which tests to run. Drop the removal of: none/tests/shell, the content was already moved to: none/tests/scripts/shell so the filter useless and the files no longer cause a problem. Add a few more test directories that had been omitted. Add perf/bigcode for test: none/tests/bigcode Leave .c, .h, .S files in the ptest image since several of them are needed to run the tests. The overhead is ~13 MB which is high but keeping all test code is easier than figuring out which source files are needed and the entire valgrind-ptest package is ~115 MB so in this context it's an acceptable trade-off. Add bash dependency for ptest for none/tests/scripts/shell With core-image-minimal on qemux86-64/kvm: Recipe | Passed | Failed | Skipped | Time(s) before | 149 | 1 | 9 | 663 after | 648 | 12 | 60 | 1541 Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-06-27valgrind: Remove dependency on libx11Adrian Bunk
It doesn't seem to be used. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-21valgrind: add 'file' to ptest dependsRandy MacLeod
to avoid: ./run_openmp_test: line 12: /usr/bin/file: No such file or directory SKIP: drd/tests/omp_matinv when using core-image-minimal to run valgrind ptests. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-21valgrind: Make ptest timestamps copaseticRandy MacLeod
Avoid ptest failures due to .diffs such as cachegrind/tests/ann1.post.diff: @ Source file 'a.c' is more recent than input file 'cgout-test'. @ Annotations may not be correct. by using: touch a.c -r cgout-test Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15valgrind: fix call/cachegrind ptestsRandy MacLeod
Use the *_annotate executables from ${bindir} Actually install cachegrind/tests/a.c since it is used by the call/cachegrind/tests/ann[12].vgtest files. With this change and the previous commits, the ptest results on qemux86-64 when invoked with: runqemu qemux86 kvm nographic slirp qemuparams="-m 2048" are: === Test Summary === TOTAL: 159 PASSED: 149 FAILED: 1 SKIPPED: 9 Only drd/tests/pth_detached3 remains to be fixed. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15valgrind: adjust test filters and expected outputRandy MacLeod
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@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15valgrind: update the ptest subdirs listRandy MacLeod
Split the list into one directory per line. Sort the list alphabetically. Add the gdbserver_tests directory to get the 'gone' executable which is needed by: memcheck/tests/gone_abrt_xml.vgtest Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15valgrind: Include debugging symbols in ptestsRichard Purdie
About half the ptests will fail if the executables deployed as part of the ptest package are stripped. We therefore need to add a dependency on the dbg symbols package and silence the QA test which would complain about this since we really do want it in this case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15valgrind: fix vg_regtest return codeRandy MacLeod
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-23valgrind: update from 3.14.0 to 3.15.0Randy MacLeod
The SRC_URI moved. Two local patches are now fixed upstream so remove them. The glibc ptest results are essentially the same. 3.14 3.15 TOTAL: 579 589 PASSED: 297 301 FAILED: 251 254 SKIPPED: 31 34 DURATION: 1312 1171 Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-25valgrind: Mark powerpc64 with musl as incompatibleSerhey Popovych
Building musl for powerpc64 enforces elfv2 ABI since commit 68c964185519 ("arch-powerpc64.inc: Use elfv2 ABI when building with musl") that is not compatible with valgrind. Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-28valgrind: Dont strip off -mcpuKhem Raj
Defsault armtunes do not include -march any longer we habe -mcpu only, therefore to select right ISA we need to keep mcpu Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-03valgrind: Fix a race issue for libcoregrind.aRobert Yang
The libnolto_coregrind_a_OBJECTS is in libcoregrind_a_LIBADD, so the objects should be ready before generate libcoregrind.a, otherwise there would be failures: i586-poky-linux-ar: libnolto_coregrind_x86_linux_a-m_libcsetjmp.o: No such file or directory make[3]: *** [libcoregrind-x86-linux.a] Error 1 Add libnolto_coregrind_a_OBJECTS to EXTRA_libcoregrind_DEPENDENCIES to fix the problem. This is a race issue during parallel build. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-27valgrind: Fix x86_64 build failure with gcc9Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05valgrind: Skip vgpreload_memcheck shared object from strippingKhem Raj
This is a special library for memcheck tool, where it needs to have the symbols intact for the stack traces to work on target, current option is to install valgrind-dbg ( 151 MB uncompressed ) is quite big for some systems which may not have space to install it all. Leaving it unstripped adds about 200KB to image which is much better, this alone gets memcheck working, as an aside we might need same solution for other tools e.g. helgrind etc. when needed, they also have leading libraries installed Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16valgrind: update upstream patch statusRandy MacLeod
Two recent patches are now marked as reported in the valgrind bugzilla. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09valgrind: drop mips n32 supportRandy MacLeod
valgrind for qemumips64 multilib builds fails to configure for libn32 with the error: configure:6190: checking for 32 bit build support ... fatal error: bits/long-double-32.h: No such file or directory It seems that the toolchain is producing: tmp-glibc/sysroots-components/mips64-n32/libn32-glibc/usr/include/bits/long-double-n32.h Until the toolchain problem is resolved, skip valgrind for libn32. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-22valgrind: Make local functions static to avoid assembler errorRandy MacLeod
Avoid mips32 x-compiler warnings such as: | ../../../valgrind-3.14.0/helgrind/tests/annotate_hbefore.c:360:6: warning: no previous prototype for 'do_signal' [-Wmissing-prototypes] | void do_signal ( UWord* w ) | ^~~~~~~~~ by making functions and global variables that are file scope be static and more importantly also avoid an assembler error: /tmp/cce22iiw.s: Assembler messages: /tmp/cce22iiw.s:446: Error: symbol `exit_0' is already defined /tmp/cce22iiw.s:448: Error: symbol `exit' is already defined /tmp/cce22iiw.s:915: Error: symbol `exit_0' is already defined /tmp/cce22iiw.s:917: Error: symbol `exit' is already defined Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-20valgrind: update from 3.13.0 to 3.14.0Randy MacLeod
The removed patches are all upstream. Adjusted two patches due to rebase. Guard against __GLIBC_PREREQ for musl libc Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-30valgrind: fix compile ptest failure on mips32Hongxu Jia
- Pass mips32's CFLAGS to tests - Fix broken inline asm in tests on mips32-linux - Build mips n32 successfully, support it. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13valgrind: fix the shared object issue while prelink ptestZhixiong Chi
If valgrind-ptest is installed, we will get the some prelink error like below at do_image: .../usr/sbin/prelink: /usr/lib64/valgrind/ptest/memcheck/tests/wrap7:\ Could not find one of the dependencies: \ .../usr/sbin//prelink-rtld: error \ while loading shared libraries: wrap7so.so: cannot open shared \ object file: No such file or directory The wrap7 needs to link the shared object in the path /usr/lib64/valgrind/ptest/memcheck/tests, but it fails. So we correct the path for ptest. Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-15valgrind: Fix multilib header conflict - valgrind/config.hZhang Xiao
Header file conflict between 32-bit and 64-bit versions. Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-07valgrind: Mask CPUID support in HWCAP on aarch64Manjukumar Matha
valgrind currently does not know anything about the CPUID flag added to the HWCAP auxv entry in kernel 4.11+ At runtime it will fails like this: ARM64 front end: branch_etc disInstr(arm64): unhandled instruction 0xD5380001 disInstr(arm64): 1101'0101 0011'1000 0000'0000 0000'0001 ==2082== valgrind: Unrecognised instruction at address 0x4014e64. This patch is a workaround by masking all HWCAP. This patch is dervied from https://bugzilla.redhat.com/show_bug.cgi?id=1464211 Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-23valgrind: improvements for run-ptestJackie Huang
* Add statistic summary for run-ptest * Ensure the script can be run anywhere Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-18valgrind: disable build for muslx32sweeaun
Disable build for muslx32.X32 isn't supported by valgrind at this moment. Signed-off-by: sweeaun <swee.aun.khor@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-11valgrind: enable on mips soft-floatAndré Draszik
Valgrind support for mips soft-float hosts has been fixed in the 3.12 [1] and 3.13 [2] releases, so let's start building it on those, too. [1] https://sourceware.org/git/?p=valgrind.git;a=commit;h=8f0070d31daea6f0ed18f8fe69498a67530bfcbb [2] https://sourceware.org/git/?p=valgrind.git;a=commit;h=3172936d63da4b6257099bc05aee5793978269cb Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-25valgrind: fix upstream version checkAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17valgrind: fix ptest compilation for PowerPCRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17valgrind: Update 3.12.0 -> 3.13.0Soren Brinkmann
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17valgrind: fix link failure with goldRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-11valgrind: tests build fixes for muslKhem Raj
x86/aarch64 needed minor changes to make few testcases portable Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06valgrind: Remove -no-pie from cflagsKhem Raj
It has been moved to distro security include file Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06valgrind: Fix build with glibc 2.26Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-16meta: Drop further remnants of uclibc supportRichard Purdie
uclibc support was removed a while ago and musl works much better. Start to remove the various overrides and patches related to uclibc which are no longer needed. uclibc support in a layer would still be possible. I have strong reasons to believe nobody is still using uclibc since patches are missing and I doubt the metadata even parses anymore. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-13valgrind: Fix ptest build with muslKhem Raj
musl unearthed a problem when building out of tree, config.h was being used from $(srcdir) instead of generated config.h in $(builddir) this assumed functions e.g. mallinfo() and more which are not in musl as a result tests broke. Also add fixes to build remaining tests when building on musl pass -fno-pie as it cant use PIE especially in ptests/x86_64 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-10valgrind: Fix arm build with gcc7Khem Raj
Add function to remove -mcpu compiler options on arm Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-08valgrind: set ac_cv_path_PERL to /usr/bin/env perlRobert Yang
The shebang's max length is usually 128 as defined in /usr/include/linux/binfmts.h: #define BINPRM_BUF_SIZE 128 So there would be errors when /path/to/hosttools/perl is longer than 128. Set ac_cv_path_PERL to "/usr/bin/env perl" to fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26valgrind: correct the comparison logic in vg_regtestMaxin B. John
do_diffs in the vg_regtest script compares the actual test output against the expected test output and returns 0 if it matches. Previous upgrade modified the return value of do_diffs() and that resulted in ptest failures. [YOCTO #8471] Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26valgrind: vg_regtest.in: fix perl scriptMaxin B. John
@PERL@ in vg_regtest.in causes recipe specific sysroot based perl to be present in the vg_regtest script, making it unusable in the target. Use /usr/bin/perl instead of @PERL@ to fix it. Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-09valgrind: skip for linux-gnux32Christopher Larson
valgrind doesn't support x32 at this time, so skip it for that host. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16valgrind: make ld-XXX.so strlen intercept optionalJackie Huang
Hack: Depending on how glibc was compiled (e.g. optimised for size or built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found in ld-XXX.so. Therefore although we should still try to intercept it, don't make it mandatory to do so. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-30valgrind: Use MIPS MACHINE_OVERRIDESZubair Lutfullah Kakakhel
The mipsarch* MACHINE_OVERRIDES can be used to pass the same parameters to MIPS pre-R2 and R6 ISA variants. Use them to reduce duplication in supporting MIPS R6 ISA. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-15valgrind: Reduce duplication in MIPS variants.Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES variable is defined Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-06valgrind: update to 3.12.0Alexander Kanavin
Remove backported gcc5-port.patch Remove 11_mips-link-tool.patch as there is nothing in the target file (or the entire source tree) that resembles anything contained in the patch. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-14valgrind: MIPS: Make toolchain basename genericZubair Lutfullah Kakakhel
For the hard float case, COMPATIBLE_HOST should be set to ".*-linux" since OE can support multiple distro layers, not just poky. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-05valgrind: Disable for MIPS Soft FloatZubair Lutfullah Kakakhel
Valgrind doesn't build for MIPS soft float. Disable the build until the package has support for it. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>