Commit Graph

8 Commits

Author SHA1 Message Date
Dodji Seketeli
324996d24c Shut down a helgrind false positive in the "system" libc call
* tests/test-valgrind-suppressions.supp: Add a suppression that
	occurs during an internal libc signal handling occasion.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-03-17 09:02:19 +01:00
Dodji Seketeli
bca7132b47 Make Helgrind suppressions less specific to libgcc_s version
* tests/test-valgrind-suppressions.supp: Make Helgrind
	suppressions less specific to libgcc_s version.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-03-02 12:49:52 +01:00
Dodji Seketeli
3df69aa10e More Helgrind suppressions
* tests/test-valgrind-suppressions.supp: More specific suppressions.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-03-02 12:29:38 +01:00
Dodji Seketeli
70a476bd34 Silence Helgrind reports about exception stack unwinding
* tests/test-valgrind-suppressions.supp: Silence Helgrind reports
	about exception stack unwinding.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-03-02 11:55:30 +01:00
Dodji Seketeli
5867425971 Make the helgrind suppressions less specific
* tests/test-valgrind-suppressions.supp: Make the ostream writting
	suppressions be less specific so that they can apply to all the
	related false positives.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-03-01 16:17:31 +01:00
Dodji Seketeli
0ebb20c6c2 Move test-read-dwarf.cc to abigail::workers
Moving this test away from using pthreads directly to use
abigail::workers.

This patch also updates the valgrind suppression file to suppress some
Helgrind false positives.  Those are due to:
  - libstdc++ apparently having some benign data races when emitting
  data to ostream.  This seems related to some facet manipulation that
  happen at that point.
  - some benign data race in some elfutils functions.

	* tests/test-read-dwarf.cc (iospec, spec_lock, write_lock)
	(out_abi_base, in_elf_base, in_abi_base): Remove these global
	variables.
	(handle_in_out_spec): Remove this.
	(struct test_task): Write this task that does what
	handle_in_out_spec was doing.
	(test_task_sptr): Define new typedef.
	(main): Remove the pthreads artifacts.  Use the new test_task type
	along with the abigail::workers interface.
	* tests/test-valgrind-suppressions.supp: Add more helgrind
	suppressions for ostream writting false positives.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-03-01 14:34:58 +01:00
Dodji Seketeli
8327d61b66 Add a "make check-valgrind-helgrind-recursive" target
* tests/Makefile.am (check-valgrind-helgrind-recursive): New
	target to run the tests recursively under the control of
	Valgrind's Helgrind tool.
	* tests/test-valgrind-suppressions.supp: Update this suppression
	file with suppressions for Helgrind.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-02-27 10:01:06 +01:00
Dodji Seketeli
3dbe842159 Support running "make check-valgrind"
This patch allows maintainers to run:

     make -C <builddir>/tests check-valgrind

This runs the test suite under the Valgrind memory checker.

It also adds this target:

   make -C <builddir>/tests check-valgrind-memcheck-recursive

It runs the memcheck tool on the tests so that programs forked by them
are memchecked too.  This is to allow to memcheck the libabigail tools
that are forked by the individual tests.

	* autoconf-archive/ax_valgrind_check.m4: Add new file.  Copied it
	from http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html.
	* configure.ac: Include the new ax_valgrind_check.m4 file.
	Initialize the valgrind checking on tests.  Update the configure
	status.
	* tests/test-valgrind-suppressions.supp: New valgrind suppression
	file to silence memcheck leak errors from python.
	* tests/Makefile.am: Add test-valgrind-suppressions.supp to source
	distribution.  Add check-valgrind-memcheck-recursive target.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-05-22 23:20:12 +02:00