-
Notifications
You must be signed in to change notification settings - Fork 752
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
Fix test failures on newer kernels #921
Conversation
This causes the NETLINK_EXT_ACK socket option to be set and extended error messages to be reported in errors. This should help debug test failures. Also use errors.Is to check for errors because using extended error reporting, the errors no longer match exactly.
Use unix.ByteSliceToString to convert the NULL-terminated NLMSGERR_ATTR_MSG error message.
TestRouteFilterAllTables and TestRouteExtraFields started failing a while ago after GitHub actions images bumped the kernel version from 5.15.x to 6.2.x [1]. This is because newer kernels containing commit [2] started rejecting Tos values with the ECN bits set to non-zero, this leads to the following error being reported when adding routes: invalid argument: Invalid dsfield (tos): ECN bits must be 0 Fix this by using a valid Tos value in TestRouteFilterAllTables and TestRouteExtraFields. [1] vishvananda#773 (comment) [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f55fbb6afb8d
Since kernel commit https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d776e31c841b optional tunnel/BEET mode templates in outbound policies are rejected. Use an inbound policy instead to fix the test failure on newer kernels.
@vishvananda @aboch PTAL. This should fix the CI failures currently seen on the |
Thanks @tklauser for your fixes! Usually we want a commit per PR, but in this case the commits are clearly fixing/improving independent things. Since all changes pertain to UT fix, I will not ask for four independent PRs. LGTM |
Thanks, I wasn't aware of that rule. I'll keep it in mind for future changes. |
Commit 1:
Commit 2:
Commit 3:
Commit 4: