267 Commits

Author SHA1 Message Date
Petar Jovanovic
89b035b3a1 mips64: run FPU tests only when FPU is available
Check whether the target platform is meant to have an FPU before executing
tests that make use of a floating-point unit.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14571
2014-09-27 05:33:07 +00:00
Petar Jovanovic
d04098575e mips: extend mips_features with a check for FPU
Extend mips_features with "hard-float" query to which mips_features will
respond whether or not the platform is meant to have a floating point unit.
The query is not a runtime check, but a built-time check.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14570
2014-09-27 05:18:21 +00:00
Florian Krohm
bc2fb329cf Fix incorrect use of VG_(tool_panic). Adapt checker script accordingly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14544
2014-09-16 09:28:12 +00:00
Florian Krohm
ab1f8662db Update a comment
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14543
2014-09-16 07:20:21 +00:00
Florian Krohm
a584a6773c coregrind files shall use vg_assert not tl_assert.
Tool files shall use tl_assert not vg_assert.
Fix code accordingly.
Adapted check_headers_and_includes to make sure the code
stays clean in that respect.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14542
2014-09-15 20:57:45 +00:00
Philippe Waroquiers
006dc3b436 Go back to $test_dirs after each test run or tests dir run
Otherwise, we get an error for the 2nd dir if specifying 2 directories e.g.

  perl tests/vg_regtest cachegrind/tests callgrind/tests
  -- Running  tests in cachegrind/tests ----------------------------------
  chdir:           valgrind   ./chdir 
  clreq:           valgrind   -q ./clreq 
  dlclose:         valgrind   ./dlclose 
  notpower2:       valgrind   --I1=32768,8,64 --D1=24576,6,64 --LL=3145728,12,64 ./../../tests/true 
  wrap5:           valgrind   ./../../memcheck/tests/wrap5 
  -- Running  tests in cachegrind/tests/x86 ------------------------------
  fpu-28-108:      valgrind   ./fpu-28-108 
  -- Finished tests in cachegrind/tests/x86 ------------------------------
  -- Finished tests in cachegrind/tests ----------------------------------
  `callgrind/tests' neither a directory nor a readable test file/name



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14487
2014-09-07 12:36:58 +00:00
Philippe Waroquiers
3159bc49c8 Improve description of an address that is on a stack but below sp.
An address below the sp will be described as being on a stack, but below sp.

The stack for such an address is found in the registered stacks.

Also, if there is a guard page at the end of the stack (lowest address)
an address in this page will be described as being in thread guard page.
A guard page is recognised as being a page not readable/writable/executable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14399
2014-08-31 22:27:19 +00:00
Julian Seward
c88407b17f Add a missing entry to all_archs[], the lack of which was causing
the test system to run arm64 tests on non-arm64 platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14369
2014-08-26 21:06:31 +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
98908947c7 This commit is for Bugzilla 334834. The Bugzilla contains patch 2 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334384 and 334836.

POWER PC, add the functional Little Endian support, patch 2 

The IBM POWER processor now supports both Big Endian and Little Endian.
The ABI for Little Endian also changes.  Specifically, the function
descriptor is not used, the stack size changed, accessing the TOC
changed.  Functions now have a local and a global entry point.  Register
r2 contains the TOC for local calls and register r12 contains the TOC
for global calls.  This patch makes the functional changes to the
Valgrind tool.  The patch makes the changes needed for the
none/tests/ppc32 and none/tests/ppc64 Makefile.am.  A number of the
ppc specific tests have Endian dependencies that are not fixed in
this patch.  They are fixed in the next patch.

Per Julian's comments renamed coregrind/m_dispatch/dispatch-ppc64-linux.S
to coregrind/m_dispatch/dispatch-ppc64be-linux.S  Created new file for LE
coregrind/m_dispatch/dispatch-ppc64le-linux.S.  The same was done for
coregrind/m_syswrap/syscall-ppc-linux.S.

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

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14239
2014-08-07 23:35:54 +00:00
Carl Love
914f75de32 This commit is for Bugzilla 334384. The Bugzilla contains patch 1 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334834 and 334836.  The commit does not have a VEX commit associated with it.

POWER PC, add initial Little Endian support

The IBM POWER processor now supports both Big Endian and Little Endian.
This patch renames the #defines with the name ppc64 to ppc64be for the BE
specific code.  This patch adds the Little Endian #define ppc64le to the

Additionally, a few functions are renamed to remove BE from the name if the
function is used by BE and LE. Functions that are BE specific have BE put
in the name.

The goals of this patch is to make sure #defines, function names and
variables consistently use PPC64/ppc64 if it refers to BE and LE,
PPC64BE/ppc64be if it is specific to BE, PPC64LE/ppc64le if it is LE
specific.  The patch does not break the code for PPC64 Big Endian.

The test files memcheck/tests/atomic_incs.c, tests/power_insn_available.c
and tests/power_insn_available.c are also updated to the new #define
definition for PPC64 BE.

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


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14238
2014-08-07 23:17:29 +00:00
Philippe Waroquiers
f96b38bf1d Activate --read-inline-info=yes for the outer/inner setup regtest run
as this makes the inner stacktraces easier to understand
and also it exercises the inline unwinding somewhat already,
waiting for a (possible) activation by default of --read-inline-info



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14101
2014-06-25 23:27:08 +00:00
Florian Krohm
7aefdaa6ef Update the copyright notice in files ending in '.in' because the
script change-copyright-year did not handle them.
Update the script as well.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14087
2014-06-23 19:33:45 +00:00
Dejan Jevtic
b0917203d8 mips: Disable test on mips32/64 big-endian platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13881
2014-03-19 15:44:19 +00:00
Julian Seward
7b4c56bb4d Support arm64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13843
2014-03-01 11:20:33 +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
Petar Jovanovic
09034f1ee2 mips64: detect Cavium Octeon II in mips_features
Detect Cavium Octeon II CPU. This is needed as a prerequisite for
successful execution of cavium-octeon2 specific tests.

Patch by Zahid Anwar.

Related to Bugzilla issue 326444.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13782
2014-01-29 15:58:09 +00:00
Bart Van Assche
39c447e4a9 Merge mc_replace_strmem.c, hg_intercepts.c and drd_strmem_intercepts.c
Move memcheck/mc_replace_strmem.c to shared/vg_replace_strmem.c and
add several intercepts for SSE-variants. Include that source file from
drd/drd_strmem_intercepts.c, helgrind/hg_intercepts.c and
memcheck/mc_replace_strmem.c.

Merge memcheck/tests/filter_memcpy into tests/filter_stderr_basic.
    
Update tests/check_headers_and_includes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13719
2013-11-24 17:48:13 +00:00
Bart Van Assche
ac63f15b07 tests/check_headers_and_includes: Use File::Basename
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13714
2013-11-17 10:06:09 +00:00
Florian Krohm
8434d573a5 Tweak to avoid a trailing space.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13627
2013-10-08 06:02:01 +00:00
Florian Krohm
9f3b86cf35 Filter out the dynamic linker from back traces.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13626
2013-10-07 20:57:51 +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
b85b4fc560 Add the install directory that gets created by the nightly script.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13573
2013-09-20 12:12:52 +00:00
Florian Krohm
e9e22a3a00 Add a script 'check_headers_and_includes' to check that #include directives
are not against the grain.
Wrap this script together with 'check_makefile_consistency' into
'post_regtest_checks' and invoke that from the toplevel Makefile. So we can
easily add new checkers in the future.

Add a new make target 'post-regtest-checks' to just run those checks
and nothing else.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13570
2013-09-19 14:55:09 +00:00
Florian Krohm
b9016099c5 Tweak filter_xml_frames. Suppress frames containing neither a
function name nor any source code reference.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13559
2013-09-18 09:15:23 +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
Carl Love
95d8477491 Initial ISA 2.07 support for POWER8-tuned libc
The IBM Power ISA 2.07 has been published on power.org, and IBM's new POWER8
processor is under development to implement that ISA. This patch provides
initial runtime and testsuite support for running Valgrind on POWER8 systems
running a soon-to-be released Linux distribution. This Linux distro will
include a POWER8-tuned libc that uses a subset of the new instructions from
ISA 2.07.  Since virtually all applications link with libc, it would be
impossible to run an application under Valgrind on this distro without adding
support for these new instructions to Valgrind, so that's the intent of this
patch. Note that applications built on this distro will *not* employ new POWER8
instructions by default. There are roughly 150 new instructions in the Power
ISA 2.07, including hardware transaction management (HTM). Support for these
new instructions (modulo the subset included in this bug) will be added to
Valgrind in a phased approach, similar to what we did for Power ISA 2.06.

Bugzilla 322294, VEX commit 2740

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13494
2013-08-12 18:04:22 +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
Florian Krohm
3a876fc371 s390: New machine model: zBC12
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13473
2013-07-28 15:29:36 +00:00
Florian Krohm
30f32f46d2 s390: valgrind side support for PFPO. New hwcap added.
See companion patch VEX r2719.

Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13387
2013-05-11 15:05:04 +00:00
Petar Jovanovic
5dd4c02e39 mips: adding MIPS64LE support to Valgrind
Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292
2013-02-27 23:17:33 +00:00
Julian Seward
11e11bb17a Use correct %rcx bit in the AVX feature check. Fixes #307285.
(Mark Wielaard, mjw@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13161
2012-12-06 16:38:50 +00:00
Florian Krohm
78ec60e0e7 Update s390_features.c for DFP.
Add a testcase.
Patch by Maran (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
See also VEX r2560.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13120
2012-11-10 22:35:24 +00:00
Florian Krohm
02be5e72db Change s390-features to allow testing for absence of a feature.
This is infintely less painful than to find out how to invert
the condition in a test prerequisite.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12928
2012-09-02 03:30:38 +00:00
Florian Krohm
6805920360 s390: Detect floating point extension facility. Update s390-features.c
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12920
2012-08-30 20:30:32 +00:00
Florian Krohm
1bf0791db8 Add FAC_BIT macro to simplify correct testing for facility bits.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12919
2012-08-30 18:47:56 +00:00
Florian Krohm
e32ad1d0ae s390: Add zEC12 machine model. Fix spelling for some older models.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12905
2012-08-28 13:33:10 +00:00
Florian Krohm
3bce85fd9f Fix syntax error
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12763
2012-07-19 18:16:49 +00:00
Florian Krohm
e78d930a09 Enable testing for the ETF3 facility.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12759
2012-07-19 14:35:55 +00:00
Julian Seward
3e344c57f6 Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616
2012-06-07 09:13:21 +00:00
Julian Seward
3c1f7ebaa1 Fix breakage I introduced in r12609, sigh.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12610
2012-06-05 00:30:24 +00:00
Julian Seward
ad3493bed6 Add feature testing for AVX. Also make the return values into named
constants.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12609
2012-06-04 07:39:30 +00:00
Christian Borntraeger
abadfaacdc Fix machine detection on s390 to not bail out the regression
test on unknown systems.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12593
2012-05-29 11:02:28 +00:00
Florian Krohm
1f38919afa Avoid regtest failures on x86_64 and ppc64 when toolchains for the
seconday platform (x86 and ppc32, respectively) is not available.
Add -DVGA_SEC_xxxxx and -DVGP_SEC_... to the GCC command line
indicating that a seconday platform is supported. Make arch_test.c
recognise those flags.
Fixes bugzilla #296983.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12556
2012-05-06 03:51:00 +00:00
Philippe Waroquiers
2bd926a725 outer/inner setup: new perf/vg_perf options to run perf tests + support translation chaining in inner.
* perf/vg_perf:
Similarly to tests/vg_regtest, perf/vg_perf now accepts the 3 
optional arguments:
    --outer-valgrind
    --outer-tool
    --outer-args

This allows easy analysis or comparison of performance between
different Valgrind versions (e.g. using callgrind, or cachegrind/cg_diff).

* See README_DEVELOPERS for more details.

* vg_regtest modified so as to use the 'in-place' build of inner, rather
  than the installed version.

* added option --smc-check=all-non-file to vg_perf and vg_regtest 
  outer default arguments (needed when evaluating a Valgrind which does
  translation chaining).




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12496
2012-04-08 19:52:38 +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
Philippe Waroquiers
aa50a7e4df Allows to run regression tests in an outer/inner setup.
A '3 lines how to':
   perl tests/vg_regtest --outer-valgrind=../trunk_untouched/install/bin/valgrind --all
           (the outer results for a test xxx is in xxx.outer.log)
   To run with another tool (e.g. drd), add the argument --outer-tool=drd


Still to do/things to improve:

* Most (inner) tests are successful when running under an outer
  memcheck. Need to analyse the reasons of remaining failures.

* The memcheck annotations in m_mallocfree.c can be improved:
  - A superblock is marked 'undefined', it should rather be marked
    'no access'.
  - When a free block is splitted, the remaining free block is
    not made 'no access'. Instead, it is made 'undefined'.
      => this decreases the chance to find bugs.
      => this is not very efficient (e.g. the rest of a superblock
         is often marked undefined repetitively).
    Similarly, the free block created by VG_(arena_memalign)
    is marked 'undefined'. 'No access' would be preferrable.
  - mkInuseBlock marks the new block as undefined. This is probably
    not needed, as VALGRIND_MALLOCLIKE_BLOCK will do it already.
  - VG_(arena_malloc) should give the requested size to
    VALGRIND_MALLOCLIKE_BLOCK, not the malloc usable size,
    as this decreases the chance to find buffer overrun bugs.
    But giving the requested size is tricky (see comments in
    the code).

* need to do memcheck annotations in m_poolalloc.c
   so as to allow leak checking for pool allocated elements.

* vg_regtest.in
  - should analyse the results of the outer and should
    produce a separate result for the tests for which
    the outer detects an error or a memory leak or ...


Changes done:
   README_DEVELOPERS: document the new outer/inner features.
   manual-core.xml: document the new sim-hint no-inner-prefix
   tests/outer_inner.supp: new file, containing the suppressions for inner.
   vg_regtest.in: implement new args --outer-valgrind, --outer-tool, --outer-args.
   m_mallocfree.c: annotations for memcheck.
   m_libcprint.c: handle the new sim-hint no-inner-prefix
   m_main.c: do an (early) parse of --sim-hints




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12441
2012-03-11 22:24:03 +00:00
Florian Krohm
aae83277bc Update platform_test. Add s390x-linux. Remove AIX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12259
2011-11-06 22:43:33 +00:00