Commit Graph

1066 Commits

Author SHA1 Message Date
Mark Wielaard
3f47256593 Adjust cmdline expected test output after r14401 BZ#337871.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14405
2014-09-01 14:16:49 +00:00
Julian Seward
e4e8111405 Remove memory (load/store) tests from integer.c and move them
into their own file, memory.c.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14403
2014-09-01 09:35:42 +00:00
Philippe Waroquiers
6375fdd9cc make prereq fail with 1 if host command not installed
as prereq must return 0 or 1. Any other return value aborts the regtests.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14391
2014-08-29 22:49:21 +00:00
Mark Wielaard
a909919fee none/tests/res_search.vgtest: Add prereq that domain can be resolved.
Some autobuilders/testers don't allow network access.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14385
2014-08-29 18:35:54 +00:00
Mark Wielaard
499dd431ed Hook up allexec tests for arm64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14382
2014-08-29 08:41:45 +00:00
Mark Wielaard
bdcf926b1e none/tests/Makefile.am (DIST_SUBDIRS): Add arm64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14371
2014-08-27 13:39:53 +00:00
Julian Seward
02bfa4d655 Add test config files and expected outputs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14365
2014-08-26 19:53:08 +00:00
Julian Seward
2f2212df9c Build system stuff, to hook the tests in none/tests/arm64
to the build system.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14363
2014-08-26 19:28:09 +00:00
Julian Seward
65f273d292 arm64: enable test cases for:
{zip,uzp,trn}{1,2} (vector)
  urecpe, ursqrte (vector)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14353
2014-08-24 20:37:39 +00:00
Mark Wielaard
4ecf04acef filter_shell_output: filter out "Exec format error" added by newer bash.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14343
2014-08-23 20:49:17 +00:00
Philippe Waroquiers
8e605f14c5 Add option a new sim-hint no-nptl-pthread-stackcache.
Activating this hint using --sim-hints=no-nptl-pthread-stackcache
means the glibc nptl stack cache will be disabled.

Disabling this stack/tls cache avoids helgrind false positive race conditions
errors when using __thread variables.

Note: disabling the stack cache is done by a kludge, dependent on
internal knowledge of glibc code, and using libpthread debug info.
So, this kludge might be broken with newer glibc version.
This has been tested on various platforms and various
glibc versions 2.11, 2.16 and 2.18

To check if the disabling works, you can do:
valgrind --tool=helgrind --sim-hints=no-nptl-pthread-stackcache -d -v ./helgrind/tests/tls_threads |& grep kludge

If you see the below 2 lines, then hopefully the stack cache has been disabled.
--12624-- deactivate nptl pthread stackcache via kludge: found symbol stack_cache_actsize at addr 0x3AF178
--12624:1:sched    pthread stack cache size disabling done via kludge




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14313
2014-08-19 22:46:44 +00:00
Julian Seward
de7abd40a9 arm64: enable test cases for
srhadd, urhadd (vector)
suqadd, usqadd (scalar)
suqadd, usqadd (vector)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14303
2014-08-18 12:29:03 +00:00
Philippe Waroquiers
2f460aaec6 The attached patch cleanups the clo processing
of clo which are (or should be) 'enum set'.

* pub_tool_options.h : add new macrox VG_USET_CLO and VG_USETX_CLO to
  parse an 'enum set' command line option (with or without "all" keyword).

* use VG_USET_CLO for existing enum set clo options:
   memcheck --errors-for-leak-kinds, --show-leak-kinds, --leak-check-heuristics
   coregrind --vgdb-stop-at

* change --sim-hints and --kernel-variants to enum set
  (this allows to detect user typos: currently, a typo in a sim-hint
   or kernel variant is silently ignored. Now, an error will be given
   to the user)

* The 2 new sets (--sim-hints and --kernel-variants) should not make
  use of the 'all' keyword => VG_(parse_enum_set) has a new argument
  to enable/disable the use of the "all" keyword.

* The macros defining an 'all enum' set definition was duplicating
  all enum values (so addition of a new enum value could easily
  give a bug). Removing these macros as they are unused
  (to the exception of the leak-kind set).
  For this set, the 'all macro' has been replaced by an 'all function',
  coded using parse_enum_set parsing the "all" keyword.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14301
2014-08-17 20:03:51 +00:00
Julian Seward
1e5f3e37f5 arm64: enable test cases for
sshr, ushr, ssra, usra (scalar, imm) 
  srshr, urshr, srsra, ursra (scalar, imm) 
  srshr, urshr, srsra, ursra (vector, imm) 
  sshl, srshl, ushl, urshl (scalar, imm) 
  sshl, srshl, ushl, urshl (vector, vector) 
  ssra, usra (vector, imm) 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14300
2014-08-17 18:34:08 +00:00
Carl Love
4a227327b7 creating the lind from none/tests/ppc64/round.c to none/tests/ppc32/round.c
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14291
2014-08-15 16:44:32 +00:00
Carl Love
cadab32c50 Removing the file none/tests/ppc64/round.c so I can change it to a link.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14290
2014-08-15 16:40:03 +00:00
Philippe Waroquiers
bc353dfe97 fix 338160: Implement QGetTlsAddr query so that GDB+V gdbsrv can print __thread variables.
To implement QGetTlsAddr, gdbsrv has to know how to get the glibc dtv
address and the module id from the link_map.
These 2 things are dependent on the internals of glibc.
The dependency is mostly isolated in a few lines of arch dependent
code or in an external utility that used a hack + -ldl lib to find
the offset of the modid in the link_map structure.

Tested on x86/amd64/ppc64/s390x. Somewhat tested on ppc32 and arm64.
Untested/a few #ifdef-ed lines not compiled on arm/mips32/mips64
and darwin.

For more background info about thread local storage handling, see
'ELF Handling For Thread-Local Storage' http://www.akkadia.org/drepper/tls.pdf

Changes:
* auxprogs/getoff.c new auxilliary program to get platform specific offsets
  (currently only the offset for the module id in struct link_map).
* configure.ac : check for dlinfo(RTLD_DI_TLS_MODID) needed for getoff.c
* new gdbserver_tests/hgtls, testing various types of __thread variables
* various m_gdbserver files:
  - implement decoding of the QGetTlsAddr query
  - for each platform: platform specific code to get the dtv
  - call to external program getoff-<platform> the first time an
    __thread variable is printed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14283
2014-08-15 10:27:52 +00:00
Julian Seward
3b07ab47b2 arm64: enable test cases for:
{uqshl, sqshl, sqshlu} (vector, imm)
{uqshl, sqshl, sqshlu} (scalar, imm)
{uqshrn, sqrshrun, sqshrun} (scalar, imm)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14281
2014-08-15 05:39:42 +00:00
Florian Krohm
895ab49a72 Choose some floating point numbers that are hopefully easier to write out.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14279
2014-08-14 17:32:26 +00:00
Carl Love
5f6905953b This commit is an update to Bugzilla 334836
There are two copies of the round test in none/tests/ppc32/round.c
and none/tests/ppc64/round.c.  The two source files should be
identical. The LE functional test commit updated the round.c test for
ppc64 but was missing the ppc32 round updates.  The round.c test was
updated to fix an issue where we were getting different outputs
depending on the compiler.  The output is now consistent for the
compilers allowing the removal of the additional expect files for
ppc32 and ppc64.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14278
2014-08-14 16:54:48 +00:00
Julian Seward
039cf7d64d arm64: enable test cases for:
uqshrn{2}, sqrshrun{2}, sqshrun{2} (vector, imm)
sqxtn{2}, uqxtn{2}, sqxtun{2} (vector and scalar)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14257
2014-08-11 13:59:49 +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
Julian Seward
a6f286d17d Enable tests for: sq{r}dmulh (scalar vs elem, vector vs elem),
sqshl, uqshl, sqrshl, uqrshl (reg) (vector and scalar).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14231
2014-08-04 08:11:33 +00:00
Julian Seward
ef338c8739 Enable test cases for:
{sqdmlal,sqdmlsl,sqdmull}{d_s_s[],s_h_h[]}
{sqdmlal,sqdmlsl,sqdmull}{d_s_s,s_h_h}
{sqdmlal,sqdmlsl,sqdmull}{2d_(2s_2s)/(4s_4s), 4s_(4h_4h)/(8h_8h)}
sqrdmulh 4s,2s,8h,4h (vector)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14180
2014-07-22 09:28:52 +00:00
Julian Seward
be6732dc77 Enable tests for: sqneg, {u,s}q{add,sub} (scalar),
{sqdmlal,sqdmlsl,sqdmull} (vector x element).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14177
2014-07-21 09:20:53 +00:00
Mark Wielaard
93ad03c5bb Omit frame pointer also for main in ppc ldst_multiple test.
Other functions already explicitly omitted the frame pointer. Also
do that for main to prevent gcc 4.8.2 complaining:

 ldst_multiple.c: In function ‘main’:
 ldst_multiple.c:180:5: error: frame pointer required, but reserved
  int main(void)
      ^
 ldst_multiple.c:31:18: note: for ‘r31’
  register HWord_t r31 asm("r31");

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14173
2014-07-17 13:29:43 +00:00
Julian Seward
c7447dcad0 add test cases for "LD1/ST1 (multiple 1-elem structs to/from 2 regs,
post index)" (16b only)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14162
2014-07-15 11:09:51 +00:00
Julian Seward
5a254c7950 arm64: enable test cases for:
{sli,sri} (vector & scalar), sqabs (vector & scalar)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14152
2014-07-11 12:06:24 +00:00
Julian Seward
26296e07c9 Enable test cases for: shll #imm, shrn #imm, rshrn #imm,
{smlal,umlal,smlsl,umlsl,smull,umull} (elem)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14148
2014-07-10 14:23:16 +00:00
Julian Seward
3aa62684fd arm64:
Add support for checking FPSR.QC effects of each instruction.
Implement: sadalp uadalp saddlp uaddlp saddlv uaddlv saddw{2} uaddw{2}
ssubw{2} usubw{2} shadd uhadd shsub uhsub sqadd uqadd sqsub uqsub
smaxp umaxp sminp uminp



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14121
2014-06-30 07:35:19 +00:00
Julian Seward
86e47e554c Enable test cases for: sabal uabal sabdl uabdl saddl uaddl ssubl usubl
smlal umlal smlsl umlsl smull umull


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14119
2014-06-28 12:22:22 +00:00
Bart Van Assche
175075e035 Make none/tests/filter_ioctl_moans executable
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14117
2014-06-28 07:39:47 +00:00
Bart Van Assche
980d6c2a8c Make moans about unknown ioctls more informative (#336772)
This is a slightly modified version of a patch from Ivo Raisr <ivosh@ivosh.net>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14116
2014-06-28 07:18:33 +00:00
Julian Seward
5e2364ac36 Enable test cases for: rev32, rev64, saba, uaba, sabd, uabd.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14115
2014-06-27 10:44:14 +00:00
Julian Seward
8fc646a429 arm64: add/enable testcases:
pmul, pmull, rbit, rev16,
LD1/ST1 (multiple 1-elem structs to/from 3 regs, no offset)
LD3/ST3 (multiple 3-elem structs to/from 3/regs, post index)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14110
2014-06-26 12:40:54 +00:00
Bart Van Assche
9214c37d49 Rename --defaultsupp into --default-suppressions as requested by Julian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14090
2014-06-24 05:08:21 +00:00
Julian Seward
5f9fc28e82 Enable more test cases:
ins (vec[], vec[])
mla, mls, mul (vec, vec, vec[])
various more movi/mvni cases
not 16b/8b



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14083
2014-06-23 09:10:20 +00:00
Bart Van Assche
44c59fd7ea Make none/tests/cmdline[12] pass again
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14082
2014-06-22 11:13:47 +00:00
Julian Seward
b79c843632 Enable/enhance test cases for: dup_{d_d[], s_s[], h_h[], b_b[]}, ext
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14054
2014-06-19 22:21:28 +00:00
Julian Seward
1a1ee7a2c7 Enable test cases for: orr_{8h,4h}_imm8_shifted,
orr_{4s,2s}_imm8_shifted, bic_{8h,4h}_imm8_shifted,
bic_{4s,2s}_imm8_shifted, cls_std6_std6, cm{eq,ge,gt,hi,hs,tst}_d_d_d,
cm{ge,gt,le,lt}_d_d_zero, cnt_{16,8}b_{16,8}b




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14052
2014-06-19 14:22:20 +00:00
Julian Seward
1cf00e8338 Enable test cases for instructions implemented today.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14042
2014-06-15 21:56:28 +00:00
Philippe Waroquiers
ceaa5b2efe This patch implements the support needed for stacktraces
showing inlined function calls.
See 278972 valgrind stacktraces and suppression do not handle inlined function call debuginfo

Reading the inlined dwarf call info is activated using the new clo
  --read-inline-info=yes
Default is currently no but an objective is to optimise the performance
and memory in order to possibly set it on by default.
(see below discussion about performances).

Basically, the patch provides the following pieces:
1. Implement a new dwarf3 reader that reads the inlined call info
2. Some performance improvements done for this new parser, and
   on some common code between the new parser and the var info parser.
3. Use the parsed inlined info to produce stacktrace showing inlined calls
4. Use the parsed inlined info in the suppression matching and suppression generation
5. and of course, some reg tests

1. new dwarf3 reader:
---------------------
Two options were possible: add the reading of the inlined info
in the current var info dwarf reader, or add a 2nd reader.
The 2nd approach was preferred, for the following reasons:
The var info reader is slow, memory hungry and quite complex.
Having a separate parsing phase for the inlined information
is simpler/faster when just reading the inlined info.
Possibly, a single parser would be faster when using both
--read-var-info=yes and --read-inline-info=yes.
However, var-info being extremely memory/cpu hungry, it is unlikely
to be used often, and having a separate parsing for inlined info
does in any case make not much difference.
(--read-var-info=yes is also now less interesting thanks to commit
r13991, which provides a fast and low memory "reasonable" location
for an address).

The inlined info parser reads the dwarf info to make calls
to priv_storage.h ML_(addInlInfo).

2. performance optimisations
----------------------------
* the abbrev cache has been improved in revision r14035.
* The new parser skips the non interesting DIEs
  (the var-info parser has no logic to skip uninteresting DIEs).
* Some other minor perf optimisation here and there.
In total now, on a big executable, 15 seconds CPU are needed to
create the inlined info (on my slow x86 pentium).

With regards to memory, the dinfo arena:
with inlined info: 172281856/121085952  max/curr mmap'd
without          : 157892608/106721280  max/curr mmap'd,
So, basically, inlined information costs about 15Mb of memory for
my big executable (compared to first version of the patch, this is
already using less memory, thanks to the strpool deduppoolalloc.
The needed memory can probably be decreased somewhat more.

3. produce better stack traces
------------------------------
VG_(describe_IP) has a new argument InlIPCursor *iipc which allows
to describe inlined function calls by doing repetitive calls 
to describe_IP. See pub_tool_debuginfo.h for a description.

4. suppression generation and matching
--------------------------------------
* suppression generation now also uses an InlIPCursor *iipc
  to generate a line for each inlined fn call.

* suppression matching: to allow suppression matching to
match one IP to several function calls in a suppression entry,
the 'inputCompleter' object (that allows to lazily generate
function or object names for a stacktrace when matching 
an error with a suppression) has been generalised a little bit
more to also lazily generate the input sequence.
VG_(generic_match) has been updated so as to be more generic
with respect to the input completer : when providing an
input completer, VG_(generic_match) does not need anymore
to produce/compute any input itself : this is all delegated
to the input completer.

5. various regtests
-------------------
to test stack traces with inlined calls, and suppressions
of (some of) these errors using inlined fn calls matching.


Work still to do:
-----------------
* improve parsing performance
* improve the memory overhead.
* handling the directory name for files of the inlined function calls is not yet done.
  (probably implies to refactor some code)
* see if m_errormgr.c *offsets arrays cannot be managed via xarray



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14036
2014-06-15 15:42:20 +00:00
Julian Seward
cc3cafc37a Add test cases for LD1R (single structure, replicate).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14032
2014-06-14 18:06:14 +00:00
Florian Krohm
5caf0bf724 Fix the cleanup: line to avoid an error message in case the
file does not exist.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14027
2014-06-12 15:37:15 +00:00
Julian Seward
36bf1f4d67 Add test cases for FMUL 2d_2d_d[], 4s_4s_s[], 2s_2s_s[].
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14026
2014-06-12 13:16:43 +00:00
Julian Seward
d4751b4053 Add tests for movi_4s_#imm8,lsl8 and ushr_d_d_#imm.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14025
2014-06-12 10:13:44 +00:00
Julian Seward
37f5b9dd14 Enable test for movi_{16b,8b}_#imm8.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14021
2014-06-10 22:53:01 +00:00
Julian Seward
db7b04599f Fix out-of-range constants for some 32 bit insns, presumably tolerated
by older assembler versions but not newer ones.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13996
2014-06-04 21:55:16 +00:00
Julian Seward
548a0d2d60 Add test cases for ADC/ADCS/SBC/SBCS. Pertains to #335496.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13995
2014-06-04 13:13:05 +00:00
Dejan Jevtic
f1b4547420 mips64: Tests for Cavium MIPS Octeon Atomic and Count Instructions.
Tests for instructions:
baddu, pop, dpop, saa, saad, laa, laad, lai, laid, lad, ladd, law, lawd,
las, lasd, lac, lacd


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13994
2014-06-04 11:36:21 +00:00