git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] valgrind in test scripts
@ 2008-10-22 20:28 Jeff King
  2008-10-22 20:29 ` [RFC PATCH 1/5] add valgrind support " Jeff King
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Jeff King @ 2008-10-22 20:28 UTC (permalink / raw)
  To: git

I spent some time last week running git through the paces with
valgrind's memcheck tool. The good news is that I didn't find any
serious issues, so we are doing a pretty good job overall. The bad news
is that running the whole test suite with valgrind takes a few hours on
a quad-core (but thank goodness for "make -j4 test").

I did uncover a few potential problems, and patches are in the latter
part of the series. I suppose an argument could be made that these fixes
are code churn, since these are not problems in practice, but I think
they are worth fixing. The fixes are few in number and small, and we are
very close to a valgrind-error-free code-base, which would make it easy
to spot any new problems when they arise. We could always suppress these
errors, but there is the possibility of an overzealous suppression
masking a real problem (especially if one of these issues changes from
theoretical to practical).

There are a few things I don't like:

 1. The "fake git PATH" is set up by the Makefile, since it needs to
    know which dashed commands to override (based on $(PROGRAMS)).

    I think it would be nicer if the test script itself set this up when
    --memcheck was requested, so that we always know it is fresh. But:

      - if the fake PATH isn't inside the trash directory, then we have
        a problem with multiple tests trying to set it up at the same
        time

      - if the fake PATH is inside the trash directory, I'm not sure of
        the best place to put it, as I don't want to influence the
        outcome of the tests. It could go into .git/valgrind, without
        hurting anything.

 2. I wanted to have a completely clean valgrind run before posting.
    With these patches, the only errors I get are for an uninitialized
    "struct stat" in t4121 and t4127. After much looking (including
    carefully reading the code, and using a a debugger, which shows the
    data in question looking very much initialized) I can't figure out
    what the problem might be. So it might simply be a false positive in
    valgrind, but I would like another set of eyes.

-Peff

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-10-23 16:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-22 20:28 [RFC PATCH 0/5] valgrind in test scripts Jeff King
2008-10-22 20:29 ` [RFC PATCH 1/5] add valgrind support " Jeff King
2008-10-22 22:13   ` Johannes Schindelin
2008-10-23  0:14     ` Junio C Hamano
2008-10-23 15:29       ` Jeff King
2008-10-23 15:19     ` Jeff King
2008-10-22 20:30 ` [RFC PATCH 2/5] valgrind: ignore ldso errors Jeff King
2008-10-22 20:30 ` [RFC PATCH 3/5] correct cache_entry allocation Jeff King
2008-10-22 20:31 ` [RFC PATCH 4/5] pack-objects: avoid reading uninitalized data Jeff King
2008-10-23  1:11   ` Nicolas Pitre
2008-10-23 15:33     ` Jeff King
2008-10-23 16:47       ` Nicolas Pitre
2008-10-22 20:32 ` [RFC PATCH 5/5] fix overlapping memcpy in normalize_absolute_path Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).