wayland/tests
Fergus Dall e949b3bfbb display-test: Fix a race condition in test suite
Several tests in this suite use setting and checking client.display_stopped (in
test-compositor.h) to synchronise between threads. This is a data race because
display_stopped is a non-atomic int. Fix this by making it an atomic_bool
instead. We don't need to change the access code because reads and writes are
sequentially consistent by default.

This can be reproduced (with both clang and gcc) by running
```
meson -Db_sanitize=thread build
cd build
ninja
meson test
```

Signed-off-by: Fergus Dall <sidereal@google.com>
2022-02-05 14:29:39 +00:00
..
data
array-test.c
client-test.c
compositor-introspection-test.c
connection-test.c
cpp-compile-test.cpp
display-test.c
event-loop-test.c
exec-fd-leak-checker.c
fixed-benchmark.c
fixed-test.c
headers-protocol-core-test.c
headers-protocol-test.c
headers-test.c
interface-test.c
list-test.c
map-test.c
meson.build
message-test.c
newsignal-test.c
os-wrappers-test.c
protocol-logger-test.c
proxy-test.c
queue-test.c
resources-test.c
sanity-test.c
scanner-test.sh
signal-test.c
socket-test.c
test-compositor.c
test-compositor.h display-test: Fix a race condition in test suite 2022-02-05 14:29:39 +00:00
test-helpers.c
test-runner.c
test-runner.h