[PATCH libinput 2/2] test: remove NOTPARALLEL

Peter Hutterer peter.hutterer at who-t.net
Thu Jul 7 10:31:47 UTC 2016


We can now run the tests in parallel with make check -j <n>, even though results are
mixed: on an i7 here make -j 4 is reliable, on a under-resourced VM running on
an i5 make -j2 is the best I can do, anything higher fails with timeouts
possibly because of the udev lock contention (see 030ec053fbbc).

There is one test in device.test (device_reenable_syspath_changed) that fails
if another device is added/removed at the wrong time and it's reliable to
trigger that failure. The tests are split up into parallel and serial tests,
for the serial tests we have to manually add dependencies to avoid executing
them in parallel with others.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
I'm not sure if it's a good idea merging this one. I've timed bunch of runs
and a -j1 is north of 30 minutes. make check -j2  is aroudn 13 minutes here,
-j4 is the same. Anything higher tends to cause test case failures because
we're now timing out on some tests. I did an test with a whole lot of forks
and a timeout of a minute and it finished in 20 minutes.

So long story short: .NOTPARALLEL guarantees it will succeeds, albeit not
very quickly. Removing is only reliable-ish on -j2, beyond that it will
likely fail. So that would require custom makeflags for libinput which is
less than ideal. We could add MAKEFLAGS to the environment, but really, I
think it may be better to just leave it as-is.

Either way, patches are now on the list and thus archived for all eternity.

 test/Makefile.am | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index acb2de7..4e7a728 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -74,13 +74,12 @@ liblitest_la_LIBADD += $(LIBUNWIND_LIBS) -ldl
 liblitest_la_CFLAGS += $(LIBUNWIND_CFLAGS)
 endif
 
-run_tests = \
+parallel_tests = \
 	touchpad.test \
 	touchpad-tap.test \
 	touchpad-buttons.test \
 	pad.test \
 	tablet.test \
-	device.test \
 	gestures.test \
 	pointer.test \
 	touch.test \
@@ -93,6 +92,14 @@ run_tests = \
 	keyboard.test \
 	litest-selftest.test
 
+# serial tests require a manual dependency for testname.log, see below
+serial_tests = \
+	device.test
+
+run_tests = \
+	    $(parallel_tests) \
+	    $(serial_tests)
+
 build_tests = \
 	build-cxx.test \
 	build-linker.test \
@@ -103,8 +110,6 @@ noinst_PROGRAMS = $(build_tests) $(run_tests)
 noinst_SCRIPTS = symbols-leak-test
 TESTS = $(run_tests) symbols-leak-test
 
-.NOTPARALLEL:
-
 udev_test_SOURCES = udev.c
 udev_test_LDADD = $(TEST_LIBS)
 udev_test_LDFLAGS = -no-install
@@ -197,6 +202,11 @@ build_cxx_test_CXXFLAGS = -Wall -Wextra -Wno-unused-parameter $(AM_CXXFLAGS)
 
 AM_TESTS_ENVIRONMENT= LITEST_VERBOSE=1; export LITEST_VERBOSE;
 
+# serial tests require a manual dependency to avoid parallel execution
+device.log: $(parallel_tests:.test=.log)
+# add any further serial tests as:
+# testname.log: device.log
+
 if HAVE_VALGRIND
 VALGRIND_FLAGS=--leak-check=full \
 	       --quiet \
-- 
2.7.4



More information about the wayland-devel mailing list