Commit Graph

262 Commits

Author SHA1 Message Date
Wildan M ead8ca0043 Add basic test for openat 2026-06-28 15:34:01 +07:00
Wildan M c234ace91d Use ArrayString for Cwd 2026-06-22 22:13:24 +07:00
R Aadarsh 484fe42c0e * Add docs
* Change safety signatures

* Change tests

* Correctly set u/g id
2026-06-15 17:08:11 +05:30
R Aadarsh 0d127d3652 Add more tests 2026-06-15 17:08:11 +05:30
R Aadarsh ad151e0de8 * Correctly determine argv[0]
- If the function called is `posix_spawnp`, and the passed program name **does not** contain a slash, the path is used unmodified, and the path to the directory containing the program on $PATH is prepended to the program's path and assigned to `argv[0]. If the program name **does** contain a slash, the path is absolutised relative to CWD, and assigned to argv[0]

    - If the function called is `posix_spawn`, the behaviour is as described above in the case where path contains a slash

* Add initial tests
2026-06-15 17:08:11 +05:30
Jeremy Soller 4a521f06e1 Merge branch 'fix-shm' into 'master'
fix: shmget: return EINVAL on size overflow

See merge request redox-os/relibc!1439
2026-06-08 06:46:12 -06:00
lyw458372 163c44e523 fix: shmget: return EINVAL on size overflow 2026-06-08 20:27:54 +08:00
lyw458372 5a545a1e26 test: add tm_gmtoff 2026-06-08 19:39:55 +08:00
Jeremy Soller 646687f138 Merge branch 'sem' into 'master'
Fix sem_trywait and sem_wait error handling

See merge request redox-os/relibc!1424
2026-06-05 20:31:58 -06:00
Wildan M 85e6e1e675 Fix sem_trywait and sem_wait error handling 2026-06-05 09:21:50 +07:00
sourceturner ef7b690626 add arpa_inet/inet_addr unit test 2026-06-04 17:33:37 +02:00
Jeremy Soller fafc4c2c00 Merge branch 'epoll-del-test' into 'master'
Add test for EPOLL_CTL_DEL

See merge request redox-os/relibc!1309
2026-06-03 19:27:58 -06:00
Wildan M 6acf560ed0 Fix pthread init and null for C++ 2026-06-04 00:38:58 +07:00
sourceturner abbae3dce6 add basic unit test for posix timers (time/timer) 2026-05-24 19:12:05 +02:00
Wildan M 0f03bff838 Implement pselect and write test 2026-05-22 03:29:57 +07:00
Wildan M bc6ea5ba99 Implement key_t, sys/ipc and sys/shm 2026-05-20 18:51:53 +07:00
Wildan M 74d34ca6e0 Add test for EPOLL_CTL_DEL 2026-05-10 18:02:57 +07:00
Wildan M 19da3a5551 Fix UB in utimes and write test 2026-05-10 08:05:05 +07:00
Wildan M e9c3960c65 Implement nice and write test 2026-05-09 01:23:37 +07:00
Wildan M e9f8b0c697 Merge expect files 2026-05-08 17:57:18 +07:00
Wildan M 796b1d8ef5 Remove empty stderr expect 2026-05-08 17:48:25 +07:00
Wildan M 7aba041004 Implement utimensat 2026-05-05 02:02:43 +07:00
Wildan M 043ec22076 FIx sigjmp_buf and add tests 2026-05-02 16:59:48 +07:00
Mustafa öz 03d56f4887 Add fmtmsg 2026-05-01 06:00:11 +01:00
Wildan M 598d34d8a0 Fix open permission and add umask test 2026-04-30 16:08:05 +07:00
nicoan 2c4a20e71b added tests to scanf and wscanf 2026-04-15 15:38:40 -03:00
nicoan da3ff538d6 WIP: fixing regressions 2026-04-15 14:18:20 -03:00
Zero 5cbb4ba0cc test(unistd): Add alarm(2) test
Introduce a new test for the alarm(2) system call.
This test verifies the behavior of setting, cancelling,
and re-arming alarms, ensuring correct signal delivery
and return values.
2026-03-31 00:09:07 +02:00
Wildan M 38650d994e Fix fnmatch caused oom 2026-03-29 02:20:16 +07:00
Wildan M d7c14e94af Wrap tests in a separate build directory 2026-03-25 03:05:47 +07:00
Wildan M b93e24b1d6 Implement long double in printf 2026-03-04 22:03:31 +07:00
Wildan M d18a4da715 Add failed epollet test 2026-02-11 17:00:17 +07:00
Wildan M e2b8acb05d Add test for data transfer before accept for UDS 2026-02-06 14:17:45 +07:00
Josh Megnauth 02f766b8df Add more 'open' tests 2026-01-24 15:34:24 -07:00
Wildan M 675a60bd9a Fix unixpeername expected stdout 2026-01-22 19:06:29 +07:00
Wildan M 3bf35abeae Add more sys_socket tests 2026-01-16 07:18:13 +07:00
Wildan M 1e587dc77b Add putc_unlocked tests 2026-01-05 12:43:51 +07:00
Wildan M 7d1c3961b5 Implement malloc_usable_size 2026-01-04 02:15:29 +07:00
Wildan M 19d95a226c Add tests for new locale.h functions 2025-12-27 22:25:01 +07:00
Wildan M fc2937b648 Correct out strcpy expected output 2025-12-19 17:15:28 +07:00
Wildan M d902941b14 Use dynamic link for tests 2025-12-18 07:52:26 +07:00
auronandace c2da2a8e47 fix expected output of strcpy test 2025-12-15 08:28:25 +00:00
Jeremy Soller 8ad1d3c110 Merge branch 'fix-netdb-test' into 'master'
Move netdb to varied output test

See merge request redox-os/relibc!766
2025-11-29 06:44:56 -07:00
Wildan M 7e48f2d2fc Move netdb to varied output test 2025-11-28 19:08:32 -08:00
Josh Megnauth 8e5937ca25 Implement posix_fallocate
`posix_fallocate` ensures that a byte range in a file is allocated so
that subsequent writes don't fail. Unlike ftruncate, posix_fallocate
does not shrink files.

The Linux syscall fallocate is similar to posix_fallocate except with
far more control over how byte ranges are allocated (e.g. it supports
file holes and other features). This MR doesn't implement fallocate as
it requires syscall and redoxfs support.

Finally, I changed the flags for flock from usize to c_int. That matches
what we have in libc and also avoids some silly, needless type casting.
2025-11-28 19:49:21 -05:00
Wildan M 8e16c9c80c Fix getsubopt and add test 2025-11-28 06:59:51 -08:00
Josh Megnauth f5d432644f Implement renameat, renameat2
Like the other "at" functions, renameat renames files with respect with
a directory descriptor. "renameat2" is Linux specific but really nice -
it adds a flag which supports atomically swapping two files or failing
if the target already exists. The latter is easily supported in relibc.
The former requires redoxfs support.

Besides the impl itself, I refactored "cap_path_at" into what it really
is: a mini openat2-like function.
2025-10-21 14:47:39 -04:00
Josh Megnauth 85c5e889fb Implement fchmodat
Capability based `fchmod`. I also implemented unit tests for chmod,
fchmod, and fchmodat.

The unit tests check Redox-specific behavior, so some of the tests are
disabled for Linux.
2025-09-21 10:04:11 -04:00
Josh Megnauth c555503a35 Implement readlinkat
Like readlink except capability based. Most of this patch is refactoring
fstatat into a reusable, openat-like private function.
2025-09-18 01:27:55 +00:00
Josh Megnauth c6a9a165ec Implement fdopendir and fdclosedir
`fdopendir` takes ownership of a directory file descriptor instead of
opening one with a path. `fdclosedir` is a FreeBSD extension that
transfers ownership of the file descriptor in DIR to the user.
2025-09-17 08:24:48 -04:00