martinpitt / umockdev

Mock hardware devices for creating unit tests and bug reporting
https://launchpad.net/umockdev
GNU Lesser General Public License v2.1
308 stars 54 forks source link

"Environment" related crashes #206

Closed hadess closed 1 year ago

hadess commented 1 year ago

The upower test suite randomly crashes in getenv(): https://gitlab.freedesktop.org/upower/upower/-/issues/216

I think that one of the possible reasons is the code that creates the testbed in src/umockdev.vala first creates a worked thread, and then sets UMOCKDEV_DIR. If the worker thread reads from the environment while the main thread is still setting up the environment, that could lead to a crash.

I would recommend:

martinpitt commented 1 year ago

Thanks for the report! I sent a fix to PR #207.

hadess commented 1 year ago

Would it be possible to have this be made available in a release? I can only get one in 10 CI runs to pass in upower right now.

martinpitt commented 1 year ago

Thanks @hadess for the ping (feel free to do it ealier next time). 0.17.17 is released upstream and Fedora koji builds are running (should be on bodhi in a few mins). I also uploaded to Debian unstable.