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

ADBDEV-6534: Fix IPv6 checking in cdbsenddummypacket unit test #1102

Open
wants to merge 1 commit into
base: adb-7.2.0
Choose a base branch
from

Conversation

silent-observer
Copy link

Fix IPv6 checking in cdbsenddummypacket unit test

cdbsenddummypacket unit test checks for IPv6 availability to skip IPv6-related
tests. However, the checking was not sufficient since if IPv6 is present in
the system but disabled. In that case socket() succeeds, causing the test to
believe IPv6 is available, but later bind() fails with errno = EADDRNOTAVAIL.

This patch fixes the test failing by implementing a more detailed check for
IPv6 availability. This is only necessary for manual runs of this test since
CI pipeline already has IPv6 enabled.

Note: commit b9cb522 is related, but the
complicated IPv6 check there is only necessary because it was used for regular
GPDB operation, requiring it to check non-loopback addresses too. This is not
necessary here because the tests only need loopback IPv6 address to pass, not
full IPv6 support.


To test manually, disable IPv6 on the host machine or run this inside a Docker container with IPv6 disabled. For example, on Ubuntu:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

@silent-observer silent-observer marked this pull request as ready for review October 31, 2024 10:23
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.

1 participant