mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
This commit adds implementation and tests for posix_getdents(). The implementation used getdents() as a reference. Updates rtems/programs/gsoc#69 rtems&24
25 lines
931 B
Plaintext
25 lines
931 B
Plaintext
*** BEGIN OF TEST PSXGETDENTS01 ***
|
|
Testing posix_getdents() error conditions
|
|
posix_getdents(-1, buffer, size, 0) -- EBADF
|
|
posix_getdents(999, buffer, size, 0) -- EBADF
|
|
posix_getdents(fd, buffer, 0, 0) -- EINVAL
|
|
posix_getdents(fd, buffer, small_size, 0) -- EINVAL
|
|
posix_getdents(file_fd, buffer, size, 0) -- ENOTDIR
|
|
Testing posix_getdents() basic functionality
|
|
Opening and reading root directory
|
|
Read 560 bytes from root directory
|
|
Testing /tmp directory
|
|
Read 0 bytes from /tmp directory
|
|
Testing posix_getdents() directory entry parsing
|
|
Creating test directory structure
|
|
Parsing 560 bytes of directory entries
|
|
Entry: 'test_file.txt', type: 8, reclen: 280
|
|
Entry: 'subdir', type: 4, reclen: 280
|
|
Found 2 directory entries
|
|
Testing posix_getdents() file type detection
|
|
Creating files of different types
|
|
File: 'regular_file', type: 8
|
|
File: 'directory', type: 4
|
|
*** END OF TEST PSXGETDENTS01 ***
|
|
|