jD91mZM2
269b8a1d3e
Merge branch 'cleanup' into 'master'
...
tests: Macro based error handling
See merge request redox-os/relibc!195
2019-03-03 15:19:19 +00:00
lmiskiew
5eb2a8f7bd
Implement swab
2019-02-28 08:23:11 +00:00
Tibor Nagy
fa2c6d29db
tests: Rewrite libgen tests based on ctype (nice table layout), fix error handling of sleep tests
2019-02-25 19:32:20 +01:00
Tibor Nagy
efd6947d8e
tests: Fix function-like macros
...
Turns the results of these macros from compound to regular statements using the old `do { ... } while(0)` trick. Must have for function-like macros.
2019-02-25 14:13:02 +01:00
Tibor Nagy
a92be000fb
tests: Even more work on error handling
...
realpath: Fixing undefined behaviour in the second test. If the call fails the resolved_name argument cannot be used for error checking because its state is undefined by SUSv2.
pipe: Changing the order of close and write error handling code. Errors in close could overwrite errno after write errors, returning incorrect error messages.
gmtime: Removed duplicate checks
Other fixes for fseek, rename, mktime, putwchar
2019-02-24 22:02:11 +01:00
Tibor Nagy
2d027f0771
tests: More work on error handling
2019-02-24 00:46:26 +01:00
Tibor Nagy
9a0ea6ff34
tests: More refactoring, add helper header to every test, override exit for better error reporting
2019-02-21 21:13:28 +01:00
Tibor Nagy
64acf45c40
tests: Add helper macros for easier error handling and reporting
2019-02-21 17:35:24 +01:00
Tibor Nagy
f60c95d2ca
tests: Work on more thorough error handling
2019-02-21 16:15:49 +01:00
Tibor Nagy
d1a424c002
tests: Replace returns with exits in the main functions
...
This will allow us to redefine the exit function.
For example:
```
#define exit(code) { \
fprintf(stderr, "%s:%d: exit(%s) in function ‘%s’\n",
__FILE__, __LINE__, #code, __func__); \
_exit(code); \
}
```
2019-02-21 12:15:06 +01:00
Tibor Nagy
4381bb2a22
tests: Remove redundant return statements
...
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00
Tibor Nagy
c19cc8b731
tests: Portability fixes, replaced 0/1/-1 return codes with macros
2019-02-20 20:20:07 +01:00
Tibor Nagy
ff874c87d7
tests: Fix function signatures
2019-02-20 19:27:18 +01:00
Tibor Nagy
7ee59d2fdb
tests: set C11, enable pedantic warnings, fix GCC and Clang warnings
2019-02-20 15:04:47 +01:00
Jeremy Soller
602f015e93
Implement fpathconf and pathconf
2019-01-27 18:53:57 -07:00
Jeremy Soller
434cad49ce
Add sysconf
2019-01-13 14:16:51 -07:00
Jeremy Soller
950b4526c7
- Disable output of empty header files
...
- Remove incorrect header styles
- Use export.replace where header style was previously needed
- Check compilation of tests using system gcc
2018-11-26 21:35:02 -07:00
jD91mZM2
9d56ce42c6
Implement timer* macros, and GNU's getopt_long
2018-10-06 16:46:35 +02:00
jD91mZM2
442a7bbedc
Fix getcwd with a NULL argument
2018-08-04 08:42:47 +02:00
jD91mZM2
daf65c7a46
Implement access
2018-07-30 21:08:44 +02:00
jD91mZM2
2bf426b0fb
Implement isatty
2018-07-26 14:19:20 +02:00
jD91mZM2
8021ade2a9
Move stat test out of expected tests
2018-07-23 21:41:19 +02:00
jD91mZM2
5697ac0f84
Fix stat stack corruption and link test
2018-07-23 11:26:18 +02:00
jD91mZM2
86a38b47d1
Fix broken exec test
2018-07-22 19:57:59 +02:00
jD91mZM2
67d5976622
Clean up tests
2018-07-22 11:24:50 +02:00
Alex Lyon
42a6693a0b
unistd: fix off-by-one in getopt()
2018-03-19 14:50:41 -07:00
Alex Lyon
af78348d4a
unistd: add a preliminary implementation of getopt()
2018-03-19 14:50:41 -07:00