-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gsd-rfkill mock #223
Add gsd-rfkill mock #223
Conversation
e750530
to
2713fcf
Compare
Looking at the (downloaded) logs I fail to see why |
@agx: There's several ruff, black, and pylint errors, starting here: https://github.com/martinpitt/python-dbusmock/actions/runs/11702695738/job/32591410796?pr=223#step:4:677 |
It's not even Both Under strace, the tests hang in
and that's it. No exits, no signals, no meaningful errnos other than EGAIN. Initially I suspected something along "each test leaks some fd or memory D-Bus connection, and collectively they run out", but disabling a few other big tests doesn't change it. After disabling test_{api,cli,bluez5,code}.py, the run looks like
However, running the exact same set of tests explicitly works:
Disabling just So @agx , sorry, this left me with a huge puzzle, and needs a lot more time thrown at it 😢 |
@agx ah, thanks for the update, that seems to have done it. I also just noticed that the pylint test started to fail 5 days ago, apparently after Fedora got a new pylint version. Also, bluez now added some console beautification, that needs a test adjustment. I'll fix that separately, then you can rebase. (I haven't reviewed your changes yet, sorry) |
I could reproduce locally and
already failed. It seems the multiple calls to EDIT: it's the call to |
This can be useful to test behavior of dependent components like desktop shells. Single properties can be toggled via ``` gdbus call --session -d org.gnome.SettingsDaemon.Rfkill -o /org/gnome/SettingsDaemon/Rfkill -m org.freedesktop.DBus.Properties.Set 'org.gnome.SettingsDaemon.Rfkill' 'BluetoothHasAirplaneMode' "<true>" ``` and airplane mode for all wwan/bt/wifi at once: ``` gdbus call --session -d org.gnome.SettingsDaemon.Rfkill -o /org/gnome/SettingsDaemon/Rfkill -m org.freedesktop.DBus.Mock.SetAirplaneMode true ``` Signed-off-by: Guido Günther <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH this is the kind of "fairly easy/shallow" mock that I'd really rather intended to keep in the respective tests that use them -- for any concrete test that shouldn't be more than 10 lines or so.
But I suppose that ship has sailed with low_memory_monitor.py or gnome_screensaver.py, so it's hard to say no now 😁
So if that's somehow useful for you to maintain in this central location, ok!
Thanks!
The major upside of having it upstream is that there are tests and that it makes it easy to use it from multiple projects. So if it's not too much of a burden having it merged would be great. |
This can be useful to test behavior of dependent components like desktop shells.
Single properties can be toggled via
and airplane mode for all wwan/bt/wifi at once:
I can see that this might be to DE specific but I thought I'd submit it as it might be useful to others.