libabigail/tests
Dodji Seketeli c022243aac Fix a race condition in queue::priv::do_bring_workers_down
It can happen that queue::priv_::do_bring_workers_down stays forever
waiting for a task to finish (via pthread_join).  The it waits for is
itself blocked in worker::wait_to_execute_a_task, in pthread_cond_wait.

It seems to me that this is because we forget to lock the
queue::priv::queue_cond_mutex before inspecting and updating the
variables on which the wait on the condition depend.

This patch fixes that.

The patch also moves tests/test-read-write.cc over to using the work queue
to increase test coverage for the work queue interface.

	* src/abg-workers.cc (queue::priv::tasks_todo_mutex): Make this
	data member mutable.
	(more_tasks_to_execute):
	(queue::priv::do_bring_workers_down): Update the
	queue::priv::bring_workers_down only in the critical section
	defined by queue::priv::queue_cond_mutex.
	(worker::wait_to_execute_a_task): Testing for
	queue::priv::bring_workers_down is done in the critical section
	defined by queue::priv::queue_cond_mutex.  The loop over waiting
	ont the condition is also in the critical section, as it ought to
	be.
	* tests/test-read-write.cc (struct test_task): New type.
	(main): Express in terms of the new test_task type.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-04-18 04:21:13 -04:00
..
data Bug 21296 - Reporting diff of const ref against non-const ref aborts 2017-03-24 12:39:49 +01:00
Makefile.am Launch fedabipkgdiff tests first 2017-03-24 13:09:32 +01:00
mockfedabipkgdiff.in Bug 20087 - Clean cache before or after ABI comparison 2017-03-22 15:43:37 +01:00
print-diff-tree.cc
runtestcanonicalizetypes.sh.in Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
runtestdefaultsupprs.py.in Fix python interpreter path for el6 2016-06-28 09:12:40 +02:00
runtestfedabipkgdiff.py.in Bug 20087 - Clean cache before or after ABI comparison 2017-03-22 15:43:37 +01:00
test-abicompat.cc Implement a [suppress_file] suppression directive 2016-05-08 12:39:26 +02:00
test-abidiff-exit.cc Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
test-abidiff.cc Update copyright notice for abg-fwd.h, abg-ir.h and test-abidiff.cc 2017-01-16 15:36:20 +01:00
test-alt-dwarf-file.cc
test-annotate.cc Fix virtual members sorting to unbreak the build on EL6 2017-03-03 12:56:44 +01:00
test-core-diff.cc
test-diff2.cc
test-diff-dwarf-abixml.cc Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
test-diff-dwarf.cc Bug 21296 - Reporting diff of const ref against non-const ref aborts 2017-03-24 12:39:49 +01:00
test-diff-filter.cc Bug 18754 - Add the "--no-added-syms" option to abidiff 2017-01-05 13:44:25 +01:00
test-diff-pkg.cc Bug 21228 - Handle cloning union member functions 2017-03-07 11:50:56 +01:00
test-diff-suppr.cc Bug 21058 - abipkgdiff wrongly drops non-public types 2017-01-18 10:14:02 +01:00
test-dot.cc
test-ir-walker.cc
test-lookup-syms.cc
test-read-dwarf.cc Move test-read-dwarf.cc to abigail::workers 2017-03-01 14:34:58 +01:00
test-read-write.cc Fix a race condition in queue::priv::do_bring_workers_down 2017-04-18 04:21:13 -04:00
test-svg.cc
test-types-stability.cc Bug 19204 - libabigail aborts on DWARF referencing non-existing DIE 2016-01-21 10:48:32 +01:00
test-utils.cc
test-utils.h
test-valgrind-suppressions.supp Shut down a helgrind false positive in the "system" libc call 2017-03-17 09:02:19 +01:00
test-write-read-archive.cc
update-test-output.py Rename tests/update-test-read-dwarf-output.py 2016-12-02 12:59:32 +01:00