| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
* src/yes.c (splice_write): Always drain what we've written
to an internal pipe, so there is no possibility of vmsplice() blocking.
I.e., be defensive in the case that fcntl() fails, and
our default buffer size (currently 16kiB) is larger than the pipe.
https://github.com/coreutils/coreutils/issues/253
|
|
* tests/misc/user.sh: Modify the "unshare -U logname" test, so that it
does not fail on glibc versions (< 2.28, >= 2.38) that do a fallback
lookup based on the tty.
|
|
* tests/date/date-locale-hour.sh: Just strip the char before the last x,
assuming it's going to be the newline output by `locale`.
dash doesn't support $'' within ${}.
|
|
|
|
* tests/local.mk (TESTS_ENVIRONMENT): Remove host_triplet.
* tests/chgrp/basic.sh: Use $host_os instead of $host_triplet.
* tests/misc/io-errors.sh: Likewise.
|
|
* tests/mktemp/write-error.sh: New file.
* tests/local.mk (all_tests): Add the test.
|
|
|
|
* tests/misc/io-errors.sh: Allow a generic error string on musl since
the first line is emitted immediately instead of being buffered as
expected.
Reported by Bruno Haible.
|
|
* m4/jm-macros.m4: AIX has a splice() function for TCP,
so check for vmsplice() instead.
* src/splice.h: Define HAVE_SPLICE if vmsplice available.
Reported by Bruno Haible.
|
|
* tests/numfmt/numfmt.pl: Use standard getopt error map,
needed on OpenBSD.
Reported by Bruno Haible.
|
|
* tests/stat/stat-mount.sh: Don't try our stat under unshare
unless mount(8) exits gracefully.
Reported by Bruno Haible.
|
|
* tests/misc/user.sh: Comment out part of test.
Reported by Bruno Haible.
|
|
Fix an unreleased issue due to the recent change
to using idx_t in commit v9.10-91-g02983e493
* src/cksum.c (main): Limit the possible return to
the range supported by idx_t.
Reported by Bruno Haible.
|
|
* tests/dd/no-allocate.sh: Run getlimits_ to ensure
we have $SSIZE_MAX etc. available. Also give some buffer
for the configured ulimit to leave space for returns_ to work.
|
|
* tests/cp/sparse-perf.sh: Old Centos 7 can give EINVAL
from SEEK_DATA on sparse files being copied from /dev/shm.
Avoid this failure as it's not practical to fix.
|
|
* tests/date/date-locale-hour.sh: Ensure `locale date_fmt`
is propagated exactly, even when it contains trailing new lines,
as was seen with Serbian locales on Centos 7.
|
|
|
|
As noted in https://bugs.gnu.org/9089
ksh gives intermittent ECONNRESET errors with closed pipes.
This can be seen reliably on Linux with:
ksh -c 'yes | (sleep .1; head -n10 >/dev/null)'
* tests/misc/io-errors.sh: Avoid part of test on ksh.
* tests/misc/write-errors.sh: Likewise.
|
|
* tests/misc/write-errors.sh: Use a more accurate ulimit determination
when we're using $SHELL -c.
|
|
As described in commit v9.10-283-g5cb0cca3b
avoid using ulimit with $SHELL -c, and explict
invocation of the shell like that can require lots of memory,
often due to loading the locale archive.
* tests/basenc/bounded-memory.sh: Avoid $SHELL -c with ulimit.
* tests/cut/bounded-memory.sh: Likewise.
* tests/expand/bounded-memory.sh Likewise.
* tests/pr/bounded-memory.sh Likewise.
* tests/unexpand/bounded-memory.sh Likewise.
* tests/fold/fold-zero-width.sh: Bring the ulimit bound
down to the standard 6M over the determined limit.
|
|
* tests/misc/tty-eof.pl: Fix a race that commit v9.10-269-gf312af49a
made more apparent, and resulted in intermittent failure like:
"... (with input) didn't produce expected output".
Now Instead of waiting for overlapping echo and output,
just wait for EOF, and if received, use exp->before()
to inspect the accumulated output.
|
|
Do not compare only with the latest entry for given device id but also
all previously saved entries with the same id.
* src/df.c (struct devlist): Add next_same_dev struct member.
(filter_mount_list): Iterate over next_same_dev to find duplicates.
* tests/df/skip-duplicates.sh: Add test cases.
* NEWS: Mention the improvement.
https://redhat.atlassian.net/browse/RHEL-5649
|
|
Verified with:
make -j4 PREFERABLY_POSIX_SHELL=/bin/ksh SUBDIRS=. check
* tests/fold/fold-zero-width.sh: Don't timeout $SHELL -c ...
as the ulimit induces a failure in the subshell depending
on the order of the allocations it does. The main issue is
disparity between the probed ulimit and that needed by $SHELL -c.
Such subshells load the often very large locale archive, thus
if there are any allocations done after the now too low ulimit is set,
then the $SHELL command fails. Note we timeout fold rather than
the whole pipeline so any 124 exit status is propagated.
|
|
* tests/misc/read-errors.sh: Validate that commands which read multiple
files, read all files on error, and exit with appropriate status.
|
|
This avoids the following behavior:
$ strace -e silence=exit -e trace=unlink,rmdir \
mktemp -d > /dev/full
unlink("/tmp/tmp.ZBuPmS9ZGD") = -1 EISDIR (Is a directory)
rmdir("/tmp/tmp.ZBuPmS9ZGD") = 0
mktemp: write error: No space left on device
In the above invocation we know that we created a directory, so we
should not remove a regular file that must have been created by another
process:
$ strace -e silence=exit -e trace=unlink,rmdir \
./src/mktemp -d > /dev/full
rmdir("/tmp/tmp.hGbME1HmJr") = 0
mktemp: write error: No space left on device
* src/mktemp.c (main): Prefer rmdir and unlink depending on whether we
created a directory or regular file.
* bootstrap.conf (gnulib_modules): Remove the remove module.
|
|
* src/cat.c (splice_cat): Don't bother resizing input as it generally
doesn't help perf, and also save an fstat per input. Don't close the
intermediate pipe once created, unless there is an error reading from
it.
Co-authored-by: Pádraig Brady <P@draigBrady.com>
|
|
* tests/misc/responsive.sh: Test commands that should output immediately
upon receiving input, and that there is no unecessary buffering.
* cfg.mk: Avoid false failure in sc_prohibit_test_backticks.
* tests/local.mk: Reference the new test.
|
|
* tests/stat/stat-mount.sh: Ensure stat -c '%a'
is independent from /proc.
https://github.com/coreutils/coreutils/pull/250
|
|
* tests/misc/read-errors.sh: Use cut -b as that has a separate
read path to cut -c.
|
|
* tests/chgrp/basic.sh: Test $host_os, not $host_triplet.
* tests/chown/separator.sh: Likewise.
* tests/rm/r-root.sh: Likewise.
* tests/tail/pipe-f.sh: Likewise.
* tests/tail/tail-c.sh: Likewise.
* tests/tee/tee.sh: Likewise.
* tests/touch/dangling-symlink.sh: Likewise.
|
|
* src/env.c (main): Use fputs and putchar instead of printf.
|
|
* src/printenv.c (main): Use fputs and putchar instead of printf.
|
|
* src/split.c (bytes_chunk_extract): Prefer affirm to assert,
as it allows for better static checking when compiling with -DNDEBUG.
|
|
* tests/tty/tty-eof.pl: Rename to ...
* tests/misc/tty-eof.pl: ... this more general directory.
* tests/local.mk: Adjust accordingly.
|
|
* tests/tty/tty-eof.pl: Try to explicitly set EOF char to Ctrl-d
in case it's different.
|
|
* tests/tty/tty-eof.pl: Remove command specific logic,
and adjust commands to support general input.
Also add cut -b, as cut_bytes has its own read loop.
|
|
* tests/tty/tty-eof.pl: Test all commands twice.
Once with input and once with empty input.
|
|
* src/cat.c (ensure_buf_size): Affirm we won't return NULL;
|
|
* src/cat.c (main): Only resize the allocated buffer when needed,
which avoids per file heap manipulation and mmap/munmap syscalls.
|
|
* src/cat.c (splice_cat): Ensure we don't retry a read() after
splice() completes, as this is significant on a tty.
|
|
* tests/tee/tee.sh: Add test case for input from pipe containing sleep.
https://github.com/coreutils/coreutils/pull/247
|
|
* src/touch.c (main): Use timespec_cmp instead of comparing each member
of the timespec.
|
|
* tests/date/date.pl: Set the max supported year to INT_MAX.
Most systems support INT_MAX+1900, but mktime() on OpenBSD 7.8
limits the passed tm_year to INT_MAX.
Reported by Bruno Haible.
|
|
* tests/numfmt/numfmt.pl: Move recently added test that depends
on long double support to the appropriately guarded set.
Also reduce the value to be in the definitely safe long double range.
Reported by Bruno Haible.
|
|
Seen on GCC 15.2.1 with GLIBC 2.43 on Arch
Not seen on GCC 15.2.1 on GLIBC 2.42 on Fedora
* src/cut.c (search_bytes): Cast the return from memchr()
to avoid const propagation.
(find_field_delim): Adjust the return from strstr() similarly.
https://github.com/coreutils/coreutils/issues/244
|
|
* 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.
|
|
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.
|
|
For the Gnulib commit 2c480fa522 (mbrtowc, mbrtoc32: Silence -Wshadow
warnings (regr. 2026-04-02)., 2026-04-06).
|