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: fs: refactor posix_file_system_r #83395

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Dec 26, 2024

  • tests: posix: fs: increase ztest stack size from 1k to 2k

  • correct arguments to readdir_r() in tests/posix/fs/src/test_fs_dir.c

  • move struct posix_fs_desc to fs_priv.h

  • move POSIX_FILE_SYSTEM_R code to file_system_r.c and separate Kconfig

@cfriedt cfriedt force-pushed the fix-readdir-r branch 3 times, most recently from db11023 to a104447 Compare December 26, 2024 10:47
@cfriedt cfriedt requested a review from ycsin December 26, 2024 10:50
@cfriedt cfriedt marked this pull request as ready for review December 26, 2024 10:51
@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Dec 26, 2024
@cfriedt cfriedt changed the title tests: posix: fs: correct arguments to readdir_r() posix: fs: refactor posix_file_system_r Dec 26, 2024
@cfriedt cfriedt marked this pull request as draft December 26, 2024 13:13
@cfriedt cfriedt force-pushed the fix-readdir-r branch 2 times, most recently from 7dbd1fb to 05cdff0 Compare December 26, 2024 14:54
@cfriedt cfriedt marked this pull request as ready for review December 26, 2024 14:55
@cfriedt cfriedt requested a review from de-nordic December 26, 2024 14:56
@cfriedt cfriedt added the area: Tests Issues related to a particular existing or missing test label Dec 26, 2024
The default stack size was causing qemu_arc/qemu_arc_em and
qemu_arc/qemu_arc_hs to fail when a dirent object was
stack-allocated.

Increase the default stack size to accomodate for additional
usage.

Signed-off-by: Chris Friedt <[email protected]>
Previously, a NULL pointer was passed as the second argument to
readdir_r(). This is incorrect. The passed pointer should be
to a valid, externally-allocated struct direct.

Signed-off-by: Chris Friedt <[email protected]>
Move struct posix_fs_desc to fs_priv.h

Signed-off-by: Chris Friedt <[email protected]>
Move the functionality of POSIX_FILE_SYSTEM_R to its own
compilation unit and remove the unnecessary dependency on
POSIX_FILE_SYSTEM.

Signed-off-by: Chris Friedt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: File System area: POSIX POSIX API Library area: Tests Issues related to a particular existing or missing test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants