summaryrefslogtreecommitdiffstats
path: root/tests/xtouch.c
Commit message (Collapse)AuthorAgeFilesLines
* xtime: Remove xgettime()Tavian Barnes2024-08-091-2/+2
| | | | clock_gettime() is available everywhere by now.
* Cast AT_FDCWD to int for comparisonsTavian Barnes2024-05-171-1/+1
| | | | | Some platforms define AT_FDCWD to a constant like 0xFFFAFDCD that gets typed as an unsigned int.
* config: Check for struct stat::st_{a,c,m,birth}{tim,timespec}Tavian Barnes2024-04-191-2/+2
|
* Rename config.h to prelude.hTavian Barnes2024-04-191-1/+1
|
* tests: Add ../src to the include pathTavian Barnes2024-04-191-4/+4
|
* Re-run include-what-you-useTavian Barnes2024-03-111-0/+1
|
* xtime: Call tzset() from main() instead of lazilyTavian Barnes2024-03-071-0/+2
| | | | | | | | | | | | | POSIX specifies[1] that If a thread accesses tzname, daylight, or timezone directly while another thread is in a call to tzset(), or to any function that is required or allowed to set timezone information as if by calling tzset(), the behavior is undefined. So calling it lazily from arbitrary threads is risky. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/tzset.html
* bfstd: New {error,errno}_is_like() functionsTavian Barnes2024-01-131-14/+3
| | | | | | | We used to have is_nonexistence_error() to consistently treat ENOENT and ENOTDIR the same. Recently, we started considering EFAULT the same as ENAMETOOLONG on DragonFly BSD to work around a kernel bug. Unify both of these behind a more generic interface.
* Work around DragonFly BSD kernel bugTavian Barnes2024-01-041-0/+6
| | | | | | | | | DragonFly's x86_64 assembly implementation of copyinstr() checks the wrong pointer when deciding whether to return EFAULT or ENAMETOOLONG, causing it to always return EFAULT for overlong paths. Work around it by treating EFAULT the same as ENAMETOOLONG on DragonFly. Link: https://twitter.com/tavianator/status/1742991411203485713
* tests/xtouch: Recover from ENAMETOOLONGTavian Barnes2023-10-201-45/+84
|
* bfstd: Add a thread-safe wrapper for strerror()Tavian Barnes2023-10-051-3/+3
|
* tests/xtouch: Try creating the immediate parent firstTavian Barnes2023-09-291-15/+24
|
* Work around https://github.com/llvm/llvm-project/issues/64946Tavian Barnes2023-08-231-0/+3
|
* config: Provide <stdalign.h> and <stdbool.h>Tavian Barnes2023-05-111-1/+1
| | | | In anticipation of C23, since those headers won't be necessary any more.
* tests: Use close() wrappersTavian Barnes2023-01-311-4/+2
|
* Replace license boilerplate with SPDX tagsTavian Barnes2023-01-251-15/+2
| | | | | | | And while I'm at it, remove years from copyright declarations. Link: https://spdx.dev/about/ Link: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/
* tests/xtouch: Fix macOS buildTavian Barnes2023-01-191-0/+1
|
* bfstd: New wrappers for dirname()/basename()Tavian Barnes2023-01-191-1/+0
|
* tests/xtouch: Add some missing POSIX touch featuresTavian Barnes2022-11-081-46/+99
|
* tests/xtouch: New utilityTavian Barnes2022-11-071-0/+195
POSIX touch(1) doesn't include the -h option, and indeed OpenBSD doesn't implement it. Making our own utility also lets us add some handy extensions like -p (create parents) and -M (set permissions).