168 Commits

Author SHA1 Message Date
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
f3240d6950 Filter out everything after "(below main)" in a line. This will help with
Darwin, for which such entries can occur within the executable, rather than
within libc.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9142
2009-02-12 00:51:50 +00:00
Nicholas Nethercote
f0f8b48fcf Merge the non-Darwin parts of r9140 (install vgpreload .dSYMs), just to keep
the trunk and DARWIN branch in sync.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9141
2009-02-12 00:30:02 +00:00
Nicholas Nethercote
5e97a0524e Filter out "(core dumped)" after "Bus error" for consistency. This makes
shell_zerolength pass on my Ubuntu 8.10 machine.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9134
2009-02-11 00:21:53 +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
Tom Hughes
6917b2e4e4 SSE3 and SSSE3 are two different things, so add a proper SSSE3 feature
test and use that to guard the SSSE3 tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8942
2009-01-12 15:26:59 +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
Bart Van Assche
2ae55aa144 Filtered out platform-dependent error messages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7744
2008-03-22 07:52:44 +00:00
Nicholas Nethercote
2e4c67743e Ignore Emacs temporary files. Also, produce the correct .diff filename when
the .exp filename has a non-numeric suffix.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7538
2008-03-02 22:48:14 +00:00
Nicholas Nethercote
745f47f01c Make comments reflect the code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7494
2008-02-27 18:10:19 +00:00
Julian Seward
e70c4211ff Marginally enhance help message.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7258
2007-11-30 21:24:05 +00:00
Julian Seward
e63e873227 Merge (from branches/THRCHECK) r7043:
Allow a test to have any number of .stderr.exp* files, so long as at
least one is found.  In fact the comments in the code that claimed
that .stderr.exp[0-9] are the only ones allowed were misleading;
.stderr.exp* has always been allowed.  The only functional change here
is to mandate that at least one such file exists; prior to the change
the script mandated that at least a .stderr.exp (with no other suffix)
file existed.

Purpose is to allow collections of .stderr.exp files with suffixes
arranged in some meaningful way, eg, foo.stderr.exp-glibc25-amd64.
This might help in making testsuites more maintainable when there
have to be multiple .stderr.exp files.  Naming them merely as
.stderr.exp1, .stderr.exp2, etc, makes it impossible to remember
what the differences between the files actually is.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7127
2007-11-09 23:29:46 +00:00
Nicholas Nethercote
62eed24c67 Merged the MASSIF2 branch to the trunk. Main changes:
- ms_main.c: completely overhauled.

- massif/tests/*:  lots of them now.

- massif/perf/:  added.

- massif/hp2ps:  removed.  No longer used.

- vg_regtest: renamed the previously unused "posttest" notion to "post".
  Using it for checking ms_print's output.

Although the code has changed dramatically, as has the form of the tool's
output, the information presented in the output is basically the same,
although it's now (hopefully) much more useful.  So the tool name is
unchanged.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7069
2007-11-01 04:40:37 +00:00
Julian Seward
043bf89f2a Minor tidying for regtests on AIX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6395
2006-12-12 01:38:15 +00:00
Nicholas Nethercote
8b2049f475 Update a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6373
2006-11-26 22:49:58 +00:00
Nicholas Nethercote
aa2ce63f67 Add --valgrind-lib, to complement --valgrind, to the regtests script
(from Dave Nomura).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6338
2006-10-23 18:38:35 +00:00
Julian Seward
5b26b045dd Change a bunch of pointer <-> int casts to pointer <-> long casts so
as to stop gcc complaining so much on 64-bit platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6306
2006-10-17 11:09:03 +00:00
Julian Seward
2e44b6c1d4 Don't use -C0 for diff; apparently this is a GNU-ism.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6300
2006-10-17 02:24:51 +00:00
Julian Seward
68452584af Merge r6143: Deal with ppc{32,64}-aix5.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6279
2006-10-17 01:49:50 +00:00
Julian Seward
dbe5eabe5c Merge r6142:
Minor enhancements, including dealing with 6-digit PIDs, dealing with
object names of the form "foo.a(bar.o)", and removing debuglog level
zero output.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6278
2006-10-17 01:48:41 +00:00
Julian Seward
6be6614e3a Regression tests for SSE3 support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5997
2006-08-05 12:22:52 +00:00
Julian Seward
d419c4762b Read extra args for all tests from $EXTRA_REGTEST_OPTS, which is
useful (eg) for running tests with --sanity-level= set.  Print a
big warning before and after the tests if it is set.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5931
2006-05-26 00:13:21 +00:00
Tom Hughes
e09a583342 Suppress any source filename in a "(below main)" line in a stack trace.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5847
2006-04-13 12:44:31 +00:00
Nicholas Nethercote
0ec806741e Add an optional post-test check. Based on a patch from Josef W.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5817
2006-04-03 14:25:23 +00:00
Nicholas Nethercote
991367c922 Merge in the COMPVBITS branch to the trunk. This is a big change to
Memcheck, replacing the 9-bits-per-byte shadow memory representation to a
2-bits-per-byte representation (with possibly a little more on the side) by
taking advantage of the fact that extremely few memory bytes are partially
defined.

For the SPEC2k benchmarks with "test" inputs, this speeds up Memcheck by a
(geometric mean) factor of 1.20, and reduces the size of shadow memory by a
(geometric mean) factor of 4.26.

At the same time, Addrcheck is removed.  It hadn't worked for quite some
time, and with these improvements in Memcheck its raisons-d'etre have
shrivelled so much that it's not worth the effort to keep around.  Hooray!

Nb: this code hasn't been tested on PPC.  If things go wrong, look first in
the fast stack-handling functions (eg. mc_new_mem_stack_160,
MC_(helperc_MAKE_STACK_UNINIT)).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5791
2006-03-27 11:37:07 +00:00
Julian Seward
6020f3dc10 Do ppc32 tests on ppc64-capable platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5495
2006-01-04 03:08:16 +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
Julian Seward
2e4ca6e583 Don't confuse ppc32 and ppc64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5472
2006-01-02 16:24:03 +00:00
Nicholas Nethercote
6fd30a473c Remove dead line.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5322
2005-12-09 21:01:46 +00:00
Nicholas Nethercote
bf86440453 Fail gracefully if 'make check' hasn't been run.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5317
2005-12-08 22:39:04 +00:00
Nicholas Nethercote
e72b808c98 Make regtests work with --enable-inner.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5098
2005-11-12 16:08:09 +00:00
Tom Hughes
8cc5ae14db Allow 32 bit x86 tests to run on amd64 machines.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5087
2005-11-11 14:33:43 +00:00
Julian Seward
33f62a359f Do cpu string identification right, so the ppc32-specific tests
actually get run.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5076
2005-11-10 23:30:21 +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
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Nicholas Nethercote
7310d60c12 Fix ppc32 regtest execution. Thanks to Jeroen Witmond for spotting it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4628
2005-09-13 00:45:14 +00:00
Nicholas Nethercote
3ac510b85e Use the standard #ifdefs for arch-specific code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4297
2005-07-30 01:22:37 +00:00
Nicholas Nethercote
fbf8653c8b Removed the remnants of the attempt at an ARM port, because it had
bit-rotted badly and was clogging up the code.

I put the useful remnants in docs/porting-to-ARM in case anyone ever
wants to try porting to ARM again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4092
2005-07-02 23:13:59 +00:00
Nicholas Nethercote
7a954963d7 Try to make toobig-allocs work on 64-bit platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4061
2005-06-30 02:34:32 +00:00
Nicholas Nethercote
e074647282 Fix vg_regtests so it can properly handle alternative output filenames with
more than one numeric char at the end (eg. xml1.stderr.exp64).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4050
2005-06-29 04:02:24 +00:00
Nicholas Nethercote
a1527f6993 Move a heap of tests from corecheck/tests/ into none/tests/. There's
no real point in having them in corecheck/tests since they're not testing
anything that Nulgrind doesn't provide.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4048
2005-06-29 03:46:32 +00:00
Donna Robinson
b655e45a8e argh! there were loads of the little beggars ....
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3999
2005-06-23 00:17:51 +00:00
Julian Seward
10a5136151 ppc32-linux build fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3987
2005-06-21 10:11:36 +00:00
Nicholas Nethercote
3ae4d1a0ab A cleanup of the redirection stuff.
- Renamed VG_INTERCEPT as VG_REPLACE_FUNCTION to make its purpose
  clearer.

- Renamed VG_WRAPPER as VG_NOTIFY_ON_LOAD to make its purpose cleare.
  Started calling that stuff "load notification".

- Moved various things into m_redir.c, a much more sensible place for
  them.  This reduced the number of exported functions overall.  Renamed
  intercept_demangle() as Z_decode() as part of this.

- Improved the documentation of this stuff, especially in
  pub_core_redir.c.

- Got --run-libc-freeres=yes working again.  It was doing nothing.

- Renamed vg_inject.so as vg_preload_core.so to match
  vg_preload_<tool>.so

- Renamed vg_intercept.c as vg_preloaded.c.  (I kept the "vg_" prefix
  because this filename can appear in stack traces, so the "vg_" is a
  useful hint for users that it belongs to Valgrind.)

- Removed all the Memcheck-specific calls to add_redirect_sym_to_sym()
  from VG_(setup_redirect_table)(), instead using VG_REPLACE_FUNCTION in
  mac_replace_strmem.c, just like vg_replace_malloc.c.  This is the
  right way to do it.  This required moving some of
  coregrind/pub_core_redir.h into the newly added
  include/pub_tool_redir.h.  add_redirect_sym_to_sym() is no longer
  used...

- Now only handing off symbols to m_redir for inspection/decoding after
  they have been deemed to be interesting by the symbol table reader.

- Factored out commonality between the add_redirect_*_to_* functions
  into add_redirect_X_to_X().

- Added "Zh", meaning '-' ('h' for "hyphen"), to the Z-decoding scheme,
  to handle sonames like "ld-linux-x86-64.so.2".

- Added a FAQ explaining the newly found issue of glibc aliasing 
  sometimes causing the wrong function name to appear in stack traces.

- Added a new regtest strchr.c.  It's possible this will fail on some
  platforms.  If so, an alternative output file can be provided, but
  I'd like to see it in practice first.

It's possible that there will be minor breakage on other
platforms/setups, but it should be minimal and easily fixable.

Plus some ordinary cleanups in symtab.c:

- Removed the old optimisation from VG_(addStr)() whereby it kept track
  of the previous 5 added strings and avoiding duplicating any of them.
  Turns out it was barely having any effect any more, and just
  complicated things.

- Made read_symtab() more readable, by introducing a new variable
  "sym_name" and introducing the auxiliary function
  is_symbol_interesting().

- renamed the module variable 'segInfo' as 'segInfo_list' to make it
  more obvious it's a module variable and not just some ordinary local
  variable (which was an easy mistake to make).

-----------------------------------------------------------------------------

XXX: [later] remove add_redirect_sym_to_sym, and everything related to
     X_to_sym?  (ie. only need X_to_addr)

XXX: better function names?  all those 'resolved' names...
     [later...]




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3916
2005-06-16 03:56:58 +00:00
Nicholas Nethercote
fe432113e6 A crucial, crucial change: update my email address.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3632
2005-05-08 02:10:27 +00:00
Nicholas Nethercote
5ef4243598 Default to using --leak-check=summary.
MERGED FROM CVS HEAD



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3312
2005-03-12 20:38:13 +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
Julian Seward
7c542ccd39 Add new files resulting from merging in the 2.4.0 line. Many of these
seem to be simply duplication of the x86 instruction set tests into
the addrcheck and helgrind trees.  I'm not sure what this duplication
achieves.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3264
2005-03-10 23:23:45 +00:00
Julian Seward
a2bac50f58 Un-break regtests (again)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3209
2004-12-20 05:44:49 +00:00