71 Commits

Author SHA1 Message Date
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
3c9a71a42d Makefiles: bug 476331 cleanup
Quick test with one script to see if buildbot is happy.
2024-02-02 21:17:49 +01:00
Julian Seward
3b1710d38c Bug 413547 - regression test does not check for Arm 64 features.
Patches from/by Assad Hashmi (assad.hashmi@linaro.org).
2021-01-07 08:34:14 +01:00
Mark Wielaard
ee8cfbc434 Add libc_test to workaround pth_cond_destroy_busy test hangs.
This is a workaround for bug #371396. It adds a new test program
that can be used skip tests given a specific libc implementation
and optionally a specific minimum version. Currently only glibc
is recognized. This is used for the drd and helgrind tests
pth_cond_destroy_busy to be skipped on glibc 2.24.90+.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16097
2016-10-21 00:02:10 +00:00
Carl Love
7161ebc00f Add Power PC ISA check to the vbit-test
The support for the Valgrind Iops is dependent on the Power processor
support for various instructions.  The instructions supported by a
given Power processor is based on the version of the ISA.  The patch
add a check to the vbit-test to ensure it does not try to test an Iop
that generates an instruction on the host that is not supported.

This patch fixes bugzilla 352765.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15653
2015-09-16 23:33:40 +00:00
Carl Love
296ac5e8c1 Patch 3 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt  (will_schmidt@vnet.ibm.com).

remove unused capability checking scripts.
these have been replaced by the check_ppc64_auxv_cap script.

change tests/check_ppc64_auxv_cap to executable.  Tried to make it
executable on the last commit but for some reason it didn't seem to suceed.

Bugzilla 34979


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15422
2015-07-20 20:36:47 +00:00
Carl Love
8e3ac6c190 Patch 1 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt  (will_schmidt@vnet.ibm.com).

Add generic (ppc64) aux vector capability checking script.
This consolidates several of the existing _cap checking scripts.

Bugzilla 34979



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15420
2015-07-20 18:53:56 +00:00
Carl Love
c4fb707788 Backing out patch 1 and 2 from Bugzilla 349790.
The new script (tests/check_ppc64_auxv_cap) in the first patch was
written for the bash shell.  I was told by fkrohm that there was an
issue with bash sometime ago and the decision was to use sh instead.
sh maps to bash on a lot of systems but on some it maps to dash.  The
script is not compatible with dash.  

In retesting the second patch with a fresh svn pull, I found that I
forgot to do the svn add for the new script file.  Which causes the
regression test to fail with the second patch applied.  

So, I have decided it will be best to just back out patch 1 and 2 for now.
I will fix the script and do this again.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15390
2015-07-01 21:29:12 +00:00
Carl Love
33d527bae5 Patch 1 of 6
Rework the aux vector hwcap capability checking utilities.
This is meant to consolidate a number of existing _cap
checking scripts, and allow a better way of checking for
additional capabilites.

The bugzilla for this commit is 349790

Patch submitted by 	 Will Schmidt <will_schmidt@vnet.ibm.com>
Reviewed and tested by Carl Love <cel@ibm.com>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15388
2015-07-01 18:48:48 +00:00
Carl Love
0689c096e5 This commit is for Bugzilla 334836. The Bugzilla contains patch 3 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334384 and 334834.  Note, there are no VEX changes in this patch.


PP64 Little Endian test case fixes.

This patch adds new LE and BE expect files where needed.  In other
cases, the test was fixed to run correctly on LE and BE using based on
testing to see which platform is being used.

Where practical, the test cases have been changed so that the output
produced for BE	 and LE will be identical.  The test cases that require
a major rewrite to make the output identical for BE and LE simply
had an additional expect file added.

Signed-off-by: Carl Love <carll@us.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14240
2014-08-07 23:49:27 +00:00
Carl Love
49987d5c4a This commit is a fix for "Bug 330622 - Add test to regression suite for POWER
instruction: dcbzl" submitted by Anmol P. Paralkar <paralkar@freescale.com>

The patch adds the following files:

 none/tests/ppc64/data-cache-instructions.vgtest
 none/tests/ppc64/data-cache-instructions.c
 none/tests/ppc64/data-cache-instructions.stdout.exp
 none/tests/ppc64/data-cache-instructions.stderr.exp
 none/tests/ppc32/data-cache-instructions.stdout.exp
 none/tests/ppc32/data-cache-instructions.c
 none/tests/ppc32/data-cache-instructions.vgtest
 none/tests/ppc32/data-cache-instructions.stderr.exp
 tests/power_insn_available.c


The following files are modified:

 none/tests/ppc32/Makefile.am
 none/tests/ppc64/Makefile.am
 tests/Makefile.am





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13791
2014-02-08 02:19:12 +00:00
Mark Wielaard
ac9fc56329 Add tests/check_isa-2_07_cap to dist_noinst_SCRIPTS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13603
2013-10-02 13:41:57 +00:00
Mark Wielaard
5961ceec8a Add post_regtest_checks check_headers_and_includes to dist_noinst_SCRIPTS.
Also allow a .git directory in check_headers_and_includes to help
people using a git mirror of valgrind/VEX svn.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13601
2013-10-02 11:39:41 +00:00
Florian Krohm
abe71bded5 Followup to r13553 which caused some build failures.
(1) Detect availability of pthread_setname_np. Ignore testcases
    memcheck/tests/threadname[_xml] if not available.
(2) Enable _GNU_SOURCE to avold compiler warnings.
(3) In threadname_xml filter out stackframes referring to system
    libraries. Added tests/filter_xml_frames to do that.
(4) Adjust .exp files as needed
(5) Do not ship stdout.exp for memcheck/tests/threadname[_xml].


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13557
2013-09-17 20:15:36 +00:00
Petar Jovanovic
567ed9419a mips32/mips64: rename mips32_features to mips_features
As this file is now detecting mips64/Cavium boards, we are renaming it to
reflect that. The functional change is that mips_features now can detect
Cavium board and allow Cavium-specific tests to be run.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13551
2013-09-15 22:49:01 +00:00
Dejan Jevtic
59dcfad1a0 mips32: Add test cases for for mips32 DSP instruction set.
Add test cases for mips32 DSP and DSP revision 2 ASE.
Correctly model SHLL_S.PH on MIPS32.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13479
2013-08-02 15:39:58 +00:00
Julian Seward
d2ca761361 Initial support for POWER Processor decimal floating point
instruction support -- VEX side changes.  See #295221.

This patch adds test cases.  Also adds some minor Memcheck
instrumentation tweaks necessitated by the IR changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12476
2012-04-02 10:22:05 +00:00
Florian Krohm
c87d506673 Add some more missing files to the tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12218
2011-10-23 14:30:08 +00:00
Julian Seward
2184f38863 s390x: add test cases for STCK{,E,F} instructions. See #271779.
(Christian Borntraeger <borntraeger@de.ibm.com> and Divya Vyas)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11766
2011-05-17 16:19:53 +00:00
Julian Seward
9287d802b4 Add tests for new PowerISA_2.05 instructions available on Power6 CPUs.
(Maynard Johnson, maynardj@us.ibm.com and Pete Eberlein, eberlein@us.ibm.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11338
2010-09-03 23:49:33 +00:00
Nicholas Nethercote
5715955132 Fix a couple of tests that could be built with the wrong options, including
the -m32/-m64 option.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10440
2009-07-13 22:20:00 +00:00
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
f3f801ed48 Merge r9533..9536 (add tests/{asm.h,sys_mman.h,malloc.h} from the DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9537
2009-04-15 03:12:43 +00:00
Nicholas Nethercote
4c23a0b3e9 tests/arch_test is currently being used for two purposes:
- by vg_regtest for determining if a directory name matches an architecture;
- by various .vgtest files for detecting x86/AMD64 features.

This commit splits it in two for the two different purposes, which makes
things clearer.

Specific changes

- Moved the x86/AMD64 feature detection stuff out of arch_test.c, and
  into the new x86_amd64_feature.c.  Updated the relevant .vgtest files for
  the change.

- In vg_regtest, now a prereq command must return 0 (prereq satisfied) or 1
  (prereq not satisfied).  Anything else makes vg_regtest abort.  This
  makes obvious any problems with prereq tests rather than just making the
  tests skip innocuously.  (We previously had exactly such a problem on the
  DARWIN branch;  the x86 feature detection tests caused segfaults so the
  tests were incorrectly skipped.  This change will catch any similar future
  problem.)

- Changed os_test from a script to a C program, matching cpu_test.

- Removed some unintentional darwin stuff from platform_test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9316
2009-03-04 04:15:16 +00:00
Nicholas Nethercote
e67c3fc54e Remove toobig-allocs.c -- it was unreliable and didn't test any
functionality of note.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9261
2009-02-25 04:34:44 +00:00
Nicholas Nethercote
a3d4b19255 Cleanup this Makefile.am like other recent test Makefile.am files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9226
2009-02-23 01:03:06 +00:00
Nicholas Nethercote
cf6cd2bb31 Stack traces for Memcheck's syscall param errors are terribly unreliable, so
I changed it to just filter the entire stack trace out for these errors (both
normal and XML cases).  The syscall name is still present in the error
string.  This allows a one or more alternative expected output files to be
removed for several tests, which is A Very Good Thing.

Also, I killed filter_test_paths because it was weird and clumsy and the
above change obviated most of its use and the remaining effects could be
achieved in other ways.

Also, I fixed up the scalar* tests a little and they now pass on my machine,
(and hopefully at least some other machines) for the first time ever!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9178
2009-02-16 05:11:49 +00:00
Nicholas Nethercote
108768ee98 Merge r9175 (don't run inappropriate OS- and platform-specific tests) from
the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9176
2009-02-16 00:42:10 +00:00
Nicholas Nethercote
ed322feb84 Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
  configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
  #defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
  in them.
- The ones that are in all-caps have a _CAPS suffix.

So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer.  The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.

cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities.  In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits.  Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones.  (This is partially merged from the DARWIN branch.)

configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.

valgrind.pc.in: try to make this more accurate.  I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9031
2009-01-22 21:56:32 +00:00
Julian Seward
40399aab00 Fix longstanding bug in dual-arch support, which originated in
memcheck/tests/Makefile.am and was copied into drd/tests/Makefile.am.

When building regtests for a 32-bit only build on a 64-bit CPU, the
use of $(VG_ARCH) in these Makefiles is incorrect, because VG_ARCH
will be set to the 64-bit architecture, not the 32-bit architecture.

See comments on VG_ARCH_PRI and VG_ARCH_MAX in configure.in for more
details.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8623
2008-09-19 09:02:19 +00:00
Julian Seward
32f134b8c1 Somewhat rehash the biarch-build machinery so as to (1) formalise the
distinction between primary and secondary build targets, and (2) make
it independent of the default behaviour of gcc (iow, what gcc does
when you specify neither -m32 nor -m64).

As a result, an out-of-the-box build on ppc64-linux now builds a
system which is basically for 64-bit PowerPC, but also has the ability
to run 32-bit ppc-linux binaries (exactly the same arrangement as you
get when building on amd64-linux).

There are various twists and turns.  multiple-architectures.txt is
updated all the gory details.

This will break amd64 builds until such time as
<tool>/tests/{amd64,x86}/Makefile.am are fixed up (shortly).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5493
2006-01-04 01:20:28 +00:00
Nicholas Nethercote
f339e45fe3 Remove ancient unused test files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4795
2005-09-27 20:28:00 +00:00
Julian Seward
0356d27ca6 Merge in changes from the 2.4.0 line. This basically brings in the
overhaul of the thread support.  Many things are now probably broken,
but at least with --tool=none, simple and not-so-simple threaded and
non-thread programs work.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3265
2005-03-10 23:59:00 +00:00
Nicholas Nethercote
f4d320e3c4 Arch-abstraction:
- Rewrote tests/cputest.c so that it can apply to different kinds of
  processors.  The idea being that any arch-specific tests have a cpu_test:
  label in their .vgtest file, so they'll only get executed if the right
  machine is being used.
- Rewrote a bunch of .vgtest files accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2802
2004-10-19 16:29:30 +00:00
Nicholas Nethercote
854d2ec10e Fix for bug #78048.
Problem was that the malloc-replacing tools (memcheck, addrcheck, massif,
helgrind) would assert if a too-big malloc was attempted.  Now they return 0 to
the client.  I also cleaned up the code handling heap-block-metadata in Massif
and Addrcheck/Memcheck a little.

This exposed a nasty bug in VG_(client_alloc)() which wasn't checking if
find_map_space() was succeeding before attempting an mmap().  Before I added
the check, very big mallocs (eg 2GB) for Addrcheck were overwriting the client
space at address 0 and causing crashes.

Added a regtest to all the affected skins for this.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2462
2004-07-10 14:56:28 +00:00
Nicholas Nethercote
5630025b84 Patch from Tom Hughes, for bug 72643:
Patch to improve SSE/SS2 support

  This patch should implement most of the missing SSE/SSE2 opcodes. About
  the only ones it doesn't do are the MASKMOVxxx ones as they are quite
  horrible and involved an implicit reference to EDI so I need to think
  about them a bit more.

  The patch also includes a set of tests for the MMX/SSE/SSE2 opcodes to
  validate that they have the same effect under valgrind as they do when
  run normally. In one or two cases this wasn't actually the case even
  for some of the implemented opcodes, so I fixed those as well ;-)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2202
2004-01-19 19:14:18 +00:00
Nicholas Nethercote
1c69ebdcb4 Fix yet more "make dist" borkage
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2094
2003-12-04 16:15:25 +00:00
Nicholas Nethercote
136c7fba2c Fixed cpuid regtest, which was broken by the switch to using the machine's real
CPUID.

Also added filters to Makefiles where missing;  "make regtest" was broken
within distributions created using "make dist", now fixed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1709
2003-06-29 10:12:58 +00:00
Nicholas Nethercote
83ef1ca2ed Some Makefile.am changes. Lots of them affected:
- changed deprecated INCLUDES variable to AM_CPPFLAGS

- moved the -DVG_LIBDIR definition from AM_CFLAGS into AM_CPPFLAGS

- generally neatened them up a bit -- removed old commented out stuff, fixed a
  couple of other minor things

Everything works for me, hopefully it won't break things for anyone else...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1680
2003-06-12 14:13:05 +00:00
Nicholas Nethercote
dc0fe27537 Changed things so that the regression test script (vg_regtest) is no longer
installed, as it was silly since the reg tests themselves aren't installed.
Updated the "make regtest" target to use the uninstalled version in tests/.

Also, vg_regtest now no longer uses the installed version of Valgrind to do the
testing, but instead coregrind/valgrind.  This means that you don't have to do
make install with your buggy changes before running the regtests on them :)

I even updated the RPM package .spec file!

Thanks to Dirk M�ller for the suggestion.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1551
2003-04-23 21:48:20 +00:00
Dirk Mueller
02b63b3ba8 reapply automake fixes. make check will now generate the binaries which
are only required for regression testing.

If this breaks something, please mail me first instead of reverting.
Thank you.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1530
2003-04-17 17:00:43 +00:00
Julian Seward
2d2a15abbf Change a bunch of AM_CFLAGS, AM_CXXFLAGS to CFLAGS, CXXFLAGS.
The AM_ versions totally break compilation on RH6.2.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1447
2003-02-28 23:22:44 +00:00
Dirk Mueller
8f9785b1eb fix make distcheck with newer automake
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1443
2003-02-25 01:48:15 +00:00
Julian Seward
e464620bad Unbreak make dist / make distcheck.
Not sure if this is correct; Nick, can you verify?  Thx.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1199
2002-10-05 16:19:56 +00:00
Nicholas Nethercote
d386c3db8e Added one regression test for each of addrcheck, lackey, and helgrind, each of
which had none previously.  They all run tests/true (added as well), just to
automatically catch any total b0rkage errors.

Also fixed up filter_stderr_basic to account for changes to startup message;
my changes from yesterday broke all the --stable tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1179
2002-10-04 11:35:47 +00:00
Nicholas Nethercote
2ad7c51c41 Added (brief!) docs for Nulgrind.
Also fixed minor wibble tests/Makefile.am that was breaking 'make distcheck'.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1167
2002-10-02 13:49:13 +00:00
Nicholas Nethercote
8af201d0ca Moved vg_regtest to vg_regtest.in, using autoconf so vg_regtest now knows where
the `valgrind' script is kept, so people who install valgrind in a directory
other than the one I do don't need to use the --valgrind option all the time.

As a consequence, vg_regtests is now installed in and run out of bin/, rather
than tests/.

Also added a GPL copyright notice to vg_regtests.in.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1118
2002-09-27 08:44:17 +00:00
Nicholas Nethercote
2a3d19ae28 Added Makefile.am for tests/unused.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1102
2002-09-23 16:32:40 +00:00
Nicholas Nethercote
dfed07b587 Wibble.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1101
2002-09-23 16:27:35 +00:00