I now wrote two test cases for umockdev itself which reproduce the multi-thread errors and pretty much the same errors as the Mir test case. I now made the path redirection to testbed thread-safe for all wrapped functions, which does not yet address all MT issues, but is sufficient for this particular test scenario:
With that I ran that Mir test successfully through 20.000 iterations (with a version without thestd::this_thread::sleep_for(std::chrono::microseconds{500})) . It previously hardly survived two iterations without the sleep, and with the sleep it failed after ~ 1000 iterations on an idle system and ~ a hundred on a loaded one.
I now wrote two test cases for umockdev itself which reproduce the multi-thread errors and pretty much the same errors as the Mir test case. I now made the path redirection to testbed thread-safe for all wrapped functions, which does not yet address all MT issues, but is sufficient for this particular test scenario:
https:/ /github. com/martinpitt/ umockdev/ commit/ 3b852ea23
With that I ran that Mir test successfully through 20.000 iterations (with a version without thestd: :this_thread: :sleep_ for(std: :chrono: :microseconds{ 500})) . It previously hardly survived two iterations without the sleep, and with the sleep it failed after ~ 1000 iterations on an idle system and ~ a hundred on a loaded one.