summaryrefslogtreecommitdiffstats
path: root/tests/gnu/ignore_readdir_race_notdir.sh
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix a possible infinite loopTavian Barnes2023-11-151-2/+4
| | | | | | | | | | | | | | | | | | | The POSIX spec for readdir() [1] says: > If a file is removed from or added to the directory after the most > recent call to opendir() or rewinddir(), whether a subsequent call > to readdir() returns an entry for that file is unspecified. which implies that a loop of readdir()/unlink()/creat() may continue to return new files unendingly. This was even observed on a Linux 6.6 tmpfs mount [2]. It's not clear whether find(1) is also permitted to loop endlessly in this case, but in case it is, let's avoid the whole problem by limiting the -exec to happen at most once. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html [2]: https://lore.kernel.org/linux-fsdevel/20231113180616.2831430-1-tavianator@tavianator.com/
* tests: Use test-specific scratch directoriesTavian Barnes2023-10-221-3/+3
|
* tests/xtouch: New utilityTavian Barnes2022-11-071-2/+2
| | | | | | 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).
* tests: Add a helper for cleaning scratchTavian Barnes2022-10-201-1/+1
| | | | And try to unmount things if the a test left them mounted.
* tests: Split test cases into separate filesTavian Barnes2022-10-191-0/+5