Commit Graph
5359 Commits
Author SHA1 Message Date
Pádraig Brady 200cc6a598 maint: tests: DRY a recent change
* tests/pwd/pwd-long.sh: Adjust so complicated command is not repeated.
2026-02-19 19:42:14 +00:00
Collin Funk 6a3dde5dd2 wc: add aarch64 Neon optimization for wc -l
Here is an example of the performance improvement:

    $ yes abcdefghijklmnopqrstuvwxyz | head -n 100000000 > input
    $ time ./src/wc-prev -l < input
    100000000

    real	0m0.793s
    user	0m0.630s
    sys	0m0.162s
    $ time ./src/wc -l < input
    100000000

    real	0m0.230s
    user	0m0.065s
    sys	0m0.164s

* NEWS: Mention the performance improvement.
* gnulib: Update to the latest commit.
* configure.ac: Check the the necessary intrinsics and functions.
* src/local.mk (noinst_LIBRARIES) [USE_NEON_WC_LINECOUNT]: Add
src/libwc_neon.a.
(src_libwc_neon_a_SOURCES, wc_neon_ldadd, src_libwc_neon_a_CFLAGS)
[USE_NEON_WC_LINECOUNT]: New variables.
(src_wc_LDADD) [USE_NEON_WC_LINECOUNT]: Add $(wc_neon_ldadd).
* src/wc.c [USE_NEON_WC_LINECOUNT]: Include sys/auxv.h and asm/hwcap.h.
(neon_supported) [USE_NEON_WC_LINECOUNT]: New function.
(wc_lines) [USE_NEON_WC_LINECOUNT]: Use neon_supported and
wc_lines_neon.
* src/wc.h (wc_lines_neon): Add declaration.
* src/wc_neon.c: New file.
* doc/coreutils.texi (Hardware Acceleration): Document the "-ASIMD"
hwcap and the variable used in ./configure to override detection of Neon
instructions.
* tests/wc/wc-cpu.sh: Also add "-ASIMD" to disable the use of Neon
instructions.
2026-02-18 20:09:44 -08:00
Pádraig Brady 5f3a601fbb tests: use system ENOTEMPTY message
* tests/mv/dir2dir.sh: Map system specific messages.
* tests/rm/d-2.sh: Likewise.
2026-02-18 18:31:49 +00:00
Pádraig Brady dd3fd4593d maint: tests: avoid ERANGE specific handling
* tests/fmt/base.pl: Verify ERANGE is diagnosed.
* tests/od/od.pl: Adjust determination of ERANGE.
2026-02-18 18:31:49 +00:00
Pádraig Brady 7d07156e03 maint: tests: avoid ELOOP specific handling
* tests/du/long-sloop.sh: Adjust determination of ELOOP.
2026-02-18 18:31:49 +00:00
Pádraig Brady 448a7dc072 maint: tests: avoid ENOSPC specific handling
* tests/csplit/csplit-io-err.sh: Adjust determination of ENOSPC.
* tests/csplit/split-io-err.sh: Likewise.
* tests/fold/fold-zero-width.sh: Verify full ENOSPC message.
* tests/tac/tac-continue.sh: Likewise.
* tests/misc/io-errors.sh: Likewise.
* tests/misc/write-errors.sh: Likewise.
2026-02-18 18:31:49 +00:00
Pádraig Brady 798f94c828 tests: use system ENOSPC message
* tests/head/head-write-error.sh: Verify ENOSPC is output.
* tests/misc/yes.sh: Likewise.
2026-02-18 18:31:49 +00:00
Pádraig Brady 17fb316388 tests: use system ENOTSUP message
* tests/cp/cp-mv-enotsup-xattr.sh: Don't hardcode "Operation not
supported".
* tests/cp/cp-a-selinux.sh: Likewise.
2026-02-18 18:31:49 +00:00
Pádraig Brady e001f99d1e maint: tests: avoid ENOTSUP specific handling
* tests/mv/mv-exchange.sh: Use ENOTSUP rather than
transforming variations.
2026-02-18 18:31:49 +00:00
Pádraig Brady 5c073ec7c5 tests: use system EACCES message
* tests/chgrp/no-x.sh: Don't harcode "Permission denied".
* tests/chmod/no-x.sh: Likewise.
* tests/du/inacc-dest.sh: Likewise.
* tests/du/no-x.sh: Likewise.
* tests/misc/nohup.sh: Likewise.
* tests/mv/part-fail.sh: Likewise.
* tests/mv/perm-1.sh: Likewise.
* tests/rm/fail-eacces.sh: Likewise.
* tests/rm/rm1.sh: Likewise.
* tests/rm/rm2.sh: Likewise.
* tests/rm/unread2.sh: Likewise.
* tests/rm/unreadable.pl: Likewise.
2026-02-18 18:31:49 +00:00
Pádraig Brady fe997b5f98 maint: tests: avoid AIX specific EACCES handling
* tests/rm/inaccessible.sh: Remove AIX specific handling.
* tests/cp/fail-perm.sh: Likeise.  Also remove confusing
EPERM/HPUX mentions.
* tests/misc/sync.sh: Don't hardcode EISDIR and EACCES.
2026-02-18 18:31:49 +00:00
Pádraig Brady c03cc2dca6 maint: tests: avoid EPERM/EACCES specific handling
* tests/Coreutils.pm: Remove associated comment.
* tests/mv/sticky-to-xpart.sh: Use $EACCES and $EPERM.
* tests/rm/fail-2eperm.sh: Likewise.
* tests/touch/not-owner.sh: Likewise.
2026-02-18 18:31:49 +00:00
Pádraig Brady 6218f2b7a3 maint: tests: avoid EPERM specific handling
* tests/dd/fail-ftruncate-fstat.sh: Use $EPERM rather than
mapping specific strings to the Linux $EPERM.
* tests/mkdir/smack-no-root.sh: Use $EPERM rather than hardcoding.
2026-02-18 18:31:49 +00:00
Pádraig Brady 8a0d9b889f tests: pwd: ensure our getcwd fallback is tested
* tests/pwd/pwd-long.sh: Avoid the getcwd syscall,
to ensure our fallback getcwd code is exercised.
* NEWS: Mention the recent bug fix in pwd.
2026-02-17 00:41:50 +00:00
Collin Funk fec63bfa03 tests: date: check that options can follow the format string
* tests/date/date.pl (@Tests): Add the test case.
2026-02-13 22:26:59 -08:00
oech3 f638c29df6 tests: sort: ensure --batch-size=(rlimit+1) fails
* tests/sort/sort-merge-fdlimit.sh: Add test case.
https://github.com/coreutils/coreutils/pull/182
2026-02-12 17:27:49 +00:00
oech3 7f592adc44 tests: coreutils: remove redundant validity check
* tests/misc/coreutils.sh: Remove the check for non-empty coreutils.h,
as the existing `print_ver_ coreutils` is sufficient to determine
support for single binary mode.
https://github.com/coreutils/coreutils/pull/189
2026-02-12 17:12:16 +00:00
oech3 fc42e7d281 tests: cp: ensure --debug output failure is diagnosed
* tests/cp/debug.sh: cp diagnostics are written to stdout,
so ensure output errors are diagnosed.
https://github.com/coreutils/coreutils/pull/192
2026-02-12 16:33:38 +00:00
oech3 78e97507e6 tests: arch: add option parsing check
* tests/misc/arch.sh: Ensure -- to indicate end of options is accepted.
https://github.com/coreutils/coreutils/pull/191
2026-02-12 16:26:44 +00:00
Pádraig Brady b4c6e3cb7f tests: date: check dotted EU dates in combination
* tests/date/date.pl: Add other date elements
to ensure abbreviated dotted dates are parsed appropriately.
Corresponds to gnulib commit 451042cb76
2026-02-12 14:52:06 +00:00
Pádraig Brady 3d35e82b9b tests: determine errno string more efficiently
* tests/misc/read-errors.sh: Use getlimits_ determined EIO error string,
rather than inferring the string from bash's output.
See https://bugs.gnu.org/80353
2026-02-10 12:36:06 +00:00
Pádraig Brady 8732e7e95e tests: getlimits: output error strings
* src/getlimits.c (main): Iterate over defined errnos,
and output shell compatible error strings.
* tests/Coreutils.pm: Adjust so shell quotes are stripped.
2026-02-10 12:24:17 +00:00
Pádraig Brady 1317074513 maint: remove extraneous code from test
* tests/misc/usage_vs_refs.sh: Remove copy and paste slop.
* tests/local.mk: Fix indentation.
2026-02-09 11:32:57 +00:00
Collin Funk 6bbf04db63 nl: support multi-byte section delimiters
* NEWS: Mention the improvement.
* src/nl.c: Include mcel.h.
(DEFAULT_SECTION_DELIMITERS): Resize to fit 2 multi-byte characters.
(section_del_len): New variable.
(check_section): Compare against section_del_len instead of 2.
(main): Support multi-byte characters for the -d option.
* tests/nl/multibyte.sh: New file.
* tests/nl/nl.sh: New file, moved from tests/misc/nl.sh.
* tests/local.mk (all_tests): Add the new test. Adjust the existing
tests file name.
* cfg.mk (exclude_file_name_regexp--sc_space_tab): Adjust Adjust the
existing tests file name.
2026-02-08 18:45:24 -08:00
Pádraig Brady a3dbfb60e4 tests: fix false failure with dash or ksh
* tests/misc/read-errors.sh: Avoid dash or ksh as they
do _not_ print an error message upon EIO from read.
Fixes https://bugs.gnu.org/80353
2026-02-08 19:52:46 +00:00
Gabriel e2c7db6c70 date: add tests and NEWS for dd.mm.yy support
* NEWS: Mention the new feature.
* tests/date/date.pl: Add test cases.
2026-02-08 16:25:44 +00:00
oech3 1c4773e6ec tests: ptx: ensure bad unicode is supported
* tests/ptx/ptx-overrun.sh: Ensure bad_unicode() is processed.
2026-02-07 22:02:43 +00:00
Sylvestre Ledru 5901e4425a tests: cp: ensure read-only dir perms preserved
* tests/cp/readonly-dir.sh: Add new test.
* tests/local.mk: Reference new test.
Identified here https://github.com/uutils/coreutils/issues/7961
2026-02-07 21:54:24 +00:00
Collin Funk 94f13435b3 tests: fold: check that all files are processed
* tests/fold/multiple-files.sh: New file.
* tests/local.mk (all_tests): Add the test.
2026-02-06 15:46:44 -08:00
Collin Funk 4fb263ce69 tests: nl: check that all files are processed
* tests/misc/nl.sh: Add a test case.
2026-02-06 15:46:44 -08:00
oech3 9240ef6700 tests: ptx: add a robustness test case
* tests/ptx/ptx-overrun.sh: Ensure input is processed without issue.
https://github.com/coreutils/coreutils/pull/184
2026-02-06 13:51:24 +00:00
Collin Funk e0b2db00ad tests: df: check that --sync always calls sync before statfs
* tests/df/sync.sh: New file.
* tests/local.mk (all_tests): Add the test.
2026-02-04 16:49:12 -08:00
Pádraig Brady 41188ee3b8 tests: avoid false failure sync'ing busy systems
* tests/misc/sync.sh: Increase the timeout to 60s,
and restrict the case to when RUN_VERY_EXPENSIVE_TESTS=yes.
2026-02-02 12:55:37 +00:00
Paul Eggert d72a03cedb maint: space between ‘char’ and ‘*’ 2026-01-28 11:25:36 -08:00
Collin Funk 29cee19e18 tests: date: test that %% in the string is not replaced
* tests/date/percent-percent.sh: New file.
* tests/local.mk (all_tests): Add it.
2026-01-27 19:13:33 -08:00
Collin Funk 2bd3e8bb7a tests: tac: test --regex with anchors in the separator
* tests/tac/tac.pl (@Tests): Add a few test cases.
2026-01-26 18:37:37 -08:00
Collin Funk 9cb06a7d13 tests: mktemp: export LC_ALL
* tests/mktemp/bad-unicode.sh: Run this test case using multiple
locales.
2026-01-25 21:19:45 +00:00
Collin Funk c3894e0723 tests: chgrp: allow a numeric user id to be printed
* tests/chgrp/from.sh: If 'id' cannot find a user name for user id 1,
expect the user id to be printed in the message of 'chgrp'.
Reported by Bruno Haible.
2026-01-24 15:06:51 -08:00
Collin Funk ec77664a31 tests: avoid failures if 'ulimit -n' cannot set file descriptor limits
This fixes test failures seen on Haiku.

* tests/ls/recursive.sh: Run 'ls' even if ulimit fails.
* tests/split/r-chunk.sh: Run 'split' even if ulimit fails.
* tests/sort/sort-merge-fdlimit.sh: Skip test if 'ulimit -n' cannot set
file descriptor limits.
Reported by Bruno Haible.
2026-01-24 11:20:56 -08:00
Pádraig Brady 75c671415e tests: dd: avoid EPERM false failure on Solaris
* tests/dd/fail-ftruncate-fstat.sh: Also map the "Not owner"
error for EPERM seen on earlier Solaris 11 releases.
Reported by Bruno Haible.
2026-01-24 14:53:30 +00:00
Pádraig Brady acf0acd0c9 tests: stty: avoid false failure if resizing terminal
* tests/stty/stty-row-col.sh: Skip the test if we detect terminal
resizing.  Also more robustly restore the original size.
2026-01-24 12:49:52 +00:00
Collin Funk c351e1965d tests: readlink: avoid a false failure on Haiku
* tests/readlink/readlink-posix.sh: Allow the "A" in "Argument" to be
capitalized in return value of strerror (EINVAL).
2026-01-24 12:47:51 +00:00
Pádraig Brady bdf53cc685 tests: usage_vs_refs.sh: fix false failure with Alpine
* tests/misc/usage_vs_refs.sh: Fix missing escape on literal {,
required by busybox grep.
Reported by Bruno Haible.
2026-01-23 22:32:20 +00:00
Pádraig Brady 58ba9580e7 tests: fix false failure with pr -COLS
* tests/misc/usage_vs_getopt.sh: Fix false failure induced
by commit v9.9-239-ga06f0cf67
2026-01-22 11:56:50 +00:00
Pádraig Brady 87219034b7 doc: use TERM=dumb rather than HELP_NO_MARKUP to disable markup
This is a more standard mechanism to disable markup.

* src/system.h (oputs_): Logic change to honor TERM=dumb,
rather than HELP_NO_MARKUP=something.
* doc/coreutils.texi: Adjust the description for --help.
* man/local.mk: Ensure TERM is set to something,
so that man pages have links included.
* man/viewman: Just honor users $TERM.
* tests/misc/getopt_vs_usage.sh: Remove env var complication,
as TERM is unset automatically.
* tests/misc/usage_vs_refs.sh: Likewise.
* NEWS: Adjust the change in behavior note.
2026-01-22 11:42:47 +00:00
Pádraig Brady bdc45990c7 tests: avoid false failure with non standard path
* tests/misc/usage_vs_refs.sh: Properly quote arguments
to avoid false failure with paths containing spaces etc.
2026-01-21 19:30:21 +00:00
Pádraig Brady 3e57f08e36 tests: avoid infinite loop in dd failure edge case
* tests/tee/tee.sh: If dd failed, then tee would spin
writing to the fifo forever, so add a timeout protection.
This was noticed with `export LD_PRELOAD=libasan.so.8`
with a non ASAN build, which induced a failure in dd invocations.
2026-01-21 19:00:03 +00:00
Pádraig Brady f9eebda93c tests: avoid false failure with sanitizer builds
* init.cfg (sanitizer_build_): Add a helper to detect if a program
is built against a sanitizer.
* tests/df/no-mtab-status-masked-proc.sh: Skip if a sanitizer build.
2026-01-21 17:49:39 +00:00
Pádraig Brady 92df52d791 tests: avoid false failure on setgid dir
* tests/misc/mknod.sh: Skip a portion of the test
in the edge case of setgid directories.
2026-01-21 16:06:51 +00:00
Pádraig Brady dfeb32f6e2 ls: --hyperlink: switch to more standard delimiters
* src/ls.c (quote_name): Use ST (ESC \) rather than BEL,
as that's the only terminator mentioned in at least
ECMA-48, DEC STD 070, and EK-VT520-RM.
* NEWS: Mention the change in behavior.
* tests/ls/hyperlink.sh: Adjust accordingly.

Suggested by Egmont Koblinger.
2026-01-21 14:05:48 +00:00