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 55 forks source link

preload: Wrap fstatfs() #187

Closed martinpitt closed 2 years ago

martinpitt commented 2 years ago

Revert commit 4b1ab11c244a0a488bb. Merely setting $SYSTEMD_DEVICE_VERIFY_SYSFS does not work for GI bindings. Instead, wrap fstatfs() and mangle the type to SYSFS_MAGIC if the path points into our mocked /sys. This satisfies udev.

Fixes https://github.com/systemd/systemd/issues/23499

martinpitt commented 2 years ago

@benzea WDYT?

martinpitt commented 2 years ago

I ran upower's integration tests against this, and they are happy now :tada:

martinpitt commented 2 years ago

This is a quickfix. Follow-ups: