This repository has been archived by the owner on May 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
device: Allow uevent handler to be stopped
Pass a context to `waitForDevice()` to allow the goroutine started by this function to be stopped. This specifically for testing purposes. Due to how and where `waitForDevice()` is called, this change required adding a `context` parameter to a number of other functions, notable to the `deviceHandler` and `storageHandler` functions. Also moved the `timeoutHotplug` `const` variable to `device.go` (where it is actually used) and made it a true `var` to allow the tests to manipulate it. Enabling the stopping of the uevent handler also allowed a lot of new unit tests to be added. Signed-off-by: James O. D. Hunt <[email protected]>
- Loading branch information
1 parent
8eb2134
commit d4a22d1
Showing
5 changed files
with
582 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.