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

Fix typo in KQueueChannelConfig #12537

Merged
merged 1 commit into from Jul 5, 2022

Conversation

thobe
Copy link
Contributor

@thobe thobe commented Jun 30, 2022

Motivation:

KQueueChannelConfigTest.testRawOption() fails on MacOS due to the buffer for the RawUnixChannelOption being over-allocated when retrieving the option value. Since the limit is not explicitly set (the buffer is just flipped), the limit of the buffer will be based on its size, causing the test to fail.

Modification:

Changes the buffer allocation for getOption of RawUnixChannelOption in KQueueChannelConfig to be based on the length of the option instead of the level. The use of level is likely a typo. The corresponding code in EpollChannelConfig allocates the buffer based on length rather than level.

Result:

One less test failure when building on MacOS (Intel) with JDK 1.8.

Buffer allocation should be based on the length of the option, not on
its level.
This fixes a test failure (KQueueChannelConfigTest.testRawOption) on
MacOS.
@normanmaurer
Copy link
Member

@thobe can you sign our icla please: https://netty.io/s/icla .

Thanks!

@thobe
Copy link
Contributor Author

thobe commented Jun 30, 2022

@normanmaurer sure, I'll need to pass it through the chain of my employer first, since the netty project isn't already on our list of open source projects (it would be good to get on the list though, so that's a sensible thing to do anyhow). I was hoping this particular fix would qualify under "unless your contribution is trivial such as a single line change or a typo fix." mentioned in the developer guide to be able to get it done a little bit quicker.

@normanmaurer
Copy link
Member

@thobe generally speaking we try to get the ICLA signed by everyone, just in case :) I would be surprised if its an issue to sign this as @tjake also did contribute in the past :)

@thobe
Copy link
Contributor Author

thobe commented Jun 30, 2022

If @tjake has contributed before, then I'm surprised the netty project isn't on our list, that might just be an internal bookkeeping mishap. I'll get it sorted out.

@normanmaurer normanmaurer merged commit 29b203f into netty:4.1 Jul 5, 2022
@normanmaurer
Copy link
Member

@thobe thanks for the contribution!

@normanmaurer normanmaurer added this to the 4.1.79.Final milestone Jul 5, 2022
@normanmaurer
Copy link
Member

No porting to main needed.

raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
Motivation:

KQueueChannelConfigTest.testRawOption() fails on MacOS due to the buffer for the RawUnixChannelOption being over-allocated when retrieving the option value. Since the limit is not explicitly set (the buffer is just flipped), the limit of the buffer will be based on its size, causing the test to fail.

Modification:

Changes the buffer allocation for getOption of RawUnixChannelOption in KQueueChannelConfig to be based on the length of the option instead of the level. The use of level is likely a typo. The corresponding code in EpollChannelConfig allocates the buffer based on length rather than level.

Result:

One less test failure when building on MacOS (Intel) with JDK 1.8.
franz1981 pushed a commit to franz1981/netty that referenced this pull request Aug 22, 2022
Motivation:

KQueueChannelConfigTest.testRawOption() fails on MacOS due to the buffer for the RawUnixChannelOption being over-allocated when retrieving the option value. Since the limit is not explicitly set (the buffer is just flipped), the limit of the buffer will be based on its size, causing the test to fail.

Modification:

Changes the buffer allocation for getOption of RawUnixChannelOption in KQueueChannelConfig to be based on the length of the option instead of the level. The use of level is likely a typo. The corresponding code in EpollChannelConfig allocates the buffer based on length rather than level.

Result:

One less test failure when building on MacOS (Intel) with JDK 1.8.
@thobe thobe deleted the fix-KQueueChannelConfig branch October 7, 2022 13:59
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.

None yet

2 participants