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.

** Changed in: umockdev (Ubuntu)
       Status: New => Fix Committed

** Changed in: umockdev (Ubuntu)
     Assignee: (unassigned) => Martin Pitt (pitti)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1336671

Title:
  Intermittent
  mir_unit_tests.MesaDisplayTest.drm_device_change_event_triggers_handler
  test failure: libumockdev isn't thread safe

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1336671/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to