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

Minor fixes to improve compatibility between the POSIX API and native builds #63866

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

aescolar
Copy link
Member

A set of minor fixes to improve compatibility between the POSIX API and native builds (most getting all POSIX API tests running on native_sim).
This is more obvious when combined with #63855


POSIX API: Fix posix_types.h for native builds

The inclusion of the compiler provided sys/types.h
should depend on not using the host C library,
and not just of building for a native target.

tests posix pthread_pressure: Fix for native targtets

The infinite loop during the test needs to be broken
with a small delay when built for native targets.
Let's add it.
Note that this delay is only added for ARCH_POSIX targets
and not any other.

tests posix getopt: Minor fix for native targets

This test should be compiled without host headers
when built without the host libC, and at the same
time, it does not support building with the host
libC, so let's remove the condition that includes
the host libC header to avoid extra confusion.

tests posix event_fd: Fix for native targets

The infinite loop during the stress needs to be broken
with a small delay when built for native targets.
Let's add it.
Note that this delay is only added for ARCH_POSIX targets
and not any other.

The infinite loop during the stress needs to be broken
with a small delay when built for native targets.
Let's add it.
Note that this delay is only added for ARCH_POSIX targets
and not any other.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test should be compiled without host headers
when built without the host libC, and at the same
time, it does not support building with the host
libC, so let's remove the condition that includes
the host libC header to avoid extra confusion.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The inclusion of the compiler provided sys/types.h
should depend on not using the host C library,
and not just of building for a native target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The infinite loop during the test needs to be broken
with a small delay when built for native targets.
Let's add it.
Note that this delay is only added for ARCH_POSIX targets
and not any other.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
@aescolar aescolar marked this pull request as ready for review October 12, 2023 13:58
@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Oct 12, 2023
@aescolar aescolar added this to the v3.6.0 milestone Oct 12, 2023
Copy link
Member

@jukkar jukkar left a comment

Choose a reason for hiding this comment

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

LGTM

@carlescufi carlescufi merged commit 826c54e into zephyrproject-rtos:main Oct 20, 2023
27 checks passed
@aescolar aescolar deleted the posix_api_native_fixes branch October 20, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants