Skip to content

posix: some lib and test file renames. canonical header order. split kconfig into smaller pieces #60081

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

Merged
merged 7 commits into from
Jul 6, 2023

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Jul 6, 2023

A few housekeeping changes that should make sense when commits are viewed separately.

Splitting Kconfig into smaller files is a bit of a precursor to sysconf support, organizing items by standard Option Requirements, and providing standard POSIX feature test macros (part of the LTSv3 Roadmap).

  • tests: posix: reduce test name verbosity
  • posix: add Meta copyright as appropriate
  • tests: posix: rename some files for brevity
  • tests: posix: use standard headers and canonical order (see Improve header structure and usage #41543)
  • tests: posix: nanosleep: condense test cases
  • posix: rename some files for brevity
  • posix: split supported features into separate Kconfig files

Testsuite summary for tests/posix/common before

 - PASS - [posix_apis.test_fnmatch] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_0_1000000000] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_0_1001] duration = 0.013 seconds
 - PASS - [posix_apis.test_nanosleep_0_1] duration = 0.020 seconds
 - PASS - [posix_apis.test_nanosleep_0_500000000] duration = 0.510 seconds
 - PASS - [posix_apis.test_nanosleep_0_n1] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_1_0] duration = 1.008 seconds
 - PASS - [posix_apis.test_nanosleep_1_1001] duration = 1.020 seconds
 - PASS - [posix_apis.test_nanosleep_1_1] duration = 1.020 seconds
 - PASS - [posix_apis.test_nanosleep_NULL_NULL] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_NULL_notNULL] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_n1_0] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_n1_n1] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_notNULL_NULL] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_notNULL_notNULL] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_req_is_rem] duration = 0.013 seconds
 - PASS - [posix_apis.test_posix_clock] duration = 1.010 seconds
 - PASS - [posix_apis.test_posix_cond_resource_exhausted] duration = 0.001 seconds
 - PASS - [posix_apis.test_posix_cond_resource_leak] duration = 0.001 seconds
 - PASS - [posix_apis.test_posix_mqueue] duration = 0.017 seconds
 - PASS - [posix_apis.test_posix_multiple_threads_single_key] duration = 0.003 seconds
 - PASS - [posix_apis.test_posix_mutex_resource_exhausted] duration = 0.001 seconds
 - PASS - [posix_apis.test_posix_mutex_resource_leak] duration = 0.001 seconds
 - PASS - [posix_apis.test_posix_normal_mutex] duration = 0.213 seconds
 - PASS - [posix_apis.test_posix_pthread_create_negative] duration = 0.001 seconds
 - PASS - [posix_apis.test_posix_pthread_error_condition] duration = 0.001 seconds
 - PASS - [posix_apis.test_posix_pthread_execution] duration = 2.437 seconds
 - PASS - [posix_apis.test_posix_pthread_termination] duration = 1.009 seconds
 - PASS - [posix_apis.test_posix_realtime] duration = 1.999 seconds
 - PASS - [posix_apis.test_posix_recursive_mutex] duration = 0.001 seconds
 - PASS - [posix_apis.test_posix_rw_lock] duration = 0.138 seconds
 - PASS - [posix_apis.test_posix_semaphore] duration = 5.009 seconds
 - PASS - [posix_apis.test_posix_single_thread_multiple_keys] duration = 0.002 seconds
 - PASS - [posix_apis.test_posix_thread_attr_stacksize] duration = 0.001 seconds
 - PASS - [posix_apis.test_posix_timer] duration = 2.115 seconds
 - PASS - [posix_apis.test_pthread_descriptor_leak] duration = 4.399 seconds
 - PASS - [posix_apis.test_sched_policy] duration = 0.002 seconds
 - PASS - [posix_apis.test_sleep] duration = 4.027 seconds
 - PASS - [posix_apis.test_spin_descriptor_leak] duration = 0.001 seconds
 - PASS - [posix_apis.test_spin_init_destroy] duration = 0.001 seconds
 - PASS - [posix_apis.test_spin_lock_unlock] duration = 0.001 seconds
 - PASS - [posix_apis.test_usleep] duration = 1.536 seconds

after

 - PASS - [posix_apis.test_clock] duration = 1.006 seconds
 - PASS - [posix_apis.test_cond_resource_exhausted] duration = 0.001 seconds
 - PASS - [posix_apis.test_cond_resource_leak] duration = 0.001 seconds
 - PASS - [posix_apis.test_fnmatch] duration = 0.001 seconds
 - PASS - [posix_apis.test_key_1toN_thread] duration = 0.003 seconds
 - PASS - [posix_apis.test_key_Nto1_thread] duration = 0.002 seconds
 - PASS - [posix_apis.test_mqueue] duration = 0.019 seconds
 - PASS - [posix_apis.test_mutex_normal] duration = 0.219 seconds
 - PASS - [posix_apis.test_mutex_recursive] duration = 0.001 seconds
 - PASS - [posix_apis.test_mutex_resource_exhausted] duration = 0.001 seconds
 - PASS - [posix_apis.test_mutex_resource_leak] duration = 0.001 seconds
 - PASS - [posix_apis.test_nanosleep_errors_errno] duration = 2.055 seconds
 - PASS - [posix_apis.test_nanosleep_execution] duration = 3.599 seconds
 - PASS - [posix_apis.test_pthread_attr_stacksize] duration = 0.001 seconds
 - PASS - [posix_apis.test_pthread_create_negative] duration = 0.001 seconds
 - PASS - [posix_apis.test_pthread_descriptor_leak] duration = 4.397 seconds
 - PASS - [posix_apis.test_pthread_errors_errno] duration = 0.001 seconds
 - PASS - [posix_apis.test_pthread_execution] duration = 2.439 seconds
 - PASS - [posix_apis.test_pthread_termination] duration = 1.009 seconds
 - PASS - [posix_apis.test_realtime] duration = 1.999 seconds
 - PASS - [posix_apis.test_rw_lock] duration = 0.140 seconds
 - PASS - [posix_apis.test_sched_policy] duration = 0.002 seconds
 - PASS - [posix_apis.test_semaphore] duration = 5.007 seconds
 - PASS - [posix_apis.test_sleep] duration = 4.030 seconds
 - PASS - [posix_apis.test_spin_descriptor_leak] duration = 0.001 seconds
 - PASS - [posix_apis.test_spin_init_destroy] duration = 0.001 seconds
 - PASS - [posix_apis.test_spin_lock_unlock] duration = 0.001 seconds
 - PASS - [posix_apis.test_timer] duration = 2.116 seconds
 - PASS - [posix_apis.test_usleep] duration = 1.540 seconds

@cfriedt cfriedt force-pushed the posix-testsuite-cleanup branch 2 times, most recently from 7bd4832 to 7b7d11a Compare July 6, 2023 10:37
cfriedt added 6 commits July 6, 2023 08:10
There were a number of tests that started with `test_posix_..`.

The `test_` prefix is necessary, but the `posix_` part is self-
evident, so it makes sense to shorten that.

Signed-off-by: Christopher Friedt <[email protected]>
A significant enough portion of these files has been
changed to justify adding Meta copyright as well as
that of the original author.

Signed-off-by: Christopher Friedt <[email protected]>
This makes the POSIX common testsuite consistent with some
other testsuites.

Signed-off-by: Christopher Friedt <[email protected]>
The POSIX testsuite should be run with standard POSIX
header locations.

Additionally, reorder headers to follow the recommendation
in zephyrproject-rtos#41543.

Signed-off-by: Christopher Friedt <[email protected]>
Most Zephyr testsuites do not break tests down to the level of
granularity that `nanosleep()` tests, and this change makes
reports less verbose.

This change makes the `nonosleep()` test cases
significantly less verbose.

Signed-off-by: Christopher Friedt <[email protected]>
Most of the posix source files can be easily identified by a
short name. I.e. most of the `pthread_` prefixed files do not
need the `pthread_` prefix.

Signed-off-by: Christopher Friedt <[email protected]>
@cfriedt cfriedt force-pushed the posix-testsuite-cleanup branch from 7b7d11a to 7198c27 Compare July 6, 2023 12:10
This change is setting up for switching over to proper POSIX
option requirements, feature test macros, and a dependency
structure that is reflective of the standard.

Signed-off-by: Christopher Friedt <[email protected]>
@cfriedt cfriedt force-pushed the posix-testsuite-cleanup branch from 7198c27 to be6f05e Compare July 6, 2023 12:13
@cfriedt cfriedt marked this pull request as ready for review July 6, 2023 12:51
@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Jul 6, 2023
@cfriedt cfriedt requested a review from ycsin July 6, 2023 14:44
@cfriedt cfriedt merged commit 13dcf2e into zephyrproject-rtos:main Jul 6, 2023
@cfriedt cfriedt deleted the posix-testsuite-cleanup branch July 6, 2023 15:47
@cfriedt cfriedt mentioned this pull request Jul 7, 2023
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.

4 participants