Commit Graph

223 Commits

Author SHA1 Message Date
Jacob Lorentzon 1fba2ef10a Various futex fixes 2024-04-05 20:31:06 +00:00
Peter Limkilde Svendsen a91a4082c4 Add tests for unistd.h constants 2024-03-27 12:21:14 +00:00
Peter Limkilde Svendsen d189b05f11 Add tests for further sys/resource.h constants 2024-03-12 20:40:55 +00:00
Bendeguz Pisch 2284bc4af5 Fix posix prio process (same as MR458 with fixed commits) 2024-03-04 13:41:43 +00:00
Jeremy Soller 4f8d16a3b9 Merge branch 'crypt' into 'master'
Add Crypt functions

See merge request redox-os/relibc!453
2024-03-01 00:23:42 +00:00
Darley Barreto 55dc2019f2 Add Crypt functions 2024-03-01 00:23:42 +00:00
Jeremy Soller 2058c6693c Use TEST_RUNNER for make run in tests folder 2024-02-08 15:36:33 -07:00
Darley Barreto 9d8094baee Add forkpty, ptsname and posix_openpt 2024-01-17 03:05:50 +00:00
Abdullah Emad 0caf011122 Implement mknod and mknodat 2024-01-03 16:43:28 +00:00
4lDO2 5f929ed51e Enable -Wextra in tests. 2023-11-12 12:07:49 +01:00
4lDO2 c76a12347f Enforce -Werror in tests. 2023-11-12 11:45:15 +01:00
Jeremy Soller b0624b4178 Merge branch 'tests/getline' into 'master'
getline, getdelim: fix issues, extend tests

See merge request redox-os/relibc!418
2023-10-20 14:34:06 +00:00
Florian Meißner b65cd4e511 getline, getdelim: fix issues, extend tests 2023-10-20 14:34:06 +00:00
Jeremy Soller 76242fc7bc Merge branch 'fix/ungetwc' into 'master'
Fix ungetwc for multi byte chars

See merge request redox-os/relibc!425
2023-10-19 14:58:57 +00:00
Darley Barreto 3d2dd71b8b Fix ungetwc for multi byte chars 2023-10-19 14:58:57 +00:00
Darley Barreto 05992b8451 Add wcpcpy, wcpncpy, wcsdup, wcsnlen, wcsnrtombs 2023-10-19 14:58:37 +00:00
Jacob Schneider 2f887ae434 Groups 2023-08-21 12:05:16 +00:00
Jeremy Soller 3023dbb3c0 Add qsort test 2023-06-01 08:11:27 -06:00
Darley Barreto 9642d2ab02 Adding some wcst* functions 2023-05-22 16:01:04 +00:00
Darley Barreto 511d99aa21 Fix tests 2023-05-11 15:57:27 +00:00
Jeremy Soller 848fde933b Merge branch 'remove_pthreads_emb' into 'master'
Replace pthreads-emb with a native implementation

See merge request redox-os/relibc!380
2023-05-11 13:56:11 +00:00
Jeremy Soller 98193b2eeb Add tests for wprintf 2023-05-11 07:48:23 -06:00
Darley Barreto c659bf11f9 Implementing ungetwc 2023-05-09 14:23:25 +00:00
Darley Barreto 7155005be2 Adding wcsrtombs. 2023-05-08 12:39:53 +00:00
4lDO2 d8bc60e0fb Add more pthread tests. 2023-05-06 17:02:55 +02:00
4lDO2 5cd110a92b WIP: Add pthread tests. 2023-05-06 17:02:54 +02:00
Ron Williams c3f3da6958 fix tzset cbindgen declarations 2023-05-06 02:55:36 -07:00
Jeremy Soller 393489b38b Add wcswidth and test 2022-12-16 17:39:06 -07:00
Jeremy Soller 7d27737c3f Disable dynamic tests as they are not compiling 2022-12-16 17:18:07 -07:00
Jeremy Soller 7fd366be70 Convert test runner to rust 2021-03-01 21:19:04 -07:00
Peter Limkilde Svendsen e3a0fdbc4a Test for time.h constants 2021-02-23 18:35:24 +01:00
Jeremy Soller ccee7eae5f Merge branch 'tlssym' into 'master'
Fix dlsym of TLS variables

See merge request redox-os/relibc!327
2021-01-05 23:03:10 +00:00
Mateusz Tabaka 19ac34f2a0 Extend dlfcn tests 2021-01-05 22:48:41 +01:00
Mateusz Tabaka 6332828725 Call DSO destructors during exit() 2021-01-05 20:39:36 +01:00
Mateusz Tabaka a7480ea656 Fix global symbols relocations
Instead of a single source of symbols, now linker keeps a list of DSO (former Library) objects
with their own symbols map. That helps to process R_X86_64_COPY relocations correctly.
For example, if 'a.out' executable with dependencies ['libstdc++.so', 'libc.so'] is being loaded
and 'a.out' uses 'stdout' symbol from 'libc.so', its relocation process goes as follows:
- linker processes relocation entry 'stdout' of type R_X86_64_GLOB_DAT from 'libc.so',
- it goes through object list ['a.out', 'libstdc++.so', 'libc.so'] to find first object
  that exports 'stdout' symbol. The symbol is in 'a.out' with the value e.g. '0x404070',
- linker sets 'stdout' symbol GOT entry in 'libc.so' to '0x404070',
....
- linker processes relocation entry 'stdout' of type R_X86_64_COPY from 'a.out',
- it goes through object list excluding 'a.out': ['libstdc++.so', 'libc.so']. The symbol is found in 'libc.so',
- linker copies the 'stdout' symbol content from 'libc.so' to memory at address '0x404070' (in 'a.out' object).

Objects are relocated in reverse order they were loaded. So in the example above, linker starts with relocating
'libc.so' and ends with 'a.out'. It is necessary e.g. when linking with 'libstdc++.so' - there are many
relocations which symbols are found in 'libstdc++.so', so they need to be resolved before their contents are
copied to 'a.out'. That also matches GNU ld.so behavior.
2021-01-03 16:04:40 +01:00
Jeremy Soller 3e49323a3a Merge branch 'dlopen' into 'master'
Add support for dlopen(NULL, ...)

See merge request redox-os/relibc!315
2020-10-02 03:21:42 +00:00
Mateusz Tabaka eee9a80baa Fix tls tests for dynamic linker
* load TLS segment for executable - while we can skip PT_LOAD for executable,
  we still have to load TLS segment.
* set TCB address based on if elf is position independent
2020-10-01 15:45:55 +02:00
Mateusz Tabaka c11aad71b8 Add support for dlopen(NULL, ...) 2020-09-30 11:04:10 +02:00
Mateusz Tabaka 675101ac0e Add tests for dynamic linker 2020-09-29 23:01:52 +02:00
jD91mZM2 4c148c1860 Make munmap use funmap2 2020-07-30 13:39:20 +02:00
Wren Turkal 865b7962a1 Add implmentation for fwide posix function.
This function is used to set the orientation of a stream to either
byte-oriented or wchar-oriented.

More info on this function is here:
https://man7.org/linux/man-pages/man3/fwide.3p.html

This implementation only impmlemnts the manual switching and does
not yet guard against using a byte-oriented stream with wchar
functions and vice versa. Those step will come in additional
commits.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-07-08 14:33:06 -07:00
Peter Limkilde Svendsen 59b040258a Rename lcg48 as rand48 2020-06-23 18:34:44 +02:00
Peter Limkilde Svendsen cc33874363 Implement random() and friends 2020-06-22 21:56:39 +00:00
oddcoder 92d6735e3f Add more scanf tests 2020-06-03 23:20:53 +02:00
oddcoder 7eba6d88df Add test for negative pad stupport in printf 2020-05-23 16:20:20 +02:00
oddcoder 1b131b8c60 Test off by one bug in vfscanf 2020-05-23 16:20:20 +02:00
oddcoder 6fba592fdb Implement regression test for ftell-ungetc bug 2020-05-23 16:20:20 +02:00
oddcoder 49dec86a5d Unit test arbitrarily long ungetc() 2020-05-23 16:20:20 +02:00
oddcoder a39447e6a4 Test printf space padding regression 2020-05-08 22:38:42 +02:00
oddcoder e9615065ac Add tests for both wcsncasecmp and wcscasecmp 2020-04-26 19:13:03 +02:00