tests/clar/fs.h


Log

Author Commit Date CI Message
Edward Thomson 5368be30 2021-05-05T23:01:57 clar: support long paths on Windows
lhchavez 212ae9a7 2020-12-21T06:48:48 Fix the `-DENABLE_WERROR=ON` build for gcc 10.2 This change makes it possible to build with newer versions of gcc without warnings. There were two warnings issued: * gcc 8 added [`-Wstringop-truncation`](https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/), which warns if a call to `strncpy(3)` is prone to accidentally truncating the destination string, since `strncpy(3)` does NOT add a terminating `NULL` if the destination buffer is not large enough to hold the input. This change uses the pattern suggested in https://us-cert.cisa.gov/bsi/articles/knowledge/coding-practices/strncpy-and-strncat to fix the locations flagged by gcc. * There was a potentially uninitialized access of `dest` in `fs_copy`.
Philipp 6887e9db 2020-09-14T15:54:00 Removed FreeBSD-related macros.
Philipp e937a2aa 2020-09-09T19:08:20 Fixed includes for FreeBSD.
Edward Thomson 2a2c5b40 2020-05-23T15:57:48 clar: remove unused shell_out function
Edward Thomson ee9e9163 2020-05-23T15:56:29 clar: remove files internally instead of /bin/rm Similar to how clar has used `/bin/cp` to copy files, it's used `/bin/rm` to remove them. This has similar deficiencies; meaning that leaks is noisy and it's slow. Move it to an internal function.
Edward Thomson d03fd331 2020-05-23T15:42:51 clar: copy files with sendfile on linux
Edward Thomson 8df4f519 2020-05-23T15:04:54 clar: copy files internally instead of /bin/cp clar has historically shelled out to `/bin/cp` to copy test fixtures into a sandbox. This has two deficiencies: 1. It's slower than simply opening the source and destination and copying them in a read/write loop. On my Mac, the `/bin/cp` based approach takes ~2:40 for a full test pass. Using a read/write loop to copy the files ourselves takes ~1:50. 2. It's noisy. Since the leak detector follows fork/exec, we'll end up running the leak detector on `/bin/cp`. This would be fine, except that the leak detector spams the console on startup and shutdown, so it adds a _lot_ of additional information to the test runs that is useless. By not forking and using this internal system, we see much less output.
Russell Belfer 7be88b4c 2014-01-31T13:44:09 Update to latest clar
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests