393 Commits

Author SHA1 Message Date
Paul Floyd
a1009028c4 Regtest: add a filter for syscall -> in libc 2025-12-25 09:22:48 +01:00
Florian Krohm
502fb19a40 s390: Remove S390_NUM_FACILITY_DW; fix testcase stfle.c (BZ 509562)
Now that the stfle insn is available we can use it to tell uas how
many double words are needed to store all facility bits. Hence,
S390_NUM_FACILITY_DW can go.

none/tests/s390x/stfle.c: The bug is here

  if (bit_to_test < 64)
    return (hoststfle[0] & (1ULL << (63 - bit_to_test)));
  else if (bit_to_test < 128)
    return (hoststfle[1] & (1ULL << (63 - bit_to_test)));
  else if (bit_to_test < 192)
    return (hoststfle[2] & (1ULL << (63 - bit_to_test)));

when bit_to_test >= 64.  Now fixed and test added.

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-30 08:34:46 +00:00
Paul Floyd
d4d17178ab Darwin Helgrind/DRD: change pthread lib, more filters and suppressions
And turn off one test that is hanging. More to come.
2025-11-28 07:44:51 +01:00
Paul Floyd
bf7c22738b Darwin: many fixes for OSX 10.13
Most of these changes are from Louis Brunner's GitHub repo.
The most imortant changes are to the memory space and to the code
related to getting the host filename during startup. This means
that when Valgrind crashes or hits an assert we now get a legible
host stacktrrace.

This also fixes none/tests/darwin/bug228343
2025-11-27 13:26:57 +01:00
Florian Krohm
2020b9914d s390x_features.c cleanup
Remove detection of unneeded facilities: zarch, n3, exrl, mi3
Rename s390x-vx2 --> s390x-vxe2 to be consistent with VEX_HWCAPS_S390X_VXE2
Change vec2_float.vgtest accordingly
2025-11-26 16:51:49 +00:00
Florian Krohm
5e0aa0cefa s390: PFPO facility related cleanups (BZ 509562)
The PFPO facility is always present on the supported machines.
- Remove VEX_HWCAPS_S390X_PFPO, s390_host_has_pfpo and EmFail_S390X_pfpo
- Update tests/s390x_features.c and none/tests/s390x/pfpo
- Update memcheck/tests/vbit-test

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-25 13:50:37 +00:00
Florian Krohm
ccbd64548f s390: load/store-on-condition / high-word facility related cleanups (BZ 509562)
The load/store-on-condition / high-word facility is always present on the
supported machines.
- Remove VEX_HWCAPS_S390X_LSC and s390_host_has_lsc
- Update tests/s390x_features.c and none/tests/s390x/high-word

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-25 13:23:52 +00:00
Florian Krohm
2acc312dbc s390: general-instructions-extension facility related cleanups (BZ 509562)
The general-instructions-extension facility is always present on the
supported machines.
- Remove VEX_HWCAPS_S390X_GIE and s390_host_has_gie
- Remove wrapper functions: s390_emit_MFYw, s390_emit_MHYw, s390_emit_MSFIw
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-25 09:14:11 +00:00
Paul Floyd
097cd6ccfc Bug 512571 - regtest problems with darwin dsymuti
There was alrwady a stderr filter for dsymutil, but only for DRD.
So I moved that to tests/filter_stderr_basic.in

I added single quotes around $dir in tests/vg_regtest.in for
arch_test and os_test. That now prevents directory names containing
spaces from being seen as more than one argument.
2025-11-25 08:20:06 +01:00
Florian Krohm
64f3a48999 s390: extended-immediate facility related cleanups (BZ 509562)
The extended-immediate facility is always present on the supported
machines.
- Remove VEX_HWCAPS_S390X_EIMM and s390_host_has_eimm
- Remove unused functions: s390_emit_LLILH, s390_emit_IILL, s390_emit_IILH,
  s390_emit_IIHL, s390_emit_IIHH
- Remove wrapper functions: s390_emit_NILFw, s390_emit_OILFw, s390_emit_XILFw,
  s390_emit_LBRw, s390_emit_LGBRw, s390_emit_LHRw, s390_emit_LGHRw,
  s390_emit_LGFIw, s390_emit_LLCRw, s390_emit_LLGCRw, s390_emit_LLHRw,
  s390_emit_LLGHRw, s390_emit_LLCw, s390_emit_LLHw, s390_emit_LLILFw,
  s390_emit_AFIw, s390_emit_SLFIw, s390_emit_SLGFIw, s390_emit_LTw,
  s390_emit_LTGw, s390_emit_CFIw, s390_emit_CLFIw
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-24 23:21:29 +00:00
Florian Krohm
9d2e3da555 s390: ETF2/ETF3-enhancement facilities related cleanups (BZ 509562)
The ETF2/ETF3-enhancement facilities are always present on
the supported machines.
- Remove VEX_HWCAPS_S390X_ETF2 and s390_host_has_etf2
- Remove VEX_HWCAPS_S390X_ETF3 and s390_host_has_etf3
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-24 18:39:39 +00:00
Florian Krohm
49d3e63da6 s390: decimal-floating-point facility related cleanups (BZ 509562)
The decimal-floating-point facility is always present on the supported
machines.
- Remove VEX_HWCAPS_S390X_DFP and s390_host_has_dfp
- Remove EmFail_S390X_DFP_insn
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-24 16:40:23 +00:00
Florian Krohm
610f0e4b5d s390: floating-point-extension facility related cleanups (BZ 509562)
The floating-point-extension facility is always present on the supported
machines.
- Remove s390_host_has_fpext and VEX_HWCAPS_S390X_FPEXT
- Remove EmWarn_S390X_fpext_rounding and EmFail_S390X_fpext
- Remove testscases none/tests/s390x/fpext_fail and fpext_warn
- Update tests/s390x_features.c and memcheck/tests/vbit-test

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-23 22:54:18 +00:00
Florian Krohm
1bd977bff8 s390: STFLE related cleanups (BZ 509562)
The STFLE insn is always present on the supported machines.
- Remove s390_host_has_stfle, VEX_HWCAPS_S390X_STFLE, and EmFail_S390X_stfle
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-21 16:54:13 +00:00
Florian Krohm
346881fb0a s390: long displacement facility related cleanups (BZ 509562)
The long displacement facilities are always present on the supported
machines.
- Remove s390_host_has_ldisp and VEX_HWCAPS_S390X_LDISP
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-21 15:51:53 +00:00
Florian Krohm
d254814f3f s390: Code cleanup due to availability of STCKF insn. (BZ 509562)
Remove EmFail_S390X_ecag, s390_host_has_stckf, and VEX_HWCAPS_S390X_STCKF.
Update none/tests/s390x/stckf.vgtest and tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-20 23:06:31 +00:00
Mark Wielaard
3392155359 Upgrade to GNU General Public License version 3
- Update COPYING and VEX/LICENSE.GPL to version 3.
- Update README, NEWS, docs/manual license and contributing text.
- Update file headers to say either version 3 of the License,
  or (at your option) any later version.
- Leave tests and perf file headers as is, unless the code is derived
  from Valgrind/VEX.
- Leave valgrind.h, cachegrind.h, callgrind.h, drd.h, helgrind.h,
  memcheck.h and dhat.h Hybrid-BSD licensed.
2025-10-18 00:55:07 +02:00
Andreas Arnez
32fcdbfafd s390x: Make IBM z17 known to Valgrind
Make the IBM z17 machine model 9175 known to Valgrind.  Also add the
expected output of the s390x-specific "ecag" test case on an IBM z17, so
the test case succeeds on that system.
2025-10-09 13:42:39 +02:00
Florian Krohm
b5b7e0238a Fix file permissions.
The following files do not need to be executable:
- configure.ac
- Makefile*am
- *.in

The following files lack execute permission:
- tests/platform_test
- tests/vg_regtest
- perf/vg_perf

So from now on you can just run  tests/vg_regtest and perf/vg_perf
without the perl prefix.
Docs changed accordingly.
2025-09-26 22:01:46 +00:00
Paul Floyd
1039274db9 regtest: add arm64-freebsd to tests/platform_test
Not explicitly listing the platform was causing the one test
to run on other platforms
2025-09-21 08:07:11 +02:00
Florian Krohm
714b71ea5d tests/x86_amd_features.c: followup to 4810c14b5d
Do not rely on hardware identifying itself in a particular way.
Enable lzcnt for non-AMD hardware.
2025-07-24 09:43:04 +00:00
Florian Krohm
4810c14b5d tests/x86_amd_features.c: also recognise GenuineIntel
Enables running certain testcases on hardware that identifies itself
as "GenuineIntel".
2025-07-23 20:20:54 +00:00
Paul Floyd
f72d263cae Add 'scripts' directory to dirs_to_ignore in check_headers_and_includes 2025-04-14 21:06:45 +02:00
Paul Floyd
3a23860abe Illumos regtest: add 'illumos' to os_test and turn off a few tests
The threadname tests fail on Illumos. Solaris has a syscall,
sys_lwp_name, which we intercept and record. Illumos doesn't
have that, with the pthread name functions looking ofr the name in /proc
That's not implemented in Valgrind so I'm turning those 2 tests off.

The other 3 are all based on none faultstatus. This test checks 4 things,
one of which is reading from a 32k mmap that is PRIVATE and READ but is
only backed by a 16k file. All other OSes generate a SIGBUS. Illumos
just reads 0 from the address.
2025-04-12 18:27:06 +02:00
Paul Floyd
7d3ee1f1a0 Illumos resgtest: revert previous change to filter_libc and update expected instead 2025-04-05 08:16:54 +02:00
Paul Floyd
fc5099c2b7 Illumos regtest: one filter and one pre script fix
filter a change for the bottom of thread stacks and
add use the same pre check as Linux for DRD OpenMP tests.
2025-04-04 22:00:38 +02:00
Paul Floyd
36ab09596a Illumos regtest: add a filter for shell 'Abort' messages 2025-03-11 20:50:07 +01:00
Petr Pavlu
e3432fc94d riscv64: Add initial support: test modifications
The following people contributed to the initial RISC-V support:
Petr Pavlu <petr.pavlu@dagobah.cz>
Xeonacid <h.dwwwwww@gmail.com>
laokz <laokz@foxmail.com>
Chelsea E. Manning <me@xychelsea.is>
zhaomingxin <zhaomingxin.zmx@alibaba-inc.com>
Jojo R <rjiejie@linux.alibaba.com>

Some integration fixes were added by Mark Wielaard <mark@klomp.org>
- helgrind/tests/tc11_XCHG.c: Fix XCHG_M_R guard

https://bugs.kde.org/show_bug.cgi?id=493507
2025-02-25 17:05:17 +01:00
Paul Floyd
01a6ea5b03 Illumos regtest: add a filter for crt start
Was causing a failure in one Massif test
2025-02-15 16:25:23 +01:00
Mark Wielaard
42eb19c0da Check for and compile using -std=gnu11 (or higher)
Use gnulib m4/std-gnu11.m4 for that.

Also update the minimum autoconf version to 2.69. And the minimum
automake to 1.13. This lets us clean up configure.ac a little.

We would really like 2.70+ so we don't need the gnulib gnu11.m4. But
2.69 still seems in use on various stable systems. autoconf 2.70
was released end of 2020, autoconf 2.69 in 2012.
2025-01-23 19:33:57 +01:00
Paul Floyd
61bf8fc586 Illumos regtest: filter more signal messages from bash 2024-11-09 20:05:03 +01:00
Florian Krohm
74d85edfbd Bug 493959 - s390x: Fix regtest failure for op00 with /bin/dash
On different machines /bin/sh may be impersonated by different shells, and
those behave differently as to whether they write "Illegal instruction ..."
to stderr.  While newer versions of bash do not, dash does.

For the op00 test case this means that an additional line may be written
to `op00.stderr.out', depending on which shell is being used.  Hence
adding "Illegal instruction ..." as an expected line to `op00.stderr.exp'
wouldn't work on all systems.

Instead, fix this issue by adding the case of "illegal instruction" to the
general filtering logic in filter_stderr_basic.in, where various other
messages of this kind are already filtered out.

Reviewed-by: Andreas Arnez <arnez@linux.ibm.com>
2024-10-29 16:46:34 +01:00
Frank Ch. Eigler
d275c45935 valgrind testing: fix vg_regtest individual-test mode
One of the new log files was created in a way that was
oblivious to the chdir()'s in effect in the perl script.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2024-09-03 13:30:13 -04:00
Frank Ch. Eigler
61e44a4aef valgrind testing: extend vg_regtest to emit automake-style .trs/.log files
Extend vg_regtest to produce automake-style log files for each vgtest
case, so that developers and testsuite archiving/analysis tools such
as bunsen can examine passing as well as non-passing test outputs in
detail.  The build-tree test-suite-overall.log file holds all the key
information about tests, especially failures.

Signed-Off-By: Frank Ch. Eigler <fche@redhat.com>
2024-08-22 11:20:00 -04:00
Paul Floyd
cba2022d53 Darwin regtest: don't visit dSYM directories with tests/vg_regtest
Due to the extra directory depth of dSYM directories the following line
    my $dashes = "-" x (50 - length $full_dir);
generates a warning on Darwin because the length of $full_dir is more than 50
("Negative repeat count does nothing"). This change makes test_one_dir return
early if the directory contains "dSYM".
2024-04-29 21:11:53 +02:00
Paul Floyd
1f49fb9776 warnings: arm64 unused function in test and missing return for FreeBSD getauxval 2024-04-27 13:42:57 +02:00
Mark Wielaard
26ebac7b4c Add prereqs for tests using python 3.9+
Adds a script tests/python_test.sh that checks whether there is a python3
binary and that it supports python version 3.9 or higher. Use this script
in the various cachegrind/tests annotate vgtests as prereq.
2024-04-24 21:30:48 +02:00
Paul Floyd
2692484982 Bug 481874 - Add arm64 support for FreeBSD 2024-04-16 07:39:33 +02:00
Mark Wielaard
3fe22d4faf Add @configure_input@ to all filer files generated by configure
This will add a comment at the top of each filter file saying:

 filter_file.  Generated from filter_file.in by configure.
2024-04-14 23:56:48 +02:00
Philippe Waroquiers
97386027d6 Allow to see more details about suppressed errors.
Extend --show-error-list=no|yes with all to allow to look also the
list of suppressed errors and see which supp entry is suppressing it.
Add an option also_suppressed in the monitor command 'c.vinfo all_errors'
to similarly be able to show the suppressed errors.

Small fix in check_makefile_consistency: avoid it considers emacs ~ files.
2024-04-14 15:39:06 +02:00
Paul Floyd
506beeecc8 FreeBSD regtest: filter sanity level >= 3 warnings about transparent stack mmaps 2024-02-28 19:37:02 +01:00
Paul Floyd
1dc51ee30a FreeBSD: updates for FreeBSD 15 libsys
FreeBSD 15 has moved all libc functions that are just syscall
wrappers into libsys. That changes quite a few callstacks, so
I've added a load of filtering to make it look like the old
libc callstacks.

I'm also seeing new conflicts in _umtx_op_err for both DRD
and Helgrind that needed supressing.
2024-02-23 20:07:53 +01:00
Paul Floyd
de2cd7f6f9 Bug 476331 - clean up generated/distributed filter scripts 2024-02-02 22:27:25 +01:00
Paul Floyd
3c9a71a42d Makefiles: bug 476331 cleanup
Quick test with one script to see if buildbot is happy.
2024-02-02 21:17:49 +01:00
Paul Floyd
8e1d13bd11 Bug 479041 - Executables without RW sections do not trigger debuginfo reading
The main change is to not assume that there is always 1 and only 1 RW segment.
Now the rw segment count is obtained from the macho segments.

I've had to make several changes to remove asserts that checked
that there is always 1 or more rw segments. I don't think that this
really affects 'normal' C and C++ compiled binaries. There is one
exp-bbv testcase (x86/million) that is written in assembler and
was failing until I removed all of the asserts.

There's still a bit more work to do.
1. Handle fat binaries - are these still a thing (with "apple silicon")?
2. Use a dynamically sized buffer for the segments rather than just 4k.
2023-12-28 10:27:18 +01:00
Paul Floyd
e80df5d475 Darwin regtest: modify filter for massif
Now only have 3 failing testcases with 2 causes
- brk() not handled
- not redirecting alloc functions in the main exe
2023-12-26 10:01:15 +01:00
Andreas Arnez
bcb1aa8e64 s390x: Make z16 machine model known to Valgrind
The z16 machine model hasn't been fully introduced to Valgrind yet.  Add
the missing support:

* Add z16 to the list of machine models in each of `libvex.h',
  `tests/s390x_features.c', and `s390-check-opcodes.pl'.

* Starting with z16, the "store facility list extended" (STFLE)
  instruction can write four instead of three words.  Reflect this in the
  STFLE-helper and in the `stfle' test case.

* Pass the new STFLE-bits unchanged, except for the vector-packed-decimal
  facility, which is unsupported by Valgrind.
2023-09-29 16:11:31 +02:00
Paul Floyd
f1252d56d7 test scripts: add cachegrind to list of tools with export headers 2023-09-17 10:12:48 +02:00
Paul Floyd
6beec04556 FreeBSD: add an extra libc filter for _start in massif deep-D test 2023-08-27 18:45:03 +02:00
Mark Wielaard
f7ddfc7cfd Regtest: add time cost statistics
Add running time of each (sub) directory in seconds

https://bugs.kde.org/show_bug.cgi?id=467036

Contributed-by: Jojo R <rjiejie@linux.alibaba.com>
2023-04-15 00:59:34 +02:00