Skip to content

tests: net: socketpair: resolve include order issues #55760

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

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Mar 14, 2023

It seems that socketpair tests were not passing on native_posix due to what seems to be an ordering issue in include paths. Normally, system include paths are searched first, and then paths added with -I<path>.

When running the Zephyr testsuite, explicitly use the <zephyr/posix/fcntl.h> header to avoid ambiguity. In the future, we there might be a more elaborate scheme for removing ambiguity for native_posix.

Fixes #54996

Previously, `socketpair()` tests had pulled in the native
`fcntl()` implementation instead of using the Zephyr version
when being run under `native_posix_64`.

Signed-off-by: Christopher Friedt <[email protected]>
@cfriedt cfriedt force-pushed the issues/54996/net-socketpair-fcntl-non-functional-with-socketpair-provided-sockets-on-posix-arch branch 2 times, most recently from 779153d to ba52b72 Compare March 14, 2023 21:18
@cfriedt cfriedt marked this pull request as ready for review March 14, 2023 21:19
@cfriedt cfriedt force-pushed the issues/54996/net-socketpair-fcntl-non-functional-with-socketpair-provided-sockets-on-posix-arch branch from ba52b72 to c09a812 Compare March 14, 2023 22:22
@cfriedt cfriedt merged commit 1c985a8 into zephyrproject-rtos:main Mar 15, 2023
@cfriedt cfriedt deleted the issues/54996/net-socketpair-fcntl-non-functional-with-socketpair-provided-sockets-on-posix-arch branch June 3, 2023 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

net: socketpair: fcntl non-functional with socketpair-provided sockets on posix arch
4 participants