-
Notifications
You must be signed in to change notification settings - Fork 2k
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
netdev: Provide test network device with netdev interface #1731
Conversation
e15d78b
to
30d53a0
Compare
Is there anything sensible to be done about:
If not and the member is needed I think the warning should be suppressed. |
30d53a0
to
a804889
Compare
a804889
to
559964d
Compare
Rebased to master |
876e7b9
to
559964d
Compare
I think there should be no random element in a unittest. |
This test does not change the API, right? (remove label if agree) |
Done. |
@LudwigOrtmann You won't believe how much errors I already found because of random elements in unittests ;-) |
I want a telephone joker. |
☎️ 🃏 😜 |
Thank ye! |
But seriously, I think unit tests must be reproducible. |
(I would happily ACK some fuzzer test external to the unit tests for selected interfaces.) |
Happy? |
Medium .. I would have retained the macros (maybe renaming them) in Either way - you should remove the shell commands from |
Done |
I don't get why Travis isn't building for the telosb, wsn430-v1_3b, wsn430-v1_4 and z1 :( |
rebase required |
c3813f4
to
d98c125
Compare
Done |
@@ -29,11 +44,23 @@ DISABLE_MODULE += auto_init | |||
# Pull in `Makefile.include`s from the test suites: | |||
-include $(UNIT_TESTS:%=$(RIOTBASE)/tests/unittests/%/Makefile.include) | |||
|
|||
ifneq (,$(filter netdev_dummy,$(USEMODULE))) | |||
USEMODULE += netdev_base | |||
DIRS += netdev_dummy |
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.
This shouldn't be.
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.
Why not?
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.
netdev_dummy
is a module that is only really useful or sensible in the context of unittests. So why not define it's dependencies in the Makefile of unittests?
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.
Because it has no advantage and deviates from standard practice.
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.
But: I overlooked, that the interface is actually part of the tests/unittests
structure, so I'm fine with it staying as it is.
OK, squash and off we go =) |
Uck |
32847ee
to
0de7883
Compare
The reasoning behind this commit is twofold: 1. test the "lower" part (the device part) of netdev 2. provide a well defined testing infrastructure for modules that utilise netdev The actual tests that represent 1. are provided in the following commit
* tests if net_dev_dummy is correct and if driver part of net_dev is correct
netdev: Provide test network device with netdev interface
The reasoning behind this PR is twofold:
To test this, run
Depends on #1492:(it's merged)