Skip to content
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

Merged
merged 5 commits into from
Oct 18, 2021

Conversation

ossama-othman
Copy link
Member

No description provided.

@ossama-othman ossama-othman added this to the Q4-2021 milestone Oct 18, 2021
@ossama-othman ossama-othman self-assigned this Oct 18, 2021
@coveralls
Copy link

coveralls commented Oct 18, 2021

Pull Request Test Coverage Report for Build 1356611550

Warning: 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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.7%) to 48.768%

Totals Coverage Status
Change from base Build 1347568583: 0.7%
Covered Lines: 970
Relevant Lines: 1989

💛 - Coveralls

Copy link
Member

@mjmartineau mjmartineau left a 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 :)

data + (sizeof(data) / sizeof(data[0]));

for (struct socket_data const *d = data; d != end; ++d)
test_socket_data(d);
Copy link
Member

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!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@mjmartineau
Copy link
Member

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.

Ossama Othman added 3 commits October 18, 2021 13:39
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.
@ossama-othman
Copy link
Member Author

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.

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 socket() call failures with an EPROTONOSUPPORT errno set. Does that address the problem you're seeing?

@ossama-othman
Copy link
Member Author

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 :)

Done.

Copy link
Member

@mjmartineau mjmartineau left a 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.

@ossama-othman ossama-othman merged commit d6a48d4 into multipath-tcp:master Oct 18, 2021
@ossama-othman ossama-othman deleted the mptcpwrap-coverage branch October 18, 2021 22:36
matttbe added a commit to matttbe/mptcpd that referenced this pull request Jan 10, 2024
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>
matttbe added a commit that referenced this pull request Jan 11, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants