storaged-project / udisks

The UDisks project provides a daemon, tools and libraries to access and manipulate disks, storage devices and technologies.
http://storaged.org/doc/udisks2-api/latest/
Other
340 stars 143 forks source link

dbus-tests: Kill the system daemon if running #598

Open tbzatek opened 5 years ago

tbzatek commented 5 years ago

(just noting here so I don't forget)

https://github.com/storaged-project/udisks/blob/94e4fef6879f7407fcf7a284cb1c7d7bc71ac3b3/src/tests/dbus-tests/run_tests.py#L217

All block devices are probed synchronously and sequentially on startup before a well known name ownership is requested on the system bus. This can take seconds (or even minutes) on large systems.

The time.sleep(3) in the tests cause system udisks daemon to be autospawned if installed and tests are executed on that one.

Possible solutions:

Issues to solve:

pothos commented 5 years ago

Also: find_daemon(…) in run_tests.py has a code path where daemon_bin is not set. Maybe look for content of /proc/$(pgrep udisksd)/cmdline.