summaryrefslogtreecommitdiffstats
path: root/tests/cat
AgeCommit message (Collapse)AuthorLines
2026-04-07tests: cat: avoid false failure on systems without splicePádraig Brady-1/+8
* tests/cat/splice.sh: Ensure splice is called multiple times before we check specific invocation counts. On Linux kernel 5.10 for example, splice from /dev/zero returns EINVAL.
2026-04-06cat: use splice if operating on pipes or if copy_file_range failsCollin Funk-0/+66
On a AMD Ryzen 7 3700X system: $ timeout 10 taskset 1 ./src/cat-prev /dev/zero \ | taskset 2 pv -r > /dev/null [1.67GiB/s] $ timeout 10 taskset 1 ./src/cat /dev/zero \ | taskset 2 pv -r > /dev/null [9.03GiB/s] On a Power10 system: $ taskset 1 ./src/yes | timeout 10 taskset 2 ./src/cat-prev \ | taskset 3 pv -r > /dev/null [12.9GiB/s] $ taskset 1 ./src/yes | timeout 10 taskset 2 ./src/cat \ | taskset 3 pv -r > /dev/null [81.8GiB/s] * NEWS: Mention the improvement. * src/cat.c: Include isapipe.h, splice.h, and unistd--.h. (splice_cat): New function. (main): Use it. * src/local.mk (noinst_HEADERS): Add src/splice.h. * src/splice.h: New file, based on definitions from src/yes.c. * src/yes.c: Include splice.h. (pipe_splice_size): Use increase_pipe_size from src/splice.h. (SPLICE_PIPE_SIZE): Remove definition, moved to src/splice.h. * tests/cat/splice.sh: New file, based on some tests in tests/misc/yes.sh. * tests/local.mk (all_tests): Add the new test.
2026-01-01maint: run 'make update-copyright'Collin Funk-4/+4
2025-07-01tests: cat: add test for O_APPEND bug fixPádraig Brady-0/+10
* tests/cat/cat-self.sh: Add a test case for commit v9.6-19-g7386c291b
2025-01-01maint: update all copyright year number rangesPádraig Brady-4/+4
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * gnulib: Update included in this commit as copyright years are the only change from the previous gnulib commit. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2024-04-06cat: don’t trust st_size on /proc filesPaul Eggert-0/+20
* src/cat.c (main): Improve test for when copying will exhaust the output device. Do not rely on st_size, which is unreliable in /proc. Use lseek instead; this is good enough here. * tests/cat/cat-self.sh: Test the relaxation of the heuristic for self-copying.
2024-01-01maint: update all copyright year number rangesPádraig Brady-4/+4
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * gnulib: Update included in this commit as copyright years are the only change from the previous gnulib commit. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Manually update copyright year, until we fully sync with gnulib at a later stage. * tests/sample-test: Adjust to use the single most recent year.
2023-06-19tests: move tests to a directory per utilitySylvestre Ledru-0/+160
* cfg.mk: Adjust syntax check exclusion paths. * tests/local.mk: Adjust for renamed tests.