Skip to content

tests: c_lib: thrd: test does not run correctly when minimal libc is configured #98661

@cfriedt

Description

@cfriedt

Describe the bug

Currently, it's not possible to correctly run libraries.libc.c11_threads.minimal due to the presence of select REQUIRES_FULL_LIBC in Kconfig.device_io. The test runs, but not-so-silently selects CONFIG_PICOLIBC=y instead of CONFIG_MINIMAL_LIBC=y.

However, REQUIRES_FULL_LIBC is not actually required for POSIX_DEVICE_IO, and the testcase passes in #97855 without modification.

Slightly related, is that arcmwdt overrides minimal libc and picolibc to use its own configuration (from #98454). That seems like a somewhat strange workaround, if it can be called that, and it isn't clear to if it's the best way to do things.

The regression was introduced in commit fe26de9 and is mostly costmetic. It's not actually required any functional requirements at this time.

Regression

  • This is a regression.

Steps to reproduce

  1. In main, run west build -p auto -b mps2/an385 -t run tests/lib/c_lib/thrd/ -T libraries.libc.c11_threads.minimal
  2. Note that CONFIG_MINIMAL_LIBC=y is not set in build/zephyr/.config, and there is a warning
warning: The choice symbol MINIMAL_LIBC (defined at lib/libc/Kconfig:86) was selected (set =y), but
PICOLIBC (defined at lib/libc/Kconfig:100) ended up as the choice selection.

Check out this branch https://github.com/cfriedt/zephyr/tree/deprecate-config-posix-api
Run the same tests as above, and observe that the test completes successfully (for all platforms in CI).

Relevant log output

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

  • OS: any
  • Toolchain: Zephyr SDK v0.17.4
  • Commit SHA or Version Used: 3af17bf

Additional Context

No response

Metadata

Metadata

Assignees

Labels

area: POSIXPOSIX API Libraryarea: TestsIssues related to a particular existing or missing testbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions