-
Notifications
You must be signed in to change notification settings - Fork 39
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
tests: Expand mptcpd start/stop test. #194
tests: Expand mptcpd start/stop test. #194
Conversation
Test mptcpd start and stop when MPTCP is both disabled and enabled.
Pull Request Test Coverage Report for Build 1625372049Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Only run the individual enabled/disabled MPTCP test cases if the "enabled" value can be set non-interactively.
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.
Seems to be a bash syntax issue
# 2, depending on the kernel in use. For example, the | ||
# multipath-tcp.org kernel "enabled" value could be 1 or 2. Use the | ||
# old "enabled" value in case it is 2 instead of 1. | ||
if [ $old_value -ne 0 ] |
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.
My system complains here:
tests/test-start-stop: line 23: [: too many arguments
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.
Fixed by commit ef905e7.
The regex didn't correctly handle multiple net.mptcp
sysctl variables with enabled
in them. In particular, the 5.13 kernel on my Ubuntu box only has net.mptcp.enabled
whereas the 5.15 kernel, for example, also has a net.mptcp.checksum_enabled
variable, resulting in multiple values being assigned to the $old_value
shell variable.
The regular expression used to detect the MPTCP "enabled" sysctl variable did not support the case where multiple net.mptcp sysctl variables contain "enabled" in them. For example recent upstream kernels have net.mptcp.checksum_enabled and net.mptcp.enable sysctl variable. Both values would end up being placed in the to shell variable used to store the old variable resulting in a syntax error when performing an integer comparison, e.g. [ 0 1 -ne 0 ]. Simplify the regular expressions and leverage built-in pattern matching in the sysctl command.
Expected content of Interactive
|
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.
Regex fix works for me, I see the expected output in both sudo and non-sudo cases.
Test mptcpd start and stop when MPTCP is both disabled and enabled.