-
Notifications
You must be signed in to change notification settings - Fork 33
Update MUD tests #726
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
Update MUD tests #726
Conversation
Codecov Report
@@ Coverage Diff @@
## master #726 +/- ##
==========================================
- Coverage 82.30% 82.25% -0.05%
==========================================
Files 29 29
Lines 4181 4181
==========================================
- Hits 3441 3439 -2
- Misses 740 742 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
grafnu
left a comment
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.
Not sure if it was "ready for review" or not, but I had some time so I took a look!
testing/test_base.sh
Outdated
| device_bcast="$device_traffic and ether broadcast" | ||
| device_ucast="$device_traffic and ether dst 9a:02:57:1e:8f:02" | ||
| device_xcast="$device_traffic and ether dst 9a:02:57:1e:8f:03" | ||
| device_ufr1="$device_traffic and ether src 9a:02:57:1e:8f:03" |
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 keep the cntelr_ lines?
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.
Removed
testing/test_base.sh
Outdated
| device_bcast="$device_traffic and ether broadcast" | ||
| device_ucast="$device_traffic and ether dst 9a:02:57:1e:8f:02" | ||
| device_xcast="$device_traffic and ether dst 9a:02:57:1e:8f:03" | ||
| device_ufr1="$device_traffic and ether src 9a:02:57:1e:8f:03" |
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 do you need this line still?
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.
Removed
testing/test_base.sh
Outdated
| bfr3=$($device_bfr3 | wc -l) | ||
| ufr_peer=$($device_ufr_peer | wc -l) | ||
| ufr3=$($device_ufr3 | wc -l) | ||
| echo device $type $(($bfr_peer > 2)) $(($bfr_3 > 2)) $(($ufr_peer > 0)) $(($ufr3 > 0)) | tee -a $TEST_RESULTS |
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.
you don't need the $ in front of $bfr_peer -- it's already in "expression" mode so it's redundant.
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.
Updated
testing/test_base.sh
Outdated
|
|
||
| device_traffic="tcpdump -en -r inst/run-9a02571e8f0$device_num/scans/monitor.pcap port 47808" | ||
| device_bcast="$device_traffic and ether broadcast" | ||
| device_bfr_peer="$device_traffic and ether broadcast and ether src $peer_mac" |
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.
Be consistent with ordering of src & dst
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.
Done
testing/test_base.sh
Outdated
| peer_mac=9a:02:57:1e:8f:0$peer_num | ||
|
|
||
| device_traffic="tcpdump -en -r inst/run-9a02571e8f0$device_num/scans/monitor.pcap port 47808" | ||
| device_bcast="$device_traffic and ether broadcast" |
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.
what's device_bcast for?
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.
Removed
testing/test_base.sh
Outdated
|
|
||
| device_traffic="tcpdump -en -r inst/run-9a02571e8f0$device_num/scans/monitor.pcap port 47808" | ||
| device_bfr_peer="$device_traffic and ether src $peer_mac and ether broadcast" | ||
| device_bfr3="$device_traffic and ether src 9a:02:57:1e:8f:03 and ether broadcast" |
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.
nit: I'd consider extracting the 3rd MAC address to a named variable (assigned right after peer_mac) just for consistency.
No description provided.