Age | Commit message (Collapse) | Author |
|
* src/sort.c (SORT_OPTION): New enum.
(sort_args, sort_types): Define.
(usage, long_options, main): New option --sort.
* tests/sort/Test.pm: Test it.
* doc/coreutils.texi (sort invocation): Document --sort option.
* NEWS: Mention this.
|
|
* src/seq.c: (validate_format): New function.
(main): Use it.
* tests/misc/seq (fmt-d, fmt-e): Test for expected diagnostics with
invalid formats.
* NEWS: Mention this change.
* TODO: Remove this item.
[jm: src/seq.c: make diagnostics more consistent
tests/misc/seq (fmt-eos1): adjust the expected diagnostic ]
|
|
* src/join.c: Support --check-order and --nocheck-order.
New variables check_input_order, seen_unpairable and
issued_disorder_warning[]. For --check-order, verify that the
input files are in sorted order. For the default case, check the
order only if there are unpairable lines.
(join): Perform ordering checks after reaching EOF on either
input.
(usage): Mention --check-order and --nocheck-order.
(dupline): Save a copy of the previously-read input line so that
we can detect disorder on the input.
(get_line): Temporarily save a copy of the previous line (by
calling dupline) and check relative ordering (by calling
checkorder) before returning the newly-read line.
(getseq, join): Tell get_line which file we are reading from.
(advance_seq): New function, factoring out some of the code
commonly surrounding calls to getseq.
(checkorder): New function. Verifies that a pair of consecutive
input lines are in sorted order.
* doc/coreutils.texi (join invocation): Document the new options
--check-order and --nocheck-order.
* tests/join/Test.pm (tv): Added tests for --check-order and
--nocheck-order.
* NEWS: Mention this new feature.
|
|
* src/seq.c (long_double_format): Handle '%' at end of string.
* tests/misc/seq [fmt-eos1, fmt-eos2]: New tests for the bug.
* NEWS: Mention this.
Reported by Pádraig Brady.
|
|
* tests/misc/ls-misc: Adjust this test so each is run twice. First, as usual,
and the second time with LS_COLORS set using the default settings
produced by running dircolors.
* tests/Coreutils.pm: See below.
This required some changes:
- save and restore $ENV{LS_COLORS} for each individual test
that requires a specific value.
- Since this is the first test to call the run_tests command more
than once, it has exposed that that function erroneously modifies
the \@Tests array. Fix that in tests/Coreutils.pm.
|
|
In --color mode, plain files do not get any color, not even white.
When no highlighting is required, ls outputs no escape sequence at all.
* src/ls.c (print_with_color):
(used_color): New global.
(indicator_no) [C_RESET]: New enum value.
(indicator_name) ["rs"]: Corresponding new string.
(color_indicator): Make the 'normal' and 'file' markers be NULL.
Use "rs" (C_RESET) to reset to ordinary colors.
(process_signals): Restore default colors only if necessary.
(main): Don't call prep_non_filename_text here.
(print_name_with_quoting): Call it here, instead.
(prep_non_filename_text): Use C_RESET, not C_NORM.
(print_color_indicator): Return bool, not void.
Print nothing, when possible.
(put_indicator): Call prep_non_filename_text the first time.
* tests/misc/ls-misc: Test for above.
* tests/ls/color-dtype-dir: Adapt: no escapes around regular file name.
* TODO: Remove item.
* NEWS: Mention this.
|
|
* tests/check.mk (TESTS_ENVIRONMENT) [CONFIG_HEADER]: Define
to an absolute name, so it can be used from any point in the
test hierarchy. Reported by James Youngman.
|
|
* tests/mv/acl: Likewise.
* tests/cp/acl: Likewise.
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
|
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
|
|
|
* tests/strace: Remove file.
* tests/test-lib.sh (require_strace_): New function.
* tests/mv/atomic: Use require_strace_, rather than ". strace".
* tests/ls/stat-free-symlinks: Likewise.
Peter Fales reported that stat-free-symlinks failed without strace.
|
|
Reported by Peter Fales.
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
|
Since it creates no temporaries and since it requires non-root,
do the require-non-root bit in perl, rather than using test-lib.sh.
|
|
* tests/priv-check: Remove file.
* tests/Makefile.am (EXTRA_DIST): Remove priv-check.
* tests/test-lib.sh (require_root_): New function.
Use this function rather than sourcing the priv-check file.
* tests/sample-test: Use require_root_ rather than priv-check.
* tests/chown/basic: Likewise.
* tests/cp/cp-a-selinux: Likewise.
* tests/cp/preserve-gid: Likewise.
* tests/cp/special-bits: Likewise.
* tests/ls/nameless-uid: Likewise.
* tests/misc/chcon: Likewise.
* tests/mkdir/writable-under-readonly: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/rm/fail-2eperm: Likewise.
* tests/rm/no-give-up: Likewise.
* tests/rm/one-file-system: Likewise.
* tests/tail-2/append-only: Likewise.
* tests/touch/now-owned-by-other: Likewise.
* tests/rm/fail-eperm: Use skip_if_root_ rather than priv-check.
* Makefile.maint (sc_root_tests): Reflect this change:
search for the new function name.
|
|
* tests/require-perl: New file.
* tests/Makefile.am (EXTRA_DIST): Add require-perl.
* tests/dd/skip-seek: Use it, and remove manual tests.
* tests/du/files0-from: Likewise.
* tests/ls/nameless-uid: Likewise.
* tests/misc/base64: Likewise.
* tests/misc/basename: Likewise.
* tests/misc/cut: Likewise.
* tests/misc/date: Likewise.
* tests/misc/dircolors: Likewise.
* tests/misc/dirname: Likewise.
* tests/misc/expand: Likewise.
* tests/misc/expr: Likewise.
* tests/misc/factor: Likewise.
* tests/misc/fmt: Likewise.
* tests/misc/fold: Likewise.
* tests/misc/head-elide-tail: Likewise.
* tests/misc/ls-misc: Likewise.
* tests/misc/md5sum: Likewise.
* tests/misc/md5sum-newline: Likewise.
* tests/misc/mktemp: Likewise.
* tests/misc/od: Likewise.
* tests/misc/paste-no-nl: Likewise.
* tests/misc/pr: Likewise.
* tests/misc/pwd-long: Likewise.
* tests/misc/seq: Likewise.
* tests/misc/sha1sum: Likewise.
* tests/misc/sha1sum-vec: Likewise.
* tests/misc/sha224sum: Likewise.
* tests/misc/sha256sum: Likewise.
* tests/misc/sha384sum: Likewise.
* tests/misc/sha512sum: Likewise.
* tests/misc/sort-merge: Likewise.
* tests/misc/stat-printf: Likewise.
* tests/misc/sum: Likewise.
* tests/misc/sum-sysv: Likewise.
* tests/misc/test-diag: Likewise.
* tests/misc/tsort: Likewise.
* tests/misc/tty-eof: Likewise.
* tests/misc/unexpand: Likewise.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/xstrtol: Likewise.
* tests/mv/i-1: Likewise.
* tests/rm/empty-name: Likewise.
* tests/rm/fail-eperm: Likewise.
* tests/rm/unreadable: Likewise.
(EXTRA_DIST): *do* require require-perl as a stand-alone, 'source'able script.
|
|
* tests/mv/no-target-dir: Likewise.
* tests/other-fs-tmpdir: Likewise.
* tests/rm/empty-name: Likewise.
* tests/rm/fail-eperm: Likewise.
* tests/rm/inaccessible: Likewise.
* tests/rm/isatty: Likewise.
* tests/rm/unreadable: Likewise.
* tests/setgid-check: Likewise.
* tests/sparse-file: Likewise.
* tests/strace: Likewise.
* tests/tail-2/append-only: Likewise.
* tests/tail-2/big-4gb: Likewise.
* tests/tail-2/tail-n0f: Likewise.
* tests/touch/dangling-symlink: Likewise.
* tests/touch/fifo: Likewise.
* tests/touch/not-owner: Likewise.
* tests/mv/i-3: Likewise.
* tests/umask-check: Likewise.
* tests/mv/acl: Likewise.
* tests/cp/acl: Likewise.
* tests/chgrp/deref: Likewise.
* tests/chmod/setgid: Likewise.
* tests/cp/existing-perm-race: Likewise.
* tests/cp/file-perm-race: Likewise.
* tests/cp/parent-perm-race: Likewise.
* tests/du/2g: Likewise.
* tests/du/8gb: Likewise.
* tests/du/long-from-unreadable: Likewise.
* tests/du/long-sloop: Likewise.
* tests/du/slink: Likewise.
* tests/ls/nameless-uid: Likewise.
* tests/ls/stat-dtype: Likewise.
* tests/misc/cat-proc: Likewise.
* tests/misc/md5sum-newline: Likewise.
* tests/misc/nice: Likewise.
* tests/misc/od-x8: Likewise.
* tests/misc/pwd-unreadable-parent: Likewise.
* tests/misc/selinux: Likewise.
* tests/misc/stty-row-col: Likewise.
* tests/misc/tac-continue: Likewise.
* tests/misc/arch: Likewise, and source $srcdir/../test-lib.sh *before*
the use of skip_test_.
|
|
* tests/very-expensive: Remove file.
* tests/test-lib.sh (very_expensive_): New function.
* tests/Makefile.am (EXTRA_DIST): Remove very-expensive.
* tests/cp/perm: Call the new function, rather than sourcing the file.
* tests/tail-2/assert: Likewise.
* tests/tail-2/assert-2: Likewise.
* tests/du/2g: Likewise.
|
|
* tests/acl: Remove file.
* tests/test-lib.sh (require_acl_): New function.
* tests/cp/acl: Use require_acl_ instead.
* tests/mv/acl: Likewise.
* tests/Makefile.am (EXTRA_DIST): Remove acl.
|
|
|
|
* src/mkdir.c (verbose_output): New function.
(announce_mkdir): Use it.
* src/split.c (usage): Update.
* src/split.c (cwrite): Write to stdout, not stderr.
* doc/coreutils.texi (split invocation): Remove the mention
of --verbose output being printed to stderr.
* tests/mkdir/p-v: Redirect stdout, not stderr.
* tests/misc/split-a: Likewise.
* NEWS: Mention this change.
* TODO: Remove this item.
|
|
* tests/sort/Test.pm: Replace a vague ChangeLog reference with a URL.
|
|
* tests/check.mk (vc_exe_in_TESTS): Adapt to new constraint
that vc-list-files be run only from $(top_srcdir).
|
|
* tests/cp/parent-perm: Also check that perms of existing dest
dirs are changed to match those of corresponding src dir
|
|
* src/ls.c (gobble_file): Work around a bug in libselinux1-2.0.15
whereby getfilecon returns 0 yet sets the context to NULL.
Reported by Jan Moringen via Michael Stone in
http://bugs.debian.org/463043
* tests/ls/Makefile.am (TESTS): Add proc-selinux-segfault.
* tests/ls/proc-selinux-segfault: Test for the above fix.
* NEWS: Mention the fix.
|
|
This avoids another spurious Mac OS 10.5.1 (Darwin 9.1) test failure.
* tests/cp/preserve-gid: Accept a group ID of 0, as well.
Reported by Elias Pipping.
|
|
* tests/cp/preserve-gid: Set group as well as owner on ".".
Reported by Elias Pipping.
|
|
* tests/check.mk (vc_exe_in_TESTS): Remove t1 and t2 _first_,
in case they exist beforehand and are not writable.
* build-aux/check.mk (am__check_pre): Likewise, remove $@-t.
|
|
Suggestions from James Youngman and Pádraig Brady in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12218/focus=12227
|
|
* tests/cp/parent-perm: Accommodate the situation in which
chmod ("dir", 02755) returns 0 yet fails to set the S_ISGID bit.
|
|
* tests/misc/tty-eof: Uncomment a debug "warn".
This change happens to make this test far less likely to fail.
With that statement commented out, this test would fail about
20% of the time on my desktop. Now, it's gone 100 iterations
in a row with no failure.
|
|
* tests/cp/parent-perm: New script. Test today's change.
Based on reproducer from Jan Blunck.
* tests/cp/Makefile.am (TESTS): Add parent-perm.
|
|
* tests/touch/now-owned-by-other: New script. Test today's change.
* tests/touch/Makefile.am (TESTS): Add now-owned-by-other.
* tests/Makefile.am (all_t): Add td, a new root-only test.
(td): New target.
* NEWS: Mention the improvement.
|
|
* src/tr.c (skip_construct): New function.
(main): When processing a pair of case-converting classes, don't
iterate through the elements of each [:upper:] or [:lower:] class.
Reported by Gerald Pfeifer in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12218>.
* tests/tr/Test.pm [tolower-F]: New test for the above fix.
[upcase-xtra, dncase-xtra]: New tests, for a related code path.
* NEWS: Mention the tr bug fix.
|
|
* tests/sample-test: Likewise.
* doc/coreutils.texi: Likewise.
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
|
* tests/test-lib.sh (require_built_): New function.
* tests/misc/groups-version: Use it to skip this test if
either groups or id is not built.
|
|
|
|
* tests/misc/selinux: Test for today's bug fix.
* NEWS: Mention the SELinux "ls -l" fix.
|
|
* tests/cp/existing-perm-race: Update file mode.
|
|
* tests/cut/Test.pm: Adjust comment.
* tests/misc/cut: Likewise.
* tests/misc/ls-misc: Likewise.
* tests/misc/od: Likewise.
* tests/misc/stty-invalid: Likewise.
* tests/tr/Test.pm: Likewise.
|
|
* tests/cp/Makefile.am (TESTS): Add existing-perm-race.
* tests/cp/existing-perm-race: New test. It isn't much of a
test yet, since it's hard to catch the race, but it has a FIXME
that will let us do a better test later.
|
|
* tests/cp/fail-perm: Ensure that '.'s set-GID bit is off.
|
|
* tests/misc/ls-misc (shell_quote): New function.
Use it to quote file names derived from $abs_top_builddir,
in case it contains shell meta-characters. This is not currently
needed, since CuTmpdir detects the fishy name and skips the test.
But it's important enough to add the extra protection.
Reported by Ralf Wildenhues.
|
|
* tests/CuTmpdir.pm (import): If $ME is '-', use $prefix.
|
|
* tests/check.mk (TESTS_ENVIRONMENT): Quote $(abs_srcdir).
* tests/chmod/setgid: Quote absolute names.
* tests/misc/help-version: Likewise.
* tests/misc/pwd-unreadable-parent: Likewise.
* tests/rmdir/ignore: Likewise.
* tests/test-lib.sh: Likewise.
|
|
defined, because it then goes wild and changes the mode of all
directories below $HOME. Undefined $dir can happen if the test
is to be skipped because of an unsafe working directory name.
|
|
* tests/cp/preserve-gid: Split some long lines.
Prepend "+" to numeric uid and gid chown arguments, on principle.
Use skip_test_.
|
|
* tests/cp/preserve-gid: New file. Test for today's change.
* tests/cp/Makefile.am (TESTS): Add preserve-gid.
* tests/Makefile.am (all_t): Add tc.
(tc): New target.
|
|
* tests/misc/date (rel-1day, rel-plus1): New tests for the recent
change in gnulib's getdate.y.
* NEWS: Mention the fix.
|
|
* NEWS: Mention this change.
* doc/coreutils.texi (cp invocation): Describe the new behavior.
* src/copy.c: No longer include "canonicalize.h".
(copy_reg): Upon failure to open a dangling destination symlink, don't
canonicalize the name, but rather fail (default) or, with POSIXLY_CORRECT,
repeat the open call without O_EXCL (potentially dangerous).
* src/copy.h (struct cp_options) [open_dangling_dest_symlink]:
New member. Reorder the others, grouping "bool" and "enum"
members together.
* tests/cp/thru-dangling: Test for changed and new behavior.
* src/cp.c (cp_option_init): Initialize new member.
* src/install.c (cp_option_init): Likewise.
* src/mv.c (cp_option_init): Likewise.
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
|
* src/seq.c (print_numbers): Also handle first < last && step < 0.
* tests/misc/seq [empty-rev]: New test for this case.
|