-
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 mptcpwrap code coverage. #169
tests: Expand mptcpwrap code coverage. #169
Conversation
Pull Request Test Coverage Report for Build 1356611550Warning: 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 |
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 works fine for me with a clean build, but I had a few stumbling blocks first.
When I checked out the branch in an existing workspace, then did make
and make check
, it failed in test-mptcpwrap. Might have been a stale libmptcpwrap? In any case, a clean build fixed it.
Also suggest adding a check to make sure the LD_PRELOAD
environment variable is set, with a helpful error message, in case of user error :)
tests/mptcpwrap-tester.c
Outdated
data + (sizeof(data) / sizeof(data[0])); | ||
|
||
for (struct socket_data const *d = data; d != end; ++d) | ||
test_socket_data(d); |
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.
When running tests in a loop like this, the failure output looks the same for every case so it takes some work to figure out what failed. Something simple like printing the array index on failure will help!
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.
Oh yeah, important info I forgot to include in the first comment: Fedora doesn't load the SCTP module by default, so that was my first failure. |
Some platforms don't support SCTP out of the box, triggering the socket() call with the IPPROTO_SCTP to fail. Ignore the error if the EPROTONOSUPPORT errno is set.
That's strange. I ran the test without failure on my vanilla Fedore 34 Server build. In any case, the latest set changes now ignores |
Done. |
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.
Thanks for the fixes! Looks good.
I retried with a cleanly-booted Fedora 34 desktop machine, and do see the WARNING: Ignoring unsupported protocol: 132 - sctp
message.
This file could be missing, which will cause getprotobynumber() to return NULL. The returned pointer is used to mention the protocol name in a warning message, not critical. Instead, we can simply display 'Unknown' next to the protocol ID. Fixes: d6a48d4 ("tests: Expand mptcpwrap code coverage. (multipath-tcp#169)") Reported-by: Aurelien Jarno <aurel32@debian.org> Closes: https://bugs.debian.org/1060285 Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
This file could be missing, which will cause getprotobynumber() to return NULL. The returned pointer is used to mention the protocol name in a warning message, not critical. Instead, we can simply display 'Unknown' next to the protocol ID. Fixes: d6a48d4 ("tests: Expand mptcpwrap code coverage. (#169)") Reported-by: Aurelien Jarno <aurel32@debian.org> Closes: https://bugs.debian.org/1060285 Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
No description provided.