tests: don't use the same chip object from different threads
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 19 Sep 2023 09:31:40 +0000 (11:31 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 25 Sep 2023 07:00:10 +0000 (09:00 +0200)
commitec76ea717bc2aa4f083c22928c76cbfe0bc38e83
tree03988070c87272dc066051a189a2541f8925fb40
parent2dc9cc08f15c1bdc0d3f04739b9e401c96aaa6c3
tests: don't use the same chip object from different threads

There are no thread-safety guarantees in libgpiod. Let's not reuse the
chip object created in one thread to generate info events in another but
create a second chip for that purpose instead.

Reported-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Erik Schilling <erik.schilling@linaro.org>
tests/tests-info-event.c