Commit Graph

322 Commits

Author SHA1 Message Date
Wildan M bda6ca582a Ignore malloc/usable_size, add tls test 2026-03-17 16:13:41 +07:00
Wildan M 733821e279 Fix makefile commences 2026-03-17 07:31:42 +07:00
Wildan M 96a09e6dc4 Disable failed tests 2026-03-17 07:09:54 +07:00
Wildan M fb07b5f982 Implement getgroups 2026-03-07 11:02:50 +07:00
Anhad Singh 79987da821 misc(tests/Makefile): add pthread/tls
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-02-23 23:55:11 +11:00
Wildan M d18a4da715 Add failed epollet test 2026-02-11 17:00:17 +07:00
Wildan M da2fc2ee5f Add failed fmap test 2026-02-09 21:53:18 +07:00
Wildan M 185265397d Add include test 2026-01-30 23:46:10 +07:00
Josh Megnauth 02f766b8df Add more 'open' tests 2026-01-24 15:34:24 -07:00
Wildan M 5476770359 Define max limits in rust 2026-01-17 18:17:35 +07:00
Wildan M 3bf35abeae Add more sys_socket tests 2026-01-16 07:18:13 +07:00
Wildan M af7636daba Enable unix tests 2026-01-15 05:34:53 +07:00
Wildan M ad3a39771b Add more test 2026-01-08 01:42:46 +07:00
Wildan M 02752dda27 Enable some tests 2026-01-07 22:59:34 +07:00
Wildan M 053525fba1 Update failing tests 2026-01-07 04:52:35 +07:00
Wildan M 9c67018022 Add sys_socket tests 2026-01-07 04:48:31 +07:00
Wildan M 0ade938c63 Add pthread/timedwait to Makefile 2026-01-06 15:43:11 +07:00
Wildan M 1e587dc77b Add putc_unlocked tests 2026-01-05 12:43:51 +07:00
Wildan M b5b2d0f4a0 Add malloc/usable_size into tests 2026-01-04 02:46:40 +07:00
Wildan M 19d95a226c Add tests for new locale.h functions 2025-12-27 22:25:01 +07:00
Wildan M 2f4753bdfa Add single test run in check script 2025-12-27 19:42:24 +07:00
Wildan M 91873d21fe Fix aarch64 test compilation 2025-12-22 04:03:32 +07:00
Wildan M f6fa58bbbc Fix NATIVE_RELIBC=0 2025-12-18 12:26:34 +07:00
Wildan M 42d5369d41 Make test runner hang proof 2025-12-18 10:16:08 +07:00
Wildan M d902941b14 Use dynamic link for tests 2025-12-18 07:52:26 +07:00
Wildan M 31797971bc Write unified test script and make test readable 2025-12-10 23:28:57 +07:00
Anhad Singh 843f3f89ff fix(tests/Makefile): use correct dynamic linker path depending on target 2025-12-09 15:02:34 +11:00
Anhad Singh 396a0d20bf fix(build): target specific sysroot directory 2025-12-09 14:13:09 +11: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
Wildan Mubarok 7416ba6ff3 Implement posix_getdents 2025-09-23 10:57:13 -06: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
Josh Megnauth 639e0f2cd7 Add lstat test 2025-09-05 23:59:36 -04:00
Josh Megnauth c899feb774 Implement fstatat
Linux's variant uses the syscall as intended. Redox's variant uses fpath
to build a path to pass to fstat from the file descriptor plus the file
name. Unlike the syscall, this isn't atomic so the liminal space between
fpath/getcwd and fstat is subject to TOCTOU.

Beyond fstatat, I moved the stat test to its correct location and added
an assert since the output of the test is unchecked.

I also added AT_FDCWD which seems to be -100 across Unixes. The other
AT_* constants are unimplemented for now.
2025-08-27 08:21:41 -04:00
Josh Megnauth 9d2f5d95dc Implement confstr (unistd.h)
The implementation for confstr is straightforward. Most of the constants
return 1 on both musl and glibc. The only constant that doesn't is
required for Fish.

I also switched an #[unsafe(no_mangle)] from my last patch back
to a #[no_mangle] because we need to bump cbindgen. #[unsafe(no_mangle)]
is required for Rust 2024.
2025-08-22 22:13:51 -04:00
Jeremy Soller 551c79c526 Merge branch 'redoxer-test' into 'master'
Enable some tests in Redox

See merge request redox-os/relibc!685
2025-08-11 14:11:16 -06:00
Darley Barreto b0aac4e8f6 Enable some tests in Redox 2025-08-11 14:11:15 -06:00
Wildan M c7405e09bd Add statvfs tests to Makefile 2025-08-07 07:35:40 +07:00
Josh Megnauth e677ad55d5 Better priorities & LOG_UPTO for syslog.h
* Fix PERROR to match musl/glibc better
* More unit tests + enabled on Linux
* Pack priority and facility into one i32 and check the bits with
  bitflags
* Add LOG_UPTO (logic is straight from musl)

Not done:
* "%m" - this could just be added to printf
* LOG_CONS
2025-08-01 23:45:26 -04:00
Bendeguz Pisch 4fc80ea7b0 Implement syslog functionality 2025-07-17 22:49:51 -06:00
Ron Williams 770dc71816 Fix CI, Add signal.h constants 2025-07-11 20:28:45 -06:00
4lDO2 df228ddd79 Add remaining tests. 2025-04-20 21:17:39 +02:00
4lDO2 240a41861c Rebase, misc fixes for test suite. 2025-04-20 21:17:39 +02:00
Josh Williams 77cf9fc2a1 added tests to makefile and run_tests 2025-04-20 21:17:39 +02:00
Josh Williams 70b997b249 switched to master makefile, run_tests and test_helpers 2025-04-20 21:17:39 +02:00