Cleanup Network Tests and Network Test Module#565
Conversation
docker/modules/Dockerfile.faux1
Outdated
| RUN $AG update && $AG install -y telnetd && $AG install xinetd nginx | ||
|
|
||
| COPY subset/ntp/NTPClient NTPClient | ||
| COPY subset/network/NTPClient NTPClient |
There was a problem hiding this comment.
this shouldn't still be in subset/ -- it should be moved to docker/include/network
there should be no dependency on the subset/ folder from faux
There was a problem hiding this comment.
@grafnu I was planning to address the dependancy as a separate PR as it involved other test modules too. I'll update to pick up the network module changes here
testing/test_aux.sh
Outdated
| interfaces: | ||
| faux-1: | ||
| opts: brute broadcast_client ntpv4 | ||
| opts: brute broadcast_client ntpv4 arp |
There was a problem hiding this comment.
why is this enabled for everything? Whatever it's for, that's not the right way... If it's truly always required then it should be the default behavior, otherwise all three of these should not have it (what's the point?)
There was a problem hiding this comment.
Ah, that would have been a much better, thanks. This is related to the min_send test which always passes, but might have a different summary depending if there are any ARP packets. As there seems to be some chance it might not, this periodically sends ARP packets so the result is always as expected.
Codecov Report
@@ Coverage Diff @@
## master #565 +/- ##
==========================================
- Coverage 80.78% 80.28% -0.51%
==========================================
Files 22 22
Lines 3753 3753
==========================================
- Hits 3032 3013 -19
- Misses 721 740 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
pisuke
left a comment
There was a problem hiding this comment.
All looks good to me, thanks!
| bin/bacnet_discover loop & | ||
| fi | ||
|
|
||
| if [ -n "${options[curl]}" ]; then |
There was a problem hiding this comment.
curl should still be optional since it's not default behavior for every case
|
Thanks @grafnu for reviewing again, I'd appreciate your input because I'm not sure what the best way to proceed is. The issue I'm trying to resolve is a an unpredictable result summary in the Travis report output from the general network tests (communication_type and min_send). From 7 test_aux runs I've done, 2 have failed . One was due to one faux device not sending ARP packets, the other not sending unicast packets. This respective changed the report summary by omitting a few words. I may be wrong, but I don't think this can be predicted. Therefore I think 'arpsend' and 'curl' (or alternative to send a data packet) is needed as default behavior for test_aux only, but not for the faux devices generally, to ensure predictable behavior. Alternatively, as these tests rely on reading monitor.pcap, For 2/3 of the faux devices I could add pre-prepared packet capture files and configure the test module to read that instead of the actual monitor scan. That way can at least have some test of skip/fail conditions. The test would still run normally on one of the faux devices. Not ideal, might be better than three tests with the same result. Do you think there is a better way? |
|
@grafnu does @noursaidi 's suggestion sound good in the short term to get this PR merged? |
|
@pisuke @grafnu I was thinking that instead I could add a configuration to enable/disable the sub tests from module_config, and disable the problematic general network tests in the Travis CI tests. This means the coverage of testing in Travis CI remains identical after this PR as it did before. I do think it is important to have proper coverage of all test, and then this can be discussed and addressed properly in a separate issue/PR rather. |
|
For the short term, I'd make the arp send a default for faux. It's not
"wrong" but having it always on in faux should make it the easiest to clean
up. At the same time we should file a bug/issue to get it (arp being the
default) cleaned up.
Module configs are bad because then it's just making everything more messy
to work around this one case.
Doing pre-prepared capture packets correctly is likely harder than you
think, so I wouldn't go down that route. (Basically you can't closely tie
it in with the test itself, which means you need some mechanism to mock
them out, which means more work than you expect.)
The likely solution is to increase the monitoring time, but I'm not sure.
That would just be my guess about a flaky connection.
I don't understand why making 'curl' default should be necessary. But for
now, can you just make arp the default and we'll go from there. And I
don't mean "arp is enabled on everything" like you had before, but more
that 'arp' is the default and there would be an explicit option (xarp) to
NOT do it.
…On Mon, Aug 3, 2020 at 3:48 AM Noureddine ***@***.***> wrote:
@pisuke <https://github.com/pisuke> @grafnu <https://github.com/grafnu> I
was thinking that instead I could add a configuration to enable/disable the
sub tests from module_config, and disable the problematic general network
tests in the Travis CI tests. This means the coverage of testing in Travis
CI remains identical after this PR as it did before.
I do think it is important to have proper coverage of all test, and then
this can be discussed and addressed properly in a separate issue/PR rather.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#565 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPD4FJXRD5GPKG7RVC5TR62IYVANCNFSM4PMKLNSA>
.
|
|
Really appreciate your thoughts and feedback @grafnu, thanks. I've restored curl and made xarp an option as as suggested. Here is a run of 12 test_aux runs, passes 11. https://travis-ci.com/github/noursaidi/daq/builds/178423661. 'curl' default was overkill, only faux-3 needed something to periodically send data. The other 2 had NTP which satisfies this. |
| if [ -n "${options[curl]}" ]; then | ||
| echo Starting curl loop. | ||
| (while true; do curl -o - http://google.com; sleep 1; done) & | ||
| fi |
There was a problem hiding this comment.
nit: blank line after this block
|
Great -- 11/12 passing is fine. If there's still flakiness then we can deal
with it separately. PR approved with just a minor formatting comment.
…On Tue, Aug 4, 2020 at 10:28 AM Noureddine ***@***.***> wrote:
Really appreciate your thoughts and feedback @grafnu
<https://github.com/grafnu>, thanks. I've restored curl and made xarp an
option as as suggested.
Here is a run of 12 test_aux runs, passes 11.
https://travis-ci.com/github/noursaidi/daq/builds/178423661.
'curl' default was overkill, only faux-3 needed something to periodically
send data. The other 2 had NTP which satisfies this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#565 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPDZZ3F3NR2OHSG6PLI3R7BALTANCNFSM4PMKLNSA>
.
|
* removed depreciated code and moved ntp and macoui tests into network module
PR to clean up the network tests and network test module. Summary of changes:
subset/ntpcombined into existing network modulesubset/connectiondirectory, combined into existing network module