GNOME Bugzilla – Bug 792845
test-enumerator-filter fails with assertion failed: (umockdev_in_mock_environment ()) using umockdev 0.9.4 or later
Last modified: 2018-01-24 11:58:49 UTC
Created attachment 367339 [details] [review] Proposed patch Since umockdev 0.9.4, rather than checking for libumockdev-preload being in LD_PRELOAD, umockdev_in_mock_environment now checks whether /sys is being redirected. This only occurs when $UMOCKDEV_DIR is set, which happens inside umockdev_testbed_new, so the assertion must come after this call. The attached patch fixes this.
Created attachment 367370 [details] [review] tests: Fix test assertion with umockdev Since 0.9.4, rather than checking for libumockdev-preload being in LD_PRELOAD, umockdev_in_mock_environment now checks whether /sys is being redirected. This only occurs when $UMOCKDEV_DIR is set, which happens inside umockdev_testbed_new, so the assertion must come after this call.
Tested with an earlier umockdev, and test still passes. Thanks! Attachment 367370 [details] pushed as bf8664a - tests: Fix test assertion with umockdev