summaryrefslogtreecommitdiff
path: root/test/meson.build
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-07-15 15:41:14 +0100
committerSimon McVittie <smcv@collabora.com>2022-07-18 11:15:54 +0000
commitbef88fd5627f2d990915c9009982107a8e329ef5 (patch)
tree629403df44f1e564e9b47e5f4ee0d01b95ef5041 /test/meson.build
parent11e6c92e9521ef55ceb0b421c5d077d5793c71d5 (diff)
downloaddbus-bef88fd5627f2d990915c9009982107a8e329ef5.tar.gz
test/bus: Break up dispatch test into three separate tests
This is really three separate test-cases: one for traditional activation as a direct child process of the dbus-daemon, and two for traditional activation (successful and failing) via the setuid dbus-daemon-launch-helper on Unix. The ones where activation succeeds extremely slow, as a result of the instrumentation for simulating malloc() failures combined with a large number of memory operations, particularly when using AddressSanitizer. Splitting up "OOM" tests like these has a disproportionately good impact on the time they take, because the simulated malloc() failure instrumentation repeats the entire test making the first malloc() fail, then making the second malloc() fail, and so on. For allocation failures in the second half of the test, this means we repeat the first half of the test with no malloc() failures a very large number of times, which is not a good use of time, because we already tested it successfully. Even when not using the "OOM" instrumentation, splitting up these tests lets them run in parallel, which is also a major time saving. Needless to say, this speeds up testing considerably. On my modern but unexceptional x86 laptop, in a typical debug build with Meson, the old dispatch test took just over 21 minutes, which drops to about 40 seconds each for the new normal-activation and helper-activation tests (and for most of that time, they're running in parallel, so the wall-clock time taken for the whole test suite is somewhere around a minute). In a debug build with Meson, gcc and AddressSanitizer, the old dispatch test takes longer than my patience will allow, and the new separate tests take about 5-6 minutes each. Reduce their timeout accordingly, but not as far as the default for slow tests (5 minutes) to allow some headroom for AddressSanitizer or slower systems. The failed-helper-activation test is almost instantaneous, and no longer needs to be marked as slow. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build35
1 files changed, 27 insertions, 8 deletions
diff --git a/test/meson.build b/test/meson.build
index 28e4f0bb..c593a801 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -242,14 +242,6 @@ if embedded_tests
'suite': ['slow'],
},
{
- 'name': 'bus-dispatch',
- 'srcs': [ 'bus/dispatch.c', 'bus/common.c' ],
- 'link': [ libdbus_testutils, libdbus_daemon_internal, ],
- 'install': false,
- 'suite': ['slow'],
- 'timeout': 3000,
- },
- {
'name': 'marshal-recursive',
'srcs': [
'internals/dbus-marshal-recursive-util.c',
@@ -273,9 +265,36 @@ if embedded_tests
},
]
+ if use_traditional_activation
+ tests += [
+ {
+ 'name': 'bus-normal-activation',
+ 'srcs': [ 'bus/normal-activation.c', 'bus/common.c' ],
+ 'link': [ libdbus_testutils, libdbus_daemon_internal, ],
+ 'install': false,
+ 'suite': ['slow'],
+ 'timeout': 1000,
+ },
+ ]
+ endif
+
if use_traditional_activation and platform_unix
tests += [
{
+ 'name': 'bus-failed-helper-activation',
+ 'srcs': [ 'bus/failed-helper-activation.c', 'bus/common.c' ],
+ 'link': [ libdbus_testutils, libdbus_daemon_internal, ],
+ 'install': false,
+ },
+ {
+ 'name': 'bus-helper-activation',
+ 'srcs': [ 'bus/helper-activation.c', 'bus/common.c' ],
+ 'link': [ libdbus_testutils, libdbus_daemon_internal, ],
+ 'install': false,
+ 'suite': ['slow'],
+ 'timeout': 1000,
+ },
+ {
'name': 'bus-launch-helper-oom',
'srcs': [ 'bus/launch-helper-oom.c' ],
'link': [ libdbus_testutils, liblaunch_helper_internal, ],