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
--run-trigger argument #38
Comments
I just implemented this. Here's a couple test runs on Linux LockscreenThis execution makes the buskill app immediately execute the
Use with
|
…ger is functioning properly without having to actually remove a USB drive * #38 * #14 (comment) * https://stackoverflow.com/questions/74090470/simulating-a-hotplug-event-with-libusb-test-debugging
I tried-out the latest build on my Mac Mini in the MacStadium cloud, and--for the first time ever--I was able to trigger a lockscreen on that system. Awesome.
Curiously, it spat out a ton of DEBUG output before waiting for my prompt, but it's good enough for now |
This has been implemented in the |
The previous implentation of --run-trigger just called `bk.TRIGGER_FUNCTION()` directly. This was a problem, however, because a *real* trigger would execute the callback function running inside a non-root child process. So testing via --run-trigger wouldn't work for simulating, for example, the non-root child process trying to communicate to the root child process for executing the soft-shutdown trigger on MacOS. This commit changes the functionality to call the callback function, just as would happen with a *real* hotplug removal event. * #14 (comment) * #38
I had to make some changes to this implementation such that it would call the actual callback function, rather than the trigger function directly. This allows us to properly test things like the non-root child that's listening for usb hotplug events to communicate with the root child that's needed to execute triggers like the soft-shutdown trigger. For more info, see: |
This issue will track adding a
--run-trigger
argument that will immediately execute the trigger (eglock-screen
orsoft-shutdown
)Is your feature request related to a problem? Please describe.
There should be an easier way to test that triggers work without having to fiddle with USB drives. This is especially important for testing on VM or headless systems.
Describe the solution you'd like
I should be able to execute
...and the screen should lock (ok, maybe after confirming with the user that they really want to proceed)
The text was updated successfully, but these errors were encountered: