aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
AgeCommit message (Collapse)AuthorFilesLines
7 hourstests: ptx: add a robustness test caseoech31-0/+3
* tests/ptx/ptx-overrun.sh: Ensure input is processed without issue. https://github.com/coreutils/coreutils/pull/184
44 hourstests: df: check that --sync always calls sync before statfsCollin Funk2-0/+56
* tests/df/sync.sh: New file. * tests/local.mk (all_tests): Add the test.
4 daystests: avoid false failure sync'ing busy systemsPádraig Brady1-2/+6
* tests/misc/sync.sh: Increase the timeout to 60s, and restrict the case to when RUN_VERY_EXPENSIVE_TESTS=yes.
9 daysmaint: space between ‘char’ and ‘*’Paul Eggert3-4/+4
10 daystests: date: test that %% in the string is not replacedCollin Funk2-0/+37
* tests/date/percent-percent.sh: New file. * tests/local.mk (all_tests): Add it.
11 daystests: tac: test --regex with anchors in the separatorCollin Funk1-0/+4
* tests/tac/tac.pl (@Tests): Add a few test cases.
12 daystests: mktemp: export LC_ALLCollin Funk1-0/+1
* tests/mktemp/bad-unicode.sh: Run this test case using multiple locales.
13 daystests: chgrp: allow a numeric user id to be printedCollin Funk1-1/+1
* 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.
13 daystests: avoid failures if 'ulimit -n' cannot set file descriptor limitsCollin Funk3-3/+5
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.
13 daystests: dd: avoid EPERM false failure on SolarisPádraig Brady1-2/+5
* tests/dd/fail-ftruncate-fstat.sh: Also map the "Not owner" error for EPERM seen on earlier Solaris 11 releases. Reported by Bruno Haible.
13 daystests: stty: avoid false failure if resizing terminalPádraig Brady1-3/+12
* tests/stty/stty-row-col.sh: Skip the test if we detect terminal resizing. Also more robustly restore the original size.
13 daystests: readlink: avoid a false failure on HaikuCollin Funk1-1/+3
* tests/readlink/readlink-posix.sh: Allow the "A" in "Argument" to be capitalized in return value of strerror (EINVAL).
14 daystests: usage_vs_refs.sh: fix false failure with AlpinePádraig Brady1-1/+1
* tests/misc/usage_vs_refs.sh: Fix missing escape on literal {, required by busybox grep. Reported by Bruno Haible.
2026-01-22tests: fix false failure with pr -COLSPádraig Brady1-1/+1
* tests/misc/usage_vs_getopt.sh: Fix false failure induced by commit v9.9-239-ga06f0cf67
2026-01-22doc: use TERM=dumb rather than HELP_NO_MARKUP to disable markupPádraig Brady2-3/+3
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-21tests: avoid false failure with non standard pathPádraig Brady1-2/+2
* tests/misc/usage_vs_refs.sh: Properly quote arguments to avoid false failure with paths containing spaces etc.
2026-01-21tests: avoid infinite loop in dd failure edge casePádraig Brady1-1/+1
* 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-21tests: avoid false failure with sanitizer buildsPádraig Brady1-1/+4
* 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-21tests: avoid false failure on setgid dirPádraig Brady1-3/+5
* tests/misc/mknod.sh: Skip a portion of the test in the edge case of setgid directories.
2026-01-21ls: --hyperlink: switch to more standard delimitersPádraig Brady1-2/+2
* 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-21tests: ensure there is an anchor for each --help optionPádraig Brady2-0/+72
* tests/misc/usage_vs_refs.sh: A new test to correlation options listed in --help, and anchors referenced in the texinfo (html) manual. * tests/local.mk: Add the new test.
2026-01-21doc: more indexing fixes in manualPádraig Brady1-2/+2
* doc/coreutils.texi: Add missing anchors. * src/pr.c (Usage): Adjust to use -COLS, to avoid a clash with the additional anchor added to the manual. Also markup the --columns option as done for other options. * tests/split/line-bytes.sh: Also fix --lines-bytes typo here.
2026-01-21doc: tweak tests to avoid false failure with --helpPádraig Brady2-2/+2
* tests/df/df-output.sh: Use a more relaxed match. * tests/du/inodes.sh: Likewise.
2026-01-21doc: ls: support styling and links in --help outputPádraig Brady1-2/+2
* src/ls.c (oputs): A new function that wraps puts(), but also highlights the --option-text portion, and adds links to the appropriate part of the online manual. (usage): Call oputs() rather than puts(). * doc/coreutils.texi (--help): Document new HELP_NO_MARKUP env var, which can be used in the edge case one wants to suppress ansi escapes. * tests/misc/getopt_vs_usage.sh: Use HELP_NO_MARKUP to ensure the test continues to pass.
2026-01-21tests: test: ensure whitespace ignored when parsing numbersPádraig Brady1-0/+1
* tests/test/test.pl: Add a test case.
2026-01-19tests: dd: avoid a false test failure on Solaris 11.4Collin Funk1-1/+4
* tests/dd/fail-ftruncate-fstat.sh: Replace the message used by Solaris 11.4 for strerror (EPERM) with the one we expect.
2026-01-19tests: sync: check that all files are processed even when errors occurCollin Funk1-0/+8
* tests/misc/sync.sh: Add the test case.
2026-01-19tests: sync: also test that -d and -f don't block on a FIFOCollin Funk1-1/+4
* tests/misc/sync.sh: Check 'sync fifo' with no arguments, -d, and -f separately. Only perform the check for -f if RUN_EXPENSIVE_TESTS=yes since it may be expensive.
2026-01-18tests: env.sh: avoid multi-call binary considerationsoech31-3/+6
A simpler fix than commit v9.9-4-g3b6efd555 which is less dependent on the exact behavior of a multi-call binary. * tests/env/env.sh: Use a local script rather than 'true'. which may be a symlinked multi-call binary. https://github.com/coreutils/coreutils/pull/174
2026-01-18tests: strace: consider splice a "read" syscallPádraig Brady2-6/+7
* tests/cksum/cksum-c.sh: Add 'splice' to the injection set. * tests/misc/read-errors.sh: Likewise. From https://github.com/coreutils/coreutils/pull/167
2026-01-18maint: prefer NULL to nullptrPádraig Brady2-9/+9
NULL is best for C as discussed at: https://bugs.gnu.org/66221#53 * bootstrap.conf: Remove dependency on nullptr. * s/nullptr/NULL/.
2026-01-18tests: use `command -v` to identify binaryPádraig Brady1-1/+1
* tests/misc/coreutils.sh: Be more flexibile by using `command -v` to identify the binary to be executed, rather than linking directly to the built binary.
2026-01-17tests: avoid a test hang on AIXCollin Funk2-0/+2
* init.cfg (uses_strace_): New function. (require_strace_): Use it. tests/cksum/cksum-c.sh: Likewise. tests/misc/read-errors.sh: Likewise.
2026-01-16maint: spelling fixesPaul Eggert3-4/+4
2026-01-15all: with multi-call binary, only process options for known namesPádraig Brady1-5/+12
Setup $ ln -nsf src/coreutils foo Before $ ./foo; echo $? foo: unknown program ‘foo’ Try './foo --help' for more information. 1 ./foo --version; echo $? coreutils (GNU coreutils) 9.9.172-01993 0 After $ ./foo; echo $? coreutils: unknown program 'foo' 1 $ ./foo --version; echo $? coreutils: unknown program 'foo' 1 * src/coreutils.c (main): Don't process options if we don't know they're intended for the multi-call binary. Otherwise `foo --version` would return true, even though foo was symlinked to the multi-call binary, but not supported. * tests/misc/coreutils.sh: Add test cases. * NEWS: Mention the change in behavior.
2026-01-13tests: ensure utilities correctly diagnose read errorsPádraig Brady1-0/+24
* tests/misc/read-errors.sh: Ensure each utility calls a read system call as requested. Not doing so (say by avoiding reading from a directory) is a layering violation. Also ensure we diagnose the particular error encountered.
2026-01-13paste: support multi-byte delimitersPádraig Brady3-1/+105
* src/paste.c (collapse_escapes): This is the central --delimiters parsing function, so adjust to handle multi-byte chars with mcel_scanz(). Populate a delimiters length array to support characters of differing lengths. (paste_serial): Use the delimiters length array to output the appropriate delimiter. (paste_parallel): Likewise. * tests/paste/multi-byte.sh: A new test. * tests/local.mk: Reference the new test. * NEWS: Mention the improvement.
2026-01-13tests: nice: ensure large values are clampedoech31-1/+4
* tests/nice/nice.sh: Ensure integers > UINTMAX_MAX are supported. From https://github.com/coreutils/coreutils/pull/170
2026-01-12tests: cksum: use more general strace syscall injectionDmitry V. Levin1-3/+3
* tests/cksum/cksum-c.sh: Match "read" with a regex to match any of the read syscall variants.
2026-01-12tests: paste -d: test supported escape sequencesPádraig Brady1-0/+15
* tests/misc/paste.pl: Test all supported POSIX and GNU backslash escape sequences.
2026-01-11tests: date: test nested parenthesis comment handlingPádraig Brady1-0/+5
* tests/date/date.pl: Add test cases. Suggested by Sylvestre Ledru.
2026-01-11tests: cksum: ensure --check handles I/O errorsoech31-0/+18
* tests/cksum/cksum-c.sh: Use strace to inject EIO upon read(), and verify it's handled appropriately. From https://github.com/coreutils/coreutils/pull/167
2026-01-11tests: cksum: ensure --check diagnoses read errorsPádraig Brady1-0/+1
* tests/misc/read-errors.sh: Add a test case. Discussed in https://github.com/coreutils/coreutils/pull/167
2026-01-10cksum: promptly diagnose write errorsCollin Funk1-0/+3
* src/cksum.c (output_file, digest_check): Check if standard output has it's error flag set after printing. * tests/misc/write-errors.sh: Add a test case that would previously run forever. * NEWS: Mention the improvement. Reorder alphabetically.
2026-01-10maint: remove redundant processing in a testPádraig Brady1-3/+4
* tests/misc/write-errors.sh: This was a no-op anyway due to inadequate escaping. Also document the escaping requirement.
2026-01-10du: promptly diagnose write errorsPádraig Brady1-0/+1
* src/du.c (print_size): Call write_error() if can't flush. * tests/misc/write-errors.sh: Add a test case. * NEWS: Mention the improvement.
2026-01-10wc: promptly diagnose write errorsPádraig Brady1-0/+1
* src/wc.c (write_counts): Call write_error() if any pending errors. * tests/misc/write-errors.sh: Add a test case. * NEWS: Mention the improvement.
2026-01-08cksum: validate options more consistentlyPádraig Brady2-3/+15
We disallow `cksum --tag --check` which is fine, but the error should be consistent with md5sum, and less confusing, as it currently mentions "--binary" and "--text" which weren't specified. We disallow `cksum --tag --text` which is fine, but we should also disallow `cksum --text --tag`. We should honor an explicit --binary (output *) with this combination of options: cksum --binary --tag --untagged -a md5 /dev/null Note this also makes both of `cksum -a md5` and `cksum --tag -a md5` consistently use binary mode when reading from a tty on systems like MinGW where O_BINARY is set. * src/cksum.c (main): Adjust --text,--binary and --tag,--untagged option processing. * tests/cksum/cksum-a.sh: Add test cases. * tests/cksum/cksum-c.sh: Likewise. * NEWS: Mention the improvement. Fixes https://github.com/coreutils/coreutils/issues/163
2026-01-08tests: chmod: fix false failure in recent testPádraig Brady1-1/+6
* tests/chmod/partial-fail.sh: Test readablility of mode 0 files independently, to avoid false failure, e.g., when run as root. Reported by Bruno Haible.
2026-01-08tests: tail/overlay-headers.sh: fix various issuesPádraig Brady1-4/+21
* tests/tail/overlay-headers.sh (cleanup_): Ensure we send SIGCONT to the tail process, otherwise we would hang if the test is terminated while the tail process is in stopped state. (wait4stopped_): A new function to ensure tail is in the stopped state before we start writing to the monitored files. Also remove "---disable-inotify" from $fastpoll so we actually test the inotify code (where supported). Also remove the timeout(1) wrapper, so we actually suspend tail(1). Reported by Bruno Haible on macOS 26