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

posix: move limit definitions to posix/sys/limits.h #80469

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Oct 26, 2024

Rather than defining values that should appear in limits.h in posix_features.h, move them to a separate file.

Undefine any externally defined POSIX limits, since Zephyr would prefer to define those based on Kconfig values.

Additionally, convert runtime invariant values to constant if they should be constant.

Fixes #80409

Testing done

$ twister --retry-failed 3 -T tests/posix/
INFO    - Using Ninja..
INFO    - Zephyr version: v3.7.0-5485-ge5ea33b2407c
INFO    - Using 'zephyr' toolchain.
INFO    - Selecting default platforms per test case
INFO    - Building initial testsuite list...
INFO    - Writing JSON report /home/cfriedt/zephyrproject/zephyr/twister-out/testplan.json
INFO    - JOBS: 32
INFO    - Adding tasks to the queue...
INFO    - Added initial list of jobs to queue
INFO    - Total complete: 2790/2790  100%  built (not run):    9, skipped: 2329, failed:    0, error:    0
INFO    - 62 test scenarios (2790 test instances) selected, 2329 configurations skipped (2255 by static filter, 74 at runtime).
INFO    - 452 of 2790 test configurations passed (98.05%), 9 built (not run), 0 failed, 0 errored, 2329 skipped with 0 warnings in 1019.28 seconds
INFO    - In total 13820 test cases were executed, 77881 skipped on 45 out of total 859 platforms (5.24%)
INFO    - 452 test configurations executed on platforms, 9 test configurations were only built.
INFO    - Saving reports...
INFO    - Writing JSON report /home/cfriedt/zephyrproject/zephyr/twister-out/twister.json
INFO    - Writing xunit report /home/cfriedt/zephyrproject/zephyr/twister-out/twister.xml...
INFO    - Writing xunit report /home/cfriedt/zephyrproject/zephyr/twister-out/twister_report.xml...
INFO    - Run completed

Note

Running clang-format does not produce code that passes compliance checks due to strangeness with COND_CODE_1(), so some lines are manually formatted (as they had been in posix_features.h).

@cfriedt cfriedt force-pushed the posix-limits-and-features-rework branch from 85c45f0 to 97e71ee Compare October 26, 2024 11:50
@cfriedt cfriedt marked this pull request as ready for review October 26, 2024 13:48
@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Oct 26, 2024
@zephyrbot zephyrbot requested a review from ycsin October 26, 2024 13:49
ycsin
ycsin previously approved these changes Oct 29, 2024
@kartben
Copy link
Collaborator

kartben commented Nov 26, 2024

@keith-packard can you please take a look?

@kartben
Copy link
Collaborator

kartben commented Jan 9, 2025

@cfriedt This will need a rebase

Rather than defining values that should appear in limits.h in
posix_features.h, move them to a separate file.

Undefine any externally defined POSIX limits, since Zephyr
would prefer to define those based on Kconfig values.

Signed-off-by: Chris Friedt <[email protected]>
@cfriedt cfriedt force-pushed the posix-limits-and-features-rework branch from 97e71ee to 4362362 Compare January 10, 2025 12:48
@cfriedt
Copy link
Member Author

cfriedt commented Jan 10, 2025

  • rebased

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.

Zephyr defines POSIX values which already appear in limits.h
5 participants