-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There was a very elaborate mocking setup in the net device code involving `cfg(not(test))`, but the only point of it all was to be able to test the scenario where `tap.write_iovec` or `tap.read` return an error. We do not need mocking to achieve this though: We can simply close the tap fd. Thus remove all the mocking, and update the negative tests to close the fd. I had half a mind to just delete the tests, as currently we are not sensibly handling errors in device emulation anyway, so the assertions these tests make aren't exactly useful. However, once we implement device reset, this will probably change, so let's keep the tests. Signed-off-by: Patrick Roy <[email protected]>
- Loading branch information
Showing
3 changed files
with
11 additions
and
84 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
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
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