Commit Graph

202 Commits

Author SHA1 Message Date
Randy MacLeod
afee84f8d3 valgrind: Upgrade from 3.25.0 to 3.25.1
The following bugs have been fixed or resolved in this point release:

503098  Incorrect NAN-boxing for float registers in RISC-V
503641  close_range syscalls started failing with 3.25.0
503914  mount syscall param filesystemtype may be NULL
504177  FILE DESCRIPTORS banner shows when closing some inherited fds
504265  FreeBSD: missing syscall wrappers for fchroot and setcred
504466  Double close causes SEGV

To see details of a given bug, visit
  https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed above.

(From OE-Core rev: 582e832634d5f1fa4ff9c89d095c10eaffcb3582)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-22 14:36:49 +01:00
Khem Raj
86bfb2e806 valgrind: Fix build with clang
(From OE-Core rev: fbf60d5077bcf37df96b7b6358db8c30e073a656)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-15 10:55:26 +01:00
Randy MacLeod
75a7b04641 valgrind: Upgrade from 3.24.0 to 3.25.0
Declare riscv64 as a COMPATIBLE_HOST since upstream now support it.
For that target 'valgrind /bin/ls' warns with:
   --253-- WARNING: unhandled riscv64-linux syscall: 258
   --253-- You may be able to write your own handler.
   --253-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
   --253-- Nevertheless we consider this a bug.  Please report
   --253-- it at http://valgrind.org/support/bug_reports.html.
This is a known issue:
   https://bugs.kde.org/show_bug.cgi?id=503253
but the tool does work, despite this warning with glibc.
For riscv64 with musl, the build is fine but running:
   # valgrind /bin/ls
produces the fatal error:
   ==306== Process terminating with default action of signal 4 (SIGILL)
   ==306==  Illegal opcode at address 0x1002015952
   ==306==    at 0x40E5F26: map_library (dynlink.c:845)
   ==306==    by 0x40E6C97: load_library (dynlink.c:1183)
   ==306==    by 0x40E7B63: load_preload (dynlink.c:1365)
   ==306==    by 0x40E7B63: __dls3 (dynlink.c:1963)
   ==306==    by 0x40E75D9: __dls2 (dynlink.c:1767)
   ==306==    by 0xFFFFFFFFFFFFFFFF: ???
which is not yet reported.

Patches reviewed, manually fix-up one word change in:
   0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
and refresh patches with devtool.

* ==================== CORE CHANGES ===================

* The valgrind gdbserver now supports the GDB remote protocol packet
  'x addr,len' (available in GDB release >= 16).
  The x packet can reduce the time taken by GDB to read memory from valgrind.

* Valgrind now supports zstd compressed debug sections.

* The Linux Test Project (ltp) is integrated in the testsuite try
  'make ltpchecks' (this will take a while and will point out various
  missing syscalls and valgrind crashes!)

* ================== PLATFORM CHANGES =================

* Added RISCV64 support for Linux. Specifically for the RV64GC
  instruction set.

* Numerous bug fixes for Illumos, in particular fixed a Valgrind crash
  whenever a signal handler was called.

* On FreeBSD, a change to the libc code that runs atexit handlers was
  causing Helgrind to produce an extra error about exiting threads
  still holding locks for. This applied to every multithreaded application.
  The extra error is now filtered out. A syscall wrapper had been added
  for getrlimitusage.

* On Linux various new syscalls are supported (landlock*, io_pgetevents,
  open_tree, move_mount, fsopen, fsconfig, fsmount, fspick, userfaultfd).

* s390x has support for various new instructions (BPP, BPRP, PPA and NIAI).

* ==================== TOOL CHANGES ===================

* The --track-fds=yes and --track-fds=all options now treat all
  inherited file descriptors the same as 0, 1, 2 (stdin/out/err).
  And when the stdin/out/err descriptors are reassigned they are
  now treated as normal (non-inherited) file descriptors.

* A new option --modify-fds=high can be used together with
  --track-fds=yes to create new file descriptors with the highest
  possible number (and then decreasing) instead of always using the
  lowest possible number (which is required by POSIX). This will help
  catch issues where a file descriptor number might normally be reused
  between a close and another open call.

* Helgrind:
  There is a change to warnings about calls to pthread_cond_signal and
  pthread_cond_broadcast when the associated mutex is unlocked. Previously
  Helgrind would always warn about this. Now this error is controlled by
  a command line option, --check-cond-signal-mutex=yes|no. The default is
  no. This change has been made because some C and C++ standard libraries
  use pthread_cond_signal/pthread_cond_broadcast in this way. Users are
  obliged to use suppressions if they wish to avoid this noise.

The full 3.25.0 bug fix list can be found here:
   https://valgrind.org/docs/manual/dist.news.html

(From OE-Core rev: 04b3e0c1384469167ddfb4d22e2b513f9a59aca9)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-01 14:22:54 +01:00
Randy MacLeod
2b62eb2c58 valgrind: disable ptests
The valgrind test runner, vg_regtest, changed in the 3.24 update and
there are some additional valgrind ptest regressions happening with glibc-2.41.
Disable the ptests for now. Some of the remaining patches can likely
be dropped but I'd rather carry them so that re-enabling the ptests
is simpler. Also the patch series have some dependencies and unwinding
that would block the glibc-2.41 unnecessarily.

This builds for glibc, musl for qemux86-64, runs:
-> valgrind [--leak-check=full] /bin/ls /tmp

(From OE-Core rev: 8fc31fb235af12530475ec5055f6c00ccfafadfa)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-05 12:49:56 +00:00
Alexander Kanavin
619c5c1185 valgrind: update 3.23.0 -> 3.24.0 (ptest fails, vg_regtest needs rebase)
(From OE-Core rev: 6bf1cd3353c36e12000159e67f3d9212b0cbaf1f)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-05 12:49:56 +00:00
Richard Purdie
1cf0974ad2 bitbake.conf: Further cleanup compiler optimization flags
Move the -pipe option out of the optimization flags and directly into
the flags variables since we always use it now.

Also move the debug prefix mapping there to match the nativesdk case
which already does this.

Fix the documentation and two recipe usages to match the change.

(From OE-Core rev: 9badf68d78d995f7d5d4cf27e045f029fc6d4044)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-13 23:28:30 +01:00
Richard Purdie
71c6db8e65 recipes: Start WORKDIR -> UNPACKDIR transition
Replace references of WORKDIR with UNPACKDIR where it makes sense to do
so in preparation for changing the default value of UNPACKDIR.

(From OE-Core rev: 1f18b9a512800860d5153d89eb82b56388efad6f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21 12:08:04 +01:00
Khem Raj
b7a9250590 valgrind: Upgrade to 3.23.0
Drop backports already available in this release

This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux,
PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux,
MIPS64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android,
X86/Solaris, AMD64/Solaris, AMD64/MacOSX 10.12, X86/FreeBSD, AMD64/FreeBSD
and ARM64/FreeBSD  There is also preliminary support for X86/macOS 10.13,
AMD64/macOS 10.13 and nanoMIPS/Linux.

* ==================== CORE CHANGES ===================

* --track-fds=yes will now also warn about double closing of file
  descriptors. Printing the context where the file descriptor was
  originally opened and where it was previously closed.

* --track-fds=yes also produces "real" errors now which can be
  suppressed and work with --error-exitcode. When combined with
  --xml the xml-output now also includes FdBadClose and FdNotClosed
  error kinds (see docs/internals/xml-output-protocol5.txt).

* The option --show-error-list=no|yes now accepts a new value all.
  This indicates to also print the suppressed errors.
  This is useful to analyse which errors are suppressed by which
  suppression entries.
  The valgrind monitor command 'v.info all_errors' similarly now
  accepts a new optional argument 'also_suppressed' to show
  all errors including the suppressed errors.

* ================== PLATFORM CHANGES =================

* Added ARM64 support for FreeBSD.

* ARM64 now supports dotprod instructions (sdot/udot).

* AMD64 better supports code build with -march=x86-64-v3.
  fused-multiple-add instructions (fma) are now emulated more
  accurately. And memcheck now handles __builtin_strcmp using 128/256
  bit vectors with sse4.1, avx/avx2.

* S390X added support for NNPA (neural network processing assist)
  facility vector instructions VCNF, VCLFNH, VCFN, VCLFNL, VCRNF and
  NNPA (z16/arch14).

* X86 recognizes new binutils-2.42 nop patterns.

* ==================== TOOL CHANGES ===================

* The none tool now also supports xml output.

* ==================== FIXED BUGS ====================

The following bugs have been fixed or resolved.  Note that "n-i-bz"
stands for "not in bugzilla" -- that is, a bug that was reported to us
but never got a bugzilla entry.  We encourage you to file bugs in
bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather
than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.

283429  ARM leak checking needs CLEAR_CALLER_SAVED_REGS
281059  Cannot connect to Oracle using valgrind
328563  make track-fds support xml output
362680  --error-exitcode not honored when file descriptor leaks are found
369723  __builtin_longjmp not supported in clang/llvm on Android arm64 target
390269  unhandled amd64-darwin syscall: unix:464 (openat_nocancel)
401284  False positive "Source and destination overlap in strncat"
428364  Signals inside io_uring_enter not handled
437790  valgrind reports "Conditional jump or move depends on uninitialised
        value" in memchr of macOS 10.12-10.15
460616  disInstr(arm64): unhandled instruction 0x4E819402 (dotprod/ASIMDDP)
463458  memcheck/tests/vcpu_fnfns fails when glibc is built for x86-64-v3
463463  none/tests/amd64/fma fails when executed on a x86-64-v3 system
466762  Add redirs for C23 free_sized() and free_aligned_sized()
466884  Missing writev uninit padding suppression for _XSend
471036  disInstr_AMD64: disInstr miscalculated next %rip on RORX imm8, m32/64, r32/6
471222  support tracking of file descriptors being double closed
474160  If errors-for-leak-kinds is specified, exit-on-first-error should only exit
        on one of the listed errors.
475498  Add reallocarray wrapper
476025  Vbit expected test results for Iop_CmpGT64Ux2 are wrong
476320  Build failure with GCC
476331  clean up generated/distributed filter scripts
476535  Difference in allocation size for massif/tests/overloaded-new between
        clang++/libc++ and g++/libstdc++
476548  valgrind 3.22.0 fails on assertion when loading debuginfo file
        produced by mold
476708  valgrind-monitor.py regular expressions should use raw strings
476780  Extend strlcat and strlcpy wrappers to GNU libc
476787  Build of Valgrind 3.21.0 fails when SOLARIS_PT_SUNDWTRACE_THRP is
        defined
476887  WARNING: unhandled amd64-freebsd syscall: 578
477198  Add fchmodat2 syscall on linux
477628  Add mremap support for Solaris
477630  Include ucontext.h rather than sys/ucontext.h in Solaris sources
477719  vgdb incorrectly replies to qRcmd packet
478211  Redundant code for vgdb.c and Valgrind core tools
478624  Valgrind incompatibility with binutils-2.42 on x86 with new nop patterns
        (unhandled instruction bytes: 0x2E 0x8D 0xB4 0x26
478837  valgrind fails to read debug info for rust binaries
479041  Executables without RW sections do not trigger debuginfo reading
480052  WARNING: unhandled amd64-freebsd syscall: 580
480126  Build failure on Raspberry Pi 5 / OS 6.1.0-rpi7-rpi-v8
480405  valgrind 3.22.0 "m_debuginfo/image.c:586 (set_CEnt):
        Assertion '!sr_isError(sr)' failed."
480488  Add support for FreeBSD 13.3
480706  Unhandled syscall 325 (mlock2)
481127  amd64: Implement VFMADD213 for Iop_MAddF32
481131  [PATCH] x86 regtest: fix clobber lists in generated asm statements
481676  Build failure on Raspberry Pi 5 Ubuntu 23.10 with clang
481874  Add arm64 support for FreeBSD
483786  Incorrect parameter indexing in FreeBSD clock_nanosleep syscall wrapper
484002  Add suppression for invalid read in glibc's __wcpncpy_avx2() via wcsxfrm()
484426  aarch64: 0.5 gets rounded to 0
484480  False positives when using sem_trywait
484935  [patch] Valgrind reports false "Conditional jump or move depends on
        uninitialised value" errors for aarch64 signal handlers
485148  vfmadd213ss instruction is instrumented incorrectly (the remaining
        part of the register is cleared instead of kept unmodified)
485487  glibc built with -march=x86-64-v3 does not work due to ld.so strcmp
485778  Crash with --track-fds=all and --gen-suppressions=all
n-i-bz  Add redirect for memccpy

To see details of a given bug, visit
  https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed above.

(From OE-Core rev: faf48ef489ef3c4d0b2ee3a6aa9ef8911523db90)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-15 16:39:19 +01:00
Khem Raj
b7df5bd45d valgrind: Backport fixes from 3.22 branch
These fixes are helping some ptests on musl and 6.6 kernel

(From OE-Core rev: 151dfe7a7bb21cda213ae539f40d17008ad6ff3e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30 22:22:19 +00:00
Randy MacLeod
329bd0cfa9 valgrind: skip intermittently failing ptests
Skip a few additional ptests that fail occasionally on the Yocto
autobuilder and remove those added to the remove-for-all list
if they were already in the remove-for-aarch64 list.

=== Test Summary ===
TOTAL: 774
PASSED: 755
FAILED: 0
SKIPPED: 19

(From OE-Core rev: bbe97f6688683ebfe77543eacf8a8a0f3c614545)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 17:27:51 +00:00
Randy MacLeod
29c9b86162 valgrind: Skip 22 arm64 ptests
With the 3.22 upgrade 21 additional tests fail on qemuarm64.
Skip them until the problems are resolved. Tracked by:
   https://bugzilla.yoctoproject.org/show_bug.cgi?id=15399

(From OE-Core rev: 2fe9097c8c3944ab89d12fd29bcd0fc2d0d195e3)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15 21:30:14 +00:00
Randy MacLeod
00c328db4d valgrind: skip 14 ptests in 3.22
Sort the ptest depenencies into a somewhat alpahbetical order.
Add python3-compile for ptests.

Add softlinks for cachegrind to eliminate a warning seen in those tests.

The folowing tests fail after the 3.22 update:
   memcheck/tests/linux/dlclose_leak-no-keep
   memcheck/tests/linux/dlclose_leak
   memcheck/tests/wrap1
   memcheck/tests/wrap2
   ...
   memcheck/tests/wrap8
   cachegrind/tests/wrap5
   massif/tests/bug469146
   massif/tests/new-cpp
   massif/tests/overloaded-new

Omit these tests until they are fixed.
Tracked by: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15399

=== Test Summary ===
TOTAL: 778
PASSED: 759
FAILED: 0
SKIPPED: 19

(From OE-Core rev: 8203bfac493226c26f0d6db0f653868605433b6f)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15 21:30:14 +00:00
Randy MacLeod
04625c92a1 valgrind: update from 3.21.0 to 3.22.0
Full release notes: https://valgrind.org/docs/manual/dist.news.html

In summary, there is a new configure option: --with-gdbscripts-dir
that lets you install the gdb valgrind python monitor scripts in a specific location.
It's not used in the valgrind recipe yet. Also, there were a few Memcheck and Cachegrind
improvements made and many bugs fixed.

The update required removing the patch:
   0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch
as it's dealt with by these commits:
   f7e4bb4af Bug 382034 - Testcases build fixes for musl
   306232d40 musl: another fix for building testcases
as described on: https://bugs.kde.org/show_bug.cgi?id=382034

Drop: 002-context-APIs-are-not-available-on-musl.patch
since this is handled in a different way by the following
upstream commits:
   c9e88f345 configure, drd: Only build the swapcontext test if swapcontext() is available
   7cd4d7816 memcheck/tests/linux/stack_changes: Only run this test if setcontext() is available
And the that tracked the error:
   https://bugs.kde.org/show_bug.cgi?id=434775
is closed.
No regression in musl qemux86-64/kvm ptest results.

Drop: 0001-fix-opcode-not-supported-on-mips32-linux.patch
The resolved (works for me) upstream defect rejected this patch:
   https://bugs.kde.org/show_bug.cgi?id=396905
and suggested using CFLAGS="-mips32". With this patch dropped, the
qemumips build succeeds perhaps due to using -march=mips32r2

Drop: 0001-Make-local-functions-static-to-avoid-assembler-error.patch
since this was fixed upstream by commit:
   d6da48fe5 mips: use local labels for do_acasW()
Confirmed with:
   MACHINE=qemumips TCLIBC=musl bitbake valgrind

Ptest Resutls for qemux86-64/kvm

glibc:
=== Test Summary ===
TOTAL: 792
PASSED: 759
FAILED: 14
SKIPPED: 19

musl:
=== Test Summary ===
TOTAL: 792
PASSED: 559
FAILED: 211
SKIPPED: 22

(From OE-Core rev: a04c7714e9f69b7a3fc36adecf7e55c0fcfaa891)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15 21:30:14 +00:00
Randy MacLeod
b1aaadb828 valgrind: make ptest depend on all components
When the helper scripts were split into separate packages, they
weren't added as ptest dependencies. Fix that.

(From OE-Core rev: 81c15142889ccb6cc2f2a00e7cdb92bcb36ca12c)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15 21:30:14 +00:00
Martin Jansa
2b7e37b18c valgrind: drop PE, PR from /usr/src/debug paths
(From OE-Core rev: cdfb7de5152fc6b8c785fb513393e566bef95288)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-20 15:30:53 +00:00
Rasmus Villemoes
8ea375589d valgrind: split helper scripts to separate packages, update dependencies
The cachegrind scripts have been rewritten in python3, so the RDEPENDS
on perl is no longer sufficient. This is unfortunately not caught by
QA checks since the scripts use

  #! /usr/bin/env python3

as shebang line.

Since the valgrind binary by itself can be quite useful on target,
allow including that in the rootfs without also having to pull in the
whole perl and python interpreters and stdlibs.

(From OE-Core rev: 9797adebd1296f0cf08b1f6f6322fbc804aee14a)

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-05 08:44:06 +00:00
Alexander Kanavin
f18e1d2c6a valgrind: update 3.20.0 -> 3.21.0
Drop patches merged upstream.

(From OE-Core rev: 3c4d78d8a1d5eca91bee66fd815c80eb0889ce81)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-25 10:29:09 +01:00
Richard Purdie
2d0e3dd7de valgrind: Add missing utf-32 gconv dependency for ptests
Some of the ptests fail in a minimal image. Add the missing gconv
dependency needed to allow those tests to pass.

(From OE-Core rev: c79bd575cfaeec4b87554ccff72b804248c509a7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-12 23:39:13 +00:00
Randy MacLeod
7c023a2f7c valgrind: Disable drd/tests/bar_bad ptest
This is failing intermettently in the YP autobuilder
so disable it until we can fix the root cause.

[YOCTO #14311]

(From OE-Core rev: 77d06aa41c40f8d78903cc499b3f6906a084699e)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-11 00:08:41 +00:00
Richard Purdie
c00e3de18f valgrind: Workaround glibc upgrade
The glibc upgrade regresses one of the valgrind tests. Disable it
until we can resolve that.

(From OE-Core rev: 6c979f3941d047670e3ce1c86815b12706254d50)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-05 20:47:30 +00:00
Khem Raj
3e854407bb valgrind: Include missing <cstdint>
(From OE-Core rev: 01698350086cce9ca21cd31f615a6eb49fabe6dc)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-28 00:07:08 +00:00
Alexander Kanavin
aab77c7aec valgrind: disable tests that started failing after switching to x86-64-v3 target
(From OE-Core rev: 15f2b1f5295474d05f7af93d3d1009bb547dee35)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-06 12:03:46 +00:00
Randy MacLeod
bea2896a2e valgrind: skip the boost_thread test on arm
This test is failing on the arm workers only so skip there until the issue
can be worked on and resolved. The bug #14311 will remain open for tracking.

(From OE-Core rev: d98deec9e4aed9e05343d2758f3a3892e2044616)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-22 23:06:29 +00:00
Qiu, Zheng
f041d18d50 valgrind: remove most hidden tests for arm64
An earlier version of valgrind fixed the defunct processes bug, so those
tests that were skipped specifically for arm can pass now in master,
kirkstone, honister, hardknott, and dunfell.

Detailed test result with remove-for-aarch64 skipped on qemuarm64:

    Commit           Pass   Fail    Skip
    master           624    9       21
    kirkstone        618    10      20
    honister         616    10      19
    hardknott        609    13      18
    dunfell          598    16      17
    zeus             Out of memory: Killed (with many defunct processes)

There are now only 12 skipped by remove-for-aarch64 because 9 fail on
qemuarm64 and 3 more fail on raspberry pi. These are tracked by:
    https://bugzilla.yoctoproject.org/show_bug.cgi?id=14960

(From OE-Core rev: cbeb9418c43ec834868aa65b774dc09e983d26d9)

Signed-off-by: Zheng Qiu <zheng.qiu@windriver.com>
Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-27 23:54:51 +00:00
Qiu, Zheng
482c493cf6 valgrind: update to 3.20.0
Changes in this update includes:
* The option "--vgdb-stop-at=event1,event2,..." accepts the new value
  abexit. This indicates to invoke gdbserver when your program exits
  abnormally (i.e. with a non zero exit code).
* Fix Rust v0 name demangling.
* The Linux rseq syscall is now implemented as (silently) returning
  ENOSYS.
* Add FreeBSD syscall wrappers for __specialfd and __realpathat.
* Remove FreeBSD dependencies on COMPAT10, which fixes compatibility
  with HardenedBSD
* The option --enable-debuginfod=<no|yes> [default: yes] has been added
  on Linux.
* More DWARF5 support as generated by clang14.

Drop the patch 0001-Fix-drd-tests-shared_timed_mutex.cpp.patch which was
merged upstream.

ptest result:
System   Pass  Fail  Skip
x86-64   717   0     20

(From OE-Core rev: 51e3d2ecef6a031105c04eb730580c17411eaf46)

Signed-off-by: Zheng Qiu <zheng.qiu@windriver.com>
Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-03 07:46:47 +00:00
Alexander Kanavin
f1573c80d4 valgrind: (re)send ppc instructions patch upstream
(From OE-Core rev: 8d2e0bf9b13496ec5a8da546afa045cf49938a1d)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-02 15:58:25 +01:00
Richard Purdie
5edbe597fe valgrind: Update to match debug file layout changes
Update the recpie to match the recent debug files layout change.

(From OE-Core rev: 7d191fc547a817f453496f2f48901ff384e34875)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-17 19:57:32 +01:00
Richard Purdie
ad5936fba6 valgrind: Disable drd/tests/std_thread2 ptest
After improvements to debug sources handling I suspect that extra debug
information became available and is confusing this test. Disable it
for now until someone with more knowledge can resolve the issue.

(From OE-Core rev: 2d52b590f4f254ba6ff310af1f68780a0f329673)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-17 19:57:32 +01:00
niko.mauno@vaisala.com
3704b527ee valgrind: Drop redundant oe_runmake parameter
PARALLEL_MAKE is now honored in ptest.bbclass, so drop redundant
parameter from oe_runmake call.

(From OE-Core rev: 1e351aef06acd383bb5a57a6e0b8a23370d22152)

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-25 00:06:08 +01:00
Alexander Kanavin
b400e67593 valgrind: submit arm patches upstream
(From OE-Core rev: 118a68bbe8c87eac77e87db409ce419749b211bb)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-27 23:50:47 +01:00
Alexander Kanavin
d88d5c978d valgrind: update 3.18.1 -> 3.19.0
Dropped patches are either backports, were merged upstream,
or upstream fixed the issue differently.

(From OE-Core rev: 4c9b619eb7cd91e7ffc8db0f5571a4dbe6966ccc)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-28 11:51:42 +01:00
Richard Purdie
b0130fcf91 meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers
An automated conversion using scripts/contrib/convert-spdx-licenses.py to
convert to use the standard SPDX license identifiers. Two recipes in meta-selftest
were not converted as they're that way specifically for testing. A change in
linux-firmware was also skipped and may need a more manual tweak.

(From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Khem Raj
f1af0c1f97 valgrind: Avoid accessing network in ptest task
Avoid calling docs validation and manpages validation to avoid it

(From OE-Core rev: 4ad8059ae0769285c7b837a62e1b76fbeef4c505)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-15 16:23:24 +00:00
Randy MacLeod
50d144b655 valgrind: make run-ptest better
There were warnings about non-existent files when there was
a duplicate in the remove-for-aarch list and the non-deterministic lists
so check if the files still exists before trying to deal with it.

Also restore the tests in the opposite order that they were hidden.

(From OE-Core rev: 2e1dc5782dcb879410d535f937c633edea484d11)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-04 23:14:05 +00:00
Randy MacLeod
521094d569 valgrind: skip boost_thread for aarch64 ptests
The drd/tests/boost_thread test passes when run interactively on qemuarm64
but fails for most runs when run in qemu on an arm worker such as ubuntu1804-arm-1
from the Yocto autobuilder cluster. Skip the test until we fix the problem.

(From OE-Core rev: 9a36983f9681f215aa2f59bfcb16343fe0a819cd)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-04 23:14:05 +00:00
Randy MacLeod
54b87f2a68 valgrind: remove duplicate and skipped tests from remove-for-aarch64
The valgrind ptest script warns about tests such as:
   mv: cannot stat 'drd/tests/bar_bad_xml.vgtest': No such file or directory

Since these tests were either in both remove-for-* lists or
were not installed since they fail everywhere as noted in:
   85a0d61025 valgrind: fix the remaining ptest failures
   984ffe3ab4 valgrind: Disable leak_cpp_interior test
remove them from the remove-for-aarch64 list

(From OE-Core rev: 9492cdc43b830ebf0d02ccaae342f33c826d8a01)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-04 23:14:05 +00:00
Randy MacLeod
b4c2b4df01 valgrind: backport rseq work-around
Using glibc-2.35-alpha, valgrind ptests mostly all fail with the error:
   WARNING: unhandled amd64-linux syscall: 334
   You may be able to write your own handler.
With this patch applied qemux86-64 ptest results were:
   TOTAL: 728
   PASSED: 709
   FAILED: 0
   SKIPPED: 19

This patch implements the Linux rseq syscall as ENOSYS while
a proper fix is being worked on as desribed in the patch
commit log.

(From OE-Core rev: 6ca008072df0371b6b1cfdd7030da6494ff012bd)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-04 23:14:05 +00:00
Randy MacLeod
b93a99b973 valgrind: Add util-linux-taskset ptest dependency
We are using taskset to improve the reproducability of tests listed in:
   meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests
so we need to have the ptests depend on util-linux-taskset.

(From OE-Core rev: aa06250cc4e258ad807eef9940939fd68c0bda8b)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-04 23:14:05 +00:00
Alexander Kanavin
6778f069ca valgrind: remove unneeded patch
Whatever the issues were all those years ago,
current valgrind builds ok on qemux86_64 and qemuppc.

(From OE-Core rev: 4691b0566319797ab98b81e8e93c4615704edb70)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-06 11:09:52 +00:00
Alexander Kanavin
5afc62d491 valgrind: submit patch upstream
(From OE-Core rev: abc2ae3d1694e5aa393e7c28d238e90ce4f517bd)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-11 17:09:16 +00:00
Alexander Kanavin
206dadd9c2 valgrind: mark ptest-specific patch as inappropriate
I do not think upstream is going to accept this; if you disagree
please do the submission.

(From OE-Core rev: 22b0bd6cfdbf7216a6aca34fa9ca93133a3cee64)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-07 08:45:10 +00:00
Alexander Kanavin
3129eb9dd6 valgrind: update 3.17.0 -> 3.18.1
(From OE-Core rev: da8f9c5e1ebe655a1a8e9935dd6560121bca2e74)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-23 17:42:25 +01:00
Ross Burton
f231bc0b4f valgrind: set precise BSD license
"BSD" is ambiguous, use the precise license BSD-3-Clause.

(From OE-Core rev: b12cbda349658ddef8cb72d5738c094c2b009e7e)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-04 08:44:11 +01:00
Tony Tascioglu
36ed0c29cb valgrind: skip broken ptests for glibc 2.34
Skip tests that are problematic for glibc-2.34.
The list of problematic ptests was found by Richard after
patching several to work with the new glibc version.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14500

(From OE-Core rev: c177c7f9ef6f90ca49074f003accb8e9a1a645aa)

Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-12 06:26:15 +01:00
Richard Purdie
382e70c724 valgrind: Add patches for glibc 2.34 support
This partially resolves ptest failures with glibc 2.34.

(From OE-Core rev: 9adf897176924cad6b12d4da73a904cfbf578f46)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-05 08:53:41 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Tony Tascioglu
be3e14dd43 valgrind: skip flaky ptest fb_test_amd64
Recently, the none/tests/amd64/fb_test_amd64 test had been flaky and
causing failures on the auto-builder. Until we can get to the root cause
of the issue, we are going to skip the test to reduce the noise from the
ptests.

(From OE-Core rev: a365cd7a358db96791033e6dc6e45d2e816d3e4c)

Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-16 21:23:44 +01:00
Tony Tascioglu
7933c2125b valgrind: Actually install list of non-deterministic ptests
Install list of non-deterministic threaded ptests to be run using taskset
to force them to a single core. This commit works with b318944d7, which
updated the testing script to run the non-deterministic tests separately
but didn't install the list of tests, so these tests were being run
without taskset.

The taskset_nondeterministic_tests file is the list of tests that will
be run separately with taskset, and ignored during the other tests. This
is installed to /usr/lib/valgrind/ptest similar to the 2 existing lists
for tests to skip on ARM and all architectures.

Removed bar_bad and bar_bad_xml to be included separately as they cause
issues on non-kvm QEMU instances.

See:
   b318944dd7 valgrind: Improve non-deterministic ptest reliability
for more info.

(From OE-Core rev: 3d23985d0d653844863ed513d75d93a36359992f)

Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17 13:42:31 +01:00
Tony Tascioglu
a71c3b390d valgrind: remove buggy ptest from arm64
This commit removes the stack_changes ptest from aarch64 devices.
This test is buggy and fails almost 100% of the time in qemuarm64.
In general, many of the valgrind tests are more likely to fail on
qemuarm64 vs native x86_64.

This test previously worked on gatesgarth and dunfell, but has
been failing since hardknott. It might be due to a recent change
in the cross-compiler or glibc.
The test runs fine when running natively on arm on a Raspberry Pi.

Until we can find the root cause for the failures, this shorter
term solution should clear up some of the noise from the autobuilder
from a known failure.

(From OE-Core rev: 82d6411b80a46d8ec0258ca75c3c80dc6128d44e)

Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-12 08:38:29 +01:00
Kai Kang
b6ae985da0 valgrind: fix a typo
(From OE-Core rev: 0478d9b04d6a6d10e439116b23b641a1e2553e26)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-08 12:12:40 +01:00