Commit Graph
1474 Commits
Author SHA1 Message Date
Sylvestre Ledru dc159f5fa0 tests: dircolors: check TERM filtering of the built-in database
* tests/misc/dircolors.pl (builtin-no-term, builtin-unknown-term)
(builtin-unknown-term-ls): New tests, ensuring the built-in database
is filtered by TERM and COLORTERM, like a user-supplied one.

https://github.com/uutils/coreutils/pull/14408

Link: https://github.com/coreutils/coreutils/pull/460
2026-11-15 15:59:16 +00:00
Pádraig Brady 4188d50eb4 tests: use more robust user and group matching
* tests/chgrp/from.sh: Force numeric lookup.
* tests/chmod/setgid.sh: Likewise.
* tests/chown/basic.sh: Likewise.
* tests/chown/preserve-root.sh: Likewise.
* tests/install/install-C-immutable.sh: Likewise.
* tests/install/install-C-root.sh: Likewise.
* tests/ls/nameless-uid.sh: Likewise.
* tests/misc/traversal-missing.sh: Likewise.
* tests/misc/user.sh: Likewise.
* tests/chown/deref.sh: Likewise.  Also avoid
name lookup which may fail if they contain spaces.
* tests/chown/verbose-dangling-symlink.sh: Likewise.
* tests/chgrp/verbose-dangling-symlink.sh: Likewise.
2026-11-08 15:29:10 +00:00
Sylvestre Ledru 566aeee281 tests: realpath: ensure realpath -s -e fails on a dangling symlink
Reported at https://github.com/uutils/coreutils/issues/15996

* tests/misc/realpath.sh: Add test case.

Link: https://github.com/coreutils/coreutils/pull/432
2026-11-07 12:35:10 +00:00
Sylvestre Ledru c1265262f9 tests: mkdir, mkfifo: ensure a numeric mode followed by ',' is rejected
Reported at https://github.com/uutils/coreutils/issues/16001

* tests/misc/mknod.sh: Add test cases.

Link: https://github.com/coreutils/coreutils/pull/425
2026-11-07 12:35:10 +00:00
Sylvestre Ledru e2d537ace6 tests: mkfifo: ensure a -m value starting with '-' is accepted
Reported at https://github.com/uutils/coreutils/issues/16000

* tests/misc/mknod.sh: Add test case.

Link: https://github.com/coreutils/coreutils/pull/422
2026-11-07 12:35:10 +00:00
Sylvestre Ledru c310a8f0e5 tests: cp, ln, mv, install: ensure an empty --backup= acts like --backup
Reported at https://github.com/uutils/coreutils/issues/15988

* tests/misc/empty-backup-suffix.sh: Add test cases.

Link: https://github.com/coreutils/coreutils/pull/421
2026-11-07 12:35:10 +00:00
Pádraig Brady 67b6801ad3 cksum: use more defensive file name escaping
Similarly to commit v9.10-115-gb3fe24213, which applied
the same quoting mechanism to --check operation,
also quote file names when generating checksums to tty.
This change gives these advantages:

  1. Avoids dumping arbitrary data to vulnerable terminals
  2. Avoids visual deception with ansi codes with unknown file names
  3. More secure if users copy and paste file names from output

* doc/coreutils.texi (sum invocation): Mention the tty quoting
and reference the details from ...
(cksum output modes): Describe the two forms of quoting used.
* tests/misc/tty-quoting.sh: Add test cases.
* NEWS: Mention the improvement.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-Z25BP6MW.
2026-11-06 23:55:00 +00:00
Collin Funk 95063b7ddc dircolors: escape history substitution when using csh syntax
* src/dircolors.c (syntax): New global variable.
(append_quoted): Escape '!' if we are using 'csh' syntax to prevent
history substitution.
(main): Remove the syntax variable that was made global.
* tests/misc/dircolors.pl (@Tests): Add a test case.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-SFBDLZ6V.
2026-11-03 22:44:37 -08:00
Pádraig Brady 1d52335d5b od: with --strings, exit promptly upon write error
* tests/misc/write-errors.sh: Add a test case.
* src/od.c (dump_strings): Call write_error() in the processing loop.
* NEWS: Mention the improvement.
2026-10-31 17:57:30 +00:00
Pádraig Brady 977b071eaf tests: add checks for recent strftime fixes
Add docs and tests for the recent gnulib strftime fixes.

* tests/misc/strftime.sh: Add a new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fixes.
Fixes https://bugs.gnu.org/82130
2026-10-30 17:58:15 +00:00
Pádraig Brady ff1141fcec tests: make process cleanup more robust
* tests/cat/cat-buf.sh: Always call 'wait' in case the process already
exited before being killed.
* tests/cp/existing-perm-race.sh: Likewise.
* tests/cp/file-perm-race.sh: Likewise.
* tests/cp/parent-perm-race.sh: Likewise.
* tests/cp/sparse-to-pipe.sh: Likewise.
* tests/du/move-dir-while-traversing.sh: Likewise.
* tests/help/help-version.sh: Likewise.
* tests/misc/stdbuf.sh: Likewise.
* tests/mv/i-3.sh: Likewise.
* tests/printf/printf-surprise.sh: Likewise.
* tests/rm/isatty.sh: Likewise.
* tests/sort/sort-compress-proc.sh: Likewise.
* tests/sort/sort-spinlock-abuse.sh: Likewise.
* tests/tail/F-headers.sh: Likewise.
* tests/tail/F-vs-missing.sh: Likewise.
* tests/tail/F-vs-rename.sh: Likewise.
* tests/tail/append-only.sh: Likewise.
* tests/tail/assert-2.sh: Likewise.
* tests/tail/assert.sh: Likewise.
* tests/tail/debug.sh: Likewise.
* tests/tail/descriptor-vs-rename.sh: Likewise.
* tests/tail/follow-name.sh: Likewise.
* tests/tail/follow-stdin.sh: Likewise.
* tests/tail/follow-symlink.sh: Likewise.
* tests/tail/inotify-dir-recreate.sh: Likewise.
* tests/tail/inotify-hash-abuse.sh: Likewise.
* tests/tail/inotify-hash-abuse2.sh: Likewise.
* tests/tail/inotify-parent-hash.sh: Likewise.
* tests/tail/inotify-rotate.sh: Likewise.
* tests/tail/pid.sh: Likewise.
* tests/tail/pipe-f2.sh: Likewise.
* tests/tail/retry.sh: Likewise.
* tests/tail/symlink.sh: Likewise.
* tests/tail/tail-n0f.sh: Likewise.
* tests/tail/truncate.sh: Likewise.
* tests/tail/wait.sh: Likewise.
* tests/tee/tee.sh: Likewise.
* tests/timeout/timeout-group.sh: Likewise.
* tests/rm/dangling-symlink.sh: Likewise.
Also avoid redundant cleanup_ calls.
* tests/tail/flush-initial.sh: Likewise.
* tests/tail/inotify-rotate-resources.sh: Likewise.
2026-10-25 13:11:49 +00:00
Collin Funk 50a76c6ce0 mv: don't block when setting the SELinux security context on a FIFO
* src/selinux.c (restorecon_private): Open the file with O_NOCTTY and
O_NONBLOCK.
* tests/misc/selinux.sh: Add a test case.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-L5GJ7M7X.
2026-10-24 12:22:36 -07:00
Pádraig Brady ad7e743cff tests: avoid use of $abs_top_builddir where possible
* init.cfg (single_binary_build_): An abstraction to check
if the current build is a functional --enable-single-binary build.
(require_safe_builddir_): Also add an abstraction to check for
whitespace in $abs_top_builddir.
* tests/misc/proc-self-comm.sh: Just warn about a non functional
dispatch binary.
* tests/install/basic-1.sh: Use the abstraction which is more accurate
when a stub src/coreutils binary is present.
Also fix up an incorrect skip_ edge case.
* tests/misc/responsive.sh: Use require_safe_builddir_.
* tests/misc/stdbuf.sh: Likewise.
* tests/misc/exec-bad-unicode.sh: Clarify a comment.
2026-10-20 16:36:08 +01:00
Collin Funk 54e1938105 tests: avoid a false failure on some systems
* tests/misc/proc-self-comm.sh: Make sure the 'coreutils' program is the
one we just built.
Reported by Bruno Haible.
2026-10-19 20:05:56 -07:00
Collin Funk 056730f7dd tests: misc: fix a false failure in paths containing spaces
* tests/misc/proc-self-comm.sh: Quote variables that contain the current
working directory, which may contain spaces. Don't set symlink_cat to a
multi-argument command invocation. Set the path before executing it.
Reported by Bruno Haible.
2026-10-18 17:43:23 -07:00
Collin Funk 1d5142dc09 all: use the basename of argv[0] for the comm value in the single binary
This preserves any program name transformations, e.g., when
--program-prefix=g is used as a configuration option, unlike commit
ef874ed6c (all: set /proc/self/comm to the program name in the single
binary, 2026-10-17).

* src/coreutils.c (launch_program): Use the last component of argv[0]
when setting the comm value using prctl (PR_SET_NAME, ...).
* tests/misc/proc-self-comm.sh: When using
--enable-single-binary=shebangs, test that the comm value preserves any
program name transformations, e.g., --program-prefix=g.
* NEWS: Adjust the NEWS entry to refer to last component of argv[0]
instead of the program name.
Suggested by Pádraig Brady.
2026-10-18 09:43:44 -07:00
Collin Funk b5bc155d69 tests: misc: test that /proc/self/comm is properly set
This tests the fix introduced by commit ee9b9aff8 (all: set
/proc/self/comm to the program name in the single binary, 2026-10-17).

* tests/misc/proc-self-comm.sh: New file.
* tests/local.mk (all_tests): Add the new test.
2026-10-16 21:12:35 -07:00
Pádraig Brady d72f4a84c2 tests: avoid a false failure with sanitizers
* tests/misc/exec-bad-unicode.sh: Avoid stdbuf running non instrumented
binaries, because the LD_PRELOADED libstdbuf.so may then get link errors
due to it not linking with the sanitizer runtime, and neither does
a non instrumented binary.  So instead of running $SHELL, avoid the
issue by running our echo binary directly, which should provide
the sanitizer lib.  Using our built binary in the shebang also
implicitly checks for problematic whitespace in the path.
2026-10-13 20:36:42 +01:00
Pádraig Brady e1bb670aff tests: fix currently always skipped test
* tests/misc/tty-quoting.sh: Since commit v9.12-10-g782a1e5bc,
env(1) calls isatty() and thus induces another ioctl()
which causes the test to skip.  The env(1) is redundant anyway
as strace will avoid shell builtins, so just remove the redundant
env calls.
2026-10-12 20:55:24 +01:00
Collin Funk 9a38bb9186 tests: misc: skip a test if the absolute top build dir is unsafe
Without this change, this test would fail during 'make distcheck', for
example.

* tests/misc/exec-bad-unicode.sh: Skip the test if $abs_top_builddir has
spaces or special characters.
* cfg.mk (_tb_misc): Also match tests/misc/exec-bad-unicode.sh.
Reported by Bruno Haible.
2026-10-06 20:21:43 -07:00
Pádraig Brady e6c09ec0b1 tests: fix false failure on SELinux disabled systems
* tests/misc/no-fork.sh: Use an "unused" placeholder
so runcon is invoked with the correct number of arguments
where `id -Z` doesn't return anything.
This is needed since commit v9.12-53-g8555a51f2
2026-10-05 12:37:08 +01:00
Collin Funk 98c8b158b6 tests: make checks for $LOCALE_FR and $LOCALE_FR_UTF8 consistent
* tests/cp/non-utf8-name.sh: Check for $LOCALE_FR and $LOCALE_FR_UTF8
being empty or the string "none".
* tests/date/percent-percent.sh: Likewise.
* tests/du/block-size.sh (test_unit): Likewise.
* tests/ls/non-utf8-hidden.sh: Likewise.
* tests/mktemp/bad-unicode.sh: Likewise.
* tests/sort/sort-unique.sh: Likewise.
* tests/df/problematic-chars.sh:  Check for $LOCALE_FR_UTF8 being empty
or the string "none".
* tests/expand/mb.sh: Likewise.
* tests/fold/fold-characters.sh: Likewise.
* tests/fold/fold-nbsp.sh: Likewise.
* tests/fold/fold-spaces.sh: Likewise.
* tests/fold/fold-zero-width.sh: Likewise.
* tests/join/join-utf8.sh: Likewise.
* tests/misc/sleep.sh: Likewise.
* tests/nl/multibyte.sh: Likewise.
* tests/paste/multi-byte.sh: Likewise.
* tests/printf/printf-mb.sh: Likewise.
* tests/printf/printf-quote.sh: Likewise.
* tests/sort/sort-debug-keys.sh: Likewise.
* tests/unexpand/mb.sh: Likewise.
2026-10-04 15:31:59 -07:00
Collin Funk cf98d8e8ca tests: misc: test programs can execute invalid Unicode program names
* tests/misc/exec-bad-unicode.sh: New file.
* tests/local.mk (all_tests): Add the new test.
2026-10-04 14:31:04 -07:00
Collin Funk 8555a51f2d tests: misc: avoid an unnecessary 'eval'
* tests/misc/no-fork.sh: Adjust the quoting of the printf call instead
of using 'eval'.
2026-10-04 11:24:08 -07:00
Collin Funk 40e0b385b7 tests: realpath: add some additional tests for symlink loops
* tests/misc/realpath.sh: Test the flags supported by 'realpath' that
would previously infinite loop before commit b66f3e4e2 (realpath: fix an
infinite loop when resolving symbolic links, 2026-09-25). Test an
invocation which would avoid the infinite loop by not touching the file.
2026-09-29 20:10:24 -07:00
Collin Funk b66f3e4e27 realpath: fix an infinite loop when resolving symbolic links
Reported by Brian Foster in:
<https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/2161155>

* gnulib: Update to get commit b18879b9ed (canonicalize: Fix a missing
check for symlink loops., 2026-09-25)
* tests/misc/realpath.sh: Add a call to getlimits_. Add a test case.
* NEWS: Mention the bug fix.
2026-09-25 20:32:56 -07:00
Sylvestre Ledru 885849853d tests: echo: check that \u, \U and \" are not escapes
* tests/misc/echo.sh: Ensure 'echo -e' outputs \", \u and \U verbatim,
with their backslash, as they are not escape sequences for echo
(unlike printf).  Also cover truncated, non-hexadecimal, surrogate and
out-of-range payloads after \u and \U.
  Reported https://github.com/uutils/coreutils/issues/14414

Link: https://github.com/coreutils/coreutils/pull/346
2026-09-22 12:03:30 +01:00
Pádraig Brady f76b1d7ca5 maint: move tests/misc/xattr.h to tests/cp/
* tests/misc/xattr.sh: Rename to ...
* tests/cp/xattr.sh: ... here.
* tests/local.mk: Update the reference.
2026-09-18 17:53:00 +01:00
Pádraig Brady 182225b05a tests: avoid false failures due to xattr ENOTSUP warnings
E.g. with podman we get default SELinux context mount options
for /dev/shm and /, resulting in all files getting context like
the following when created:
  security.selinux="system_u:object_r:container_file_t:s0:c458,c677"

However you can't explicitly set that xattr:

  $ touch file
  $ setfattr -n "security.selinux" \
    -v "system_u:object_r:container_file_t:s0:c458,c677" file
  setfattr: file: Operation not supported

* tests/mv/part-symlink.sh: Avoid the issue.  Note this is new
since v9.12 as mv now warns about xattr ENOTSUP failures.
* tests/misc/xattr.sh: Avoid the issue (which would have
existed before v9.12).
2026-09-18 17:48:14 +01:00
Pádraig Brady b257228543 maint: move tests/misc/printenv.h to tests/env/
* tests/misc/printenv.sh: Rename to ...
* tests/env/printenv.sh: ... here.
* tests/local.mk: Update the reference.
2026-09-17 08:52:12 +01:00
Pádraig Brady f799b2f48a env,printenv: support --quoting-style to control quoting
Quoting is currently only enabled by default when writing to terminals,
but it is usually desired to constrain the output format for processing.
E.g. for processing by a shell you can now:

  env --quoting-style=shell-escape | grep ^FOO

We use an option rather than reyling on $QUOTING_STYLE so
that $QUOTING_STYLE is restricted to be user config for terminals
and does not impact redirected processing.
Also it avoids an extra getenv() call if not outputting to tty.

* src/env.c (main): Parse --quoting-style and use that for the output
format for all outputs.
* src/printenv.c (main): Likewise.
* doc/coreutils.texi (env invocation): Describe --quoting-style.
(printenv invocation): Likewise.
* tests/env/env.sh: Reinstate testing of various output modes.
* tests/misc/printenv.sh: Likewise.
* NEWS: Mention the new feature.  Also mention the change from
the previous commit not done there so that builders would have
a clean patch against the previous release.
2026-09-17 08:52:12 +01:00
Pádraig Brady 782a1e5bc2 env,printenv: only quote when outputting to terminals
To support albeit non-robust but existing use cases like:

  env | grep SPARK_JAVA_OPT_ | sort -t_ -k4 -n |
   sed 's/[^=]*=\(.*\)/\1/g' > java_opts.txt
  readarray -t SPARK_EXECUTOR_JAVA_OPTS < java_opts.txt
  ...
  CMD=("${JAVA_HOME}/bin/java" "${SPARK_EXECUTOR_JAVA_OPTS[@]}" ...)

* src/env.c (main): Restrict quoting to terminals.
* src/printenv.c (main): Likewise.
* tests/env/env.sh: Adjust accordingly.
* tests/misc/printenv.sh: Likewise.
* doc/coreutils.texi: Likewise.

Link: https://github.com/coreutils/coreutils/issues/355
2026-09-17 08:52:12 +01:00
Collin Funk e4a3653bc3 tests: printenv: fix a false failure on GNU/Hurd
* tests/misc/printenv.sh: Also filter out LD_ORIGIN_PATH.
2026-09-10 21:00:04 -07:00
Pádraig Brady b3cdc09344 tests: avoid hangs with strace on cygwin
`strace -e tee true` will run the tee command on cygwin,
rather than filtering for the tee syscall.
Reported by Bruno Haible on Cygwin 2.9.0

* init.cfg: Use -e trace=foo where foo might be a command,
so that strace probes will fail rather than invoke foo on Cygwin.
* tests/cat/cat-distinct-err.sh: Likewise.
* tests/cat/splice.sh: Likewise.
* tests/ls/no-cap.sh: Likewise.
* tests/misc/yes.sh: Likewise.
* tests/mv/atomic.sh: Likewise.
* tests/mv/atomic2.sh: Likewise.
* tests/nproc/nproc-quota.sh: Likewise.
* tests/pwd/pwd-long.sh: Likewise.
* tests/stty/stty.sh: Likewise.
* tests/tail/debug.sh: Likewise.
* tests/tail/inotify-only-regular.sh: Likewise.
2026-09-10 16:40:06 +01:00
Collin Funk ea1c2b1787 printenv: don't quote output when given arguments and redirected
* src/printenv.c (main): Make sure quoting is disabled when we have
arguments and standard output is not a terminal.
* tests/misc/printenv.sh: Adjust single argument test cases. Add
multiple argument test cases.
* tests/misc/tty-quoting.sh: Add test cases to check if isatty is used.
* doc/coreutils.texi (printenvAlwaysQuoted): Remove macro.
(printenv invocation): Describe the adjusted quoting behavior.
(env invocation): Move the text from printenvAlwaysQuoted here since it
is no longer used for 'printenv'.
2026-08-31 18:15:39 -07:00
Collin Funk 29933e8a5c tests: misc: test that various commands don't fork
* tests/misc/no-fork.sh: New file.
* tests/local.mk (all_tests): Add the new test.
* tests/misc/stdbuf.sh: Remove a test that is redundant with the new
test.
2026-08-28 22:10:34 -07:00
oech3 5e011122e5 tests: misc: support referencing of external commands
* tests/misc/close-stdout.sh: Use env instead of
$abs_top_builddir for external usage of tests.

Link: https://github.com/coreutils/coreutils/pull/338
2026-08-27 16:57:33 +01:00
Pádraig Brady ff91f242fd tests: provide a cmd_exe helper to find a program binary
init.cfg (cmd_exe): Provide a function to find the command under test,
whether in the $PATH or in the standard build directory.
* tests/env/env0-from.sh: Use it instead of `command -v`.
* tests/misc/coreutils.sh: Likewise.
* tests/nproc/nproc-quota.sh: Likewise.
* tests/env/env.sh: Likewise.  Also remove non robust use of sed.
2026-08-26 15:18:08 +01:00
Collin Funk 32f109ca8e tests: pathchk: test the output to standard error for empty file names
* tests/misc/pathchk.sh: Move the existing empty file name tests to a
loop to check some additional options. Check the message printed to
standard error.
2026-08-22 19:55:33 -07:00
Collin Funk aa0c0de350 tests: stdbuf: check that a child process isn't created
* tests/misc/stdbuf.sh: Add a test case.
2026-08-20 22:56:49 -07:00
Collin Funk d458e11b2c tests: cp,mv,install: check for data loss with an empty backup suffix
* tests/misc/empty-backup-suffix.sh: New file.
* tests/local.mk (all_tests): Add the new test.
2026-08-15 18:52:54 -07:00
Arun Bhattacharya 162ddbe972 uname: add -A,--all-labeled to print labeled lines
* doc/coreutils.texi (uname invocation): Describe -A,--all-labeled.
* src/uname.c (main): Accept new option.
(print_element): Also output label if enabled.
* tests/misc/uname-labeled.sh: Add a new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the new feature.

Link: https://github.com/coreutils/coreutils/issues/313
2026-08-12 15:42:48 +01:00
Collin Funk f5e1fd3126 tests: env,printenv: fix test failures on macOS
* tests/env/env.sh: Filter out __CF_USER_TEXT_ENCODING from the output.
Make the regex more strict.
* tests/misc/printenv.sh: Likewise.
Reported by Bruno Haible.
2026-08-10 19:25:38 -07:00
Collin Funk 328322ca64 printenv,env: quote problematic variables
* doc/coreutils.texi (printenvAlwaysQuoted): New macro.
(printenv invocation): Use it.
(env invocation): Use it.
* src/printenv.h: New file.
* src/local.mk (noinst_HEADERS): Add it.
(src_env_SOURCES): Likewise. Group with src_printenv_SOURCES.
(src_printenv_SOURCES): New variable.
* src/printenv.c: Include argmatch.h and printenv.h.
(main): Quote printed variable names and values.
* src/env.c: Include argmatch.h and printenv.h.
(main): Quote printed variable names and values.
* tests/misc/printenv.sh: Add test cases.
* tests/env/env.sh: Likewise. Adjust invalid UTF-8 test cases.
* NEWS: Mention the change in behavior.
2026-08-05 21:29:35 -07:00
Collin Funk 6b8c706233 test: dirname: add tests for -z
* tests/misc/dirname.pl (@Tests): Add a few test cases.
2026-08-02 11:24:43 -07:00
Collin Funk 657394655b dirname: quote problematic names on tty
* doc/coreutils.texi (terminalQuoted): New macro.
(readlink invocation, basename invocation, dirname invocation): Use it.
* src/dirname.c (quote_output): New variable.
(main): Quote output when appropriate.
* src/system.h (quoteN_mem): New macro.
* tests/misc/dirname.pl: Add test cases based on the ones added for
basename in commit e897dfd02 (basename: quote problematic names on tty,
2026-07-30). Copy some logic from tests/misc/basename.pl to test the -z
option.
* tests/misc/tty-quoting.sh: Also test dirname.
* NEWS: Mention the improvement.
2026-08-02 11:13:24 -07:00
Pádraig Brady cdfaf73b8f tests: add tests to ensure quoting to tty
* tests/misc/tty-quoting.sh: Add positive test for
basename, du, ls, readlink, and realpath quoting.
* tests/local.mk: Reference the new test.
2026-08-01 13:03:38 +01:00
Pádraig Brady e897dfd023 basename: quote problematic names on tty
* doc/coreutils.texi (basename invocation): Mention $QUOTING_STYLE
is significant.
* src/basename.c (perform_basename, main): Quote output when
appropriate.
* tests/misc/basename.pl: Add a test case.
* NEWS: Mention the improvement.
2026-08-01 12:38:28 +01:00
Pádraig Brady 05ab72f236 realpath: quote problematic names on tty
* doc/coreutils.texi: Mention $QUOTING_STYLE is significant.
* src/realpath.c (print_relative_path): New function to buffer
relative paths when quoting, and otherwise stream them.
(main): Look up $QUOTING_STYLE when outputting to a tty and
--zero is not specified.
* tests/misc/realpath.sh: Add a test case.
* NEWS: Mention the improvement.
2026-08-01 12:38:28 +01:00
Pádraig Brady 8f7ed6cf50 maint: refactor stat syscall determination
* init.cfg (+get_stat_syscalls_): Refactor from ...
* tests/ls/stat-free-color.sh: ... here.
* tests/ls/stat-free-symlinks.sh: ... here.
* tests/misc/traversal-missing.sh: ... here.
* tests/shred/fifo.sh: .. here.
2026-07-24 13:19:23 +01:00