Jim Meyering [Sun, 11 May 2008 07:00:59 +0000 (09:00 +0200)]
move sha256 and sha512 modules to gnulib
* bootstrap.conf (gnulib_modules) [sha256, sha512]: Add "crypto/"
prefix to module name, now that they come from gnulib.
* gl/lib/sha256.c: Remove file.
* gl/lib/sha256.h: Likewise.
* gl/lib/sha512.c: Likewise.
* gl/lib/sha512.h: Likewise.
* gl/lib/u64.h: Likewise.
* gl/m4/sha256.m4: Likewise.
* gl/m4/sha512.m4: Likewise.
* gl/modules/sha256: Likewise.
* gl/modules/sha512: Likewise.
Jim Meyering [Sat, 10 May 2008 09:57:22 +0000 (11:57 +0200)]
now that the last of the mk-script-using tests is gone...
* tests/Makefile.am (EXTRA_DIST): Remove Makefile.am.in and mk-script.
Move/adjust SUBDIRS-related comments.
* tests/Makefile.am.in: Remove file, no longer used.
* tests/mk-script: Likewise.
* bootstrap: Remove coreutils-specific SUBDIRS-related code.
Jim Meyering [Sat, 10 May 2008 10:11:52 +0000 (12:11 +0200)]
tests: remove directory, tests/join/
* configure.ac (AC_CONFIG_FILES): Remove tests/join/Makefile.
* tests/misc/join: New file, with tests from...
* tests/join/Test.pm: ...here. Remove file.
* tests/Makefile.am (SUBDIRS): Remove definition.
Jim Meyering [Sat, 10 May 2008 09:50:04 +0000 (11:50 +0200)]
* tests/misc/tac: Also perform stdin and piped tests.
Jim Meyering [Sat, 10 May 2008 09:38:07 +0000 (11:38 +0200)]
tests: convert pr tests
* configure.ac (AC_CONFIG_FILES): Remove tests/pr/Makefile.
* tests/Makefile.am (SUBDIRS): Remove pr.
* tests/pr/pr-tests: New file, with tests from...
* tests/pr/Test.pm: ...here. Remove file.
* tests/Makefile.am (EXTRA_DIST): Add $(pr_data).
(pr_data): List all of the pr's test-related data files.
Jim Meyering [Sat, 10 May 2008 08:11:45 +0000 (10:11 +0200)]
tests: remove directory, tests/tail/
* configure.ac (AC_CONFIG_FILES): Remove tests/tail/Makefile.
* tests/Makefile.am (SUBDIRS): Remove tail.
* tests/misc/tail: New file, with tests from...
* tests/tail/Test.pm: ...here. Remove file.
Bernhard Marx [Fri, 9 May 2008 06:50:46 +0000 (08:50 +0200)]
doc: improve description of "niceness" values
* doc/coreutils.texi (nice invocation):
Jim Meyering [Fri, 9 May 2008 06:04:59 +0000 (08:04 +0200)]
tests: remove directory, tests/sort/
* configure.ac (AC_CONFIG_FILES): Remove tests/sort/Makefile.
* tests/Makefile.am (SUBDIRS): Remove sort.
* tests/misc/sort: New file, with tests from...
* tests/sort/Test.pm: ...here. Remove file.
Bruno Haible [Thu, 8 May 2008 21:15:36 +0000 (23:15 +0200)]
Speed up "wc -m" and "wc -w" in multibyte case.
* src/wc.c: Include mbchar.h.
(wc): New variable in_shift. Use it to avoid calling mbrtowc for most
ASCII characters. Reported via Jan Engelhardt in
http://bugzilla.novell.com/381873 with discussion here
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13520
Jim Meyering [Thu, 8 May 2008 08:33:15 +0000 (10:33 +0200)]
tests: remove directory, tests/tac/
* configure.ac (AC_CONFIG_FILES): Remove tests/tac/Makefile.
* tests/Makefile.am (SUBDIRS): Remove tac.
* tests/misc/tac: Many new tests, from...
* tests/tac/Test.pm: ...here. Remove file.
Jim Meyering [Wed, 7 May 2008 23:23:32 +0000 (01:23 +0200)]
tests: remove directory, tests/test/
* configure.ac (AC_CONFIG_FILES): Remove tests/test/Makefile.
* tests/Makefile.am (SUBDIRS): Remove test.
* tests/misc/test: Many new tests, from...
* tests/test/Test.pm: ...here. Remove file.
Jim Meyering [Wed, 7 May 2008 23:22:37 +0000 (01:22 +0200)]
tests: Coreutils.pm: support running a program that is a shell built-in
* tests/Coreutils.pm (run_tests): Add support for running a
program like 'test', that is a shell built-in.
Jim Meyering [Tue, 6 May 2008 12:29:57 +0000 (14:29 +0200)]
* TODO: Bo Borgerson is rewriting support for cp --recursive
Jim Meyering [Tue, 6 May 2008 08:12:42 +0000 (10:12 +0200)]
tests: remove directory, tests/tr/
* configure.ac (AC_CONFIG_FILES): Remove tests/tr/Makefile.
* tests/Makefile.am (SUBDIRS): Remove tr.
* tests/misc/tr: Many new tests, from...
* tests/tr/Test.pm: ...here. Remove file.
* tests/tr/failures: Remove file.
* tests/tr/TODO: Remove file.
Jim Meyering [Mon, 5 May 2008 13:17:42 +0000 (15:17 +0200)]
tests: skip another test if mcstransd is running
* tests/test-lib.sh (skip_if_mcstransd_is_running_): New function,
extracted from...
* tests/misc/chcon: ...here. Use function, not open-coded test.
* tests/misc/selinux: Use the function here, too.
Require root, not non-root.
* tests/Makefile.am (root_tests): Add misc/selinux.
Jim Meyering [Mon, 5 May 2008 08:11:59 +0000 (10:11 +0200)]
tests: translate uniq-z-test-adding code to new framework
* tests/misc/uniq (add-z-variants): New function.
Use it.
Jim Meyering [Sun, 4 May 2008 20:30:26 +0000 (22:30 +0200)]
tests: remove directory, tests/uniq/
* configure.ac (AC_CONFIG_FILES): Remove tests/uniq/Makefile.
* tests/Makefile.am (SUBDIRS): Remove uniq.
* tests/misc/uniq: Many new tests, from...
* tests/uniq/Test.pm: ...here. Remove file.
Jim Meyering [Sun, 4 May 2008 19:31:10 +0000 (21:31 +0200)]
tests: remove directory, tests/cut/
* configure.ac (AC_CONFIG_FILES): Remove tests/cut/Makefile.
* tests/Makefile.am (SUBDIRS): Remove cut.
* tests/misc/cut: Many new tests, from...
* tests/cut/Test.pm: ...here. Remove file.
Jim Meyering [Sun, 4 May 2008 09:38:31 +0000 (11:38 +0200)]
tests: remove directory, tests/head/
* configure.ac (AC_CONFIG_FILES): Remove tests/head/Makefile.
* tests/Makefile.am (SUBDIRS): Remove head.
* tests/misc/head: New file, derived from ...
* tests/head/Test.pm: ...this. Remove file.
* tests/head/in: Remove file.
* tests/head/in-1024: Remove file.
* tests/Coreutils.pm (triple_test): New function.
Jim Meyering [Sun, 4 May 2008 19:36:00 +0000 (21:36 +0200)]
tests: Coreutils.pm improvements
* tests/Coreutils.pm: Allow test names longer than 12.
Print a useful diagnostic for bogus spec entry.
Handle the combination of IN_PIPE and ENV properly.
* tests/Coreutils.pm (run_tests): Put ENV right before command,
not before the "cat INPUT_FILE |" prefix.
Jim Meyering [Sat, 3 May 2008 13:46:41 +0000 (15:46 +0200)]
tests: move "sparse-file" into test-lib.sh
* tests/sparse-file: Remove file Move contents into ...
* tests/test-lib.sh (require_sparse_support_): ...here. New function.
* tests/cp/sparse: Use the function, not the file.
* tests/du/8gb: Likewise.
* tests/Makefile.am (EXTRA_DIST): Remove sparse-file.
Jim Meyering [Sat, 3 May 2008 13:43:13 +0000 (15:43 +0200)]
tests: move "group-names" into test-lib.sh
* tests/group-names: Remove file Move contents into ...
* tests/test-lib.sh (require_membership_in_two_groups_): ...here. New function.
* tests/chgrp/basic: Use the function, not the file.
* tests/chgrp/default-no-deref: Likewise.
* tests/chgrp/deref: Likewise.
* tests/chgrp/no-x: Likewise.
* tests/chgrp/posix-H: Likewise.
* tests/chgrp/recurse: Likewise.
* tests/cp/existing-perm-race: Likewise.
* tests/Makefile.am (EXTRA_DIST): Remove group-names.
Jim Meyering [Fri, 2 May 2008 21:31:57 +0000 (23:31 +0200)]
tests: use printf+sed rather than yes+head+tr
* tests/misc/fmt-long-line: Minor clean-up.
Using "yes" like that has caused trouble in the past.
Jim Meyering [Sun, 4 May 2008 10:23:28 +0000 (12:23 +0200)]
tests: save and restore TERM around use of TESTS_ENVIRONMENT,
now that TESTS_ENVIRONMENT unsets it.
* check.mk (am__check_pre): Save $TERM.
(am__check_post): Restore saved value of TERM and export.
Jim Meyering [Fri, 2 May 2008 21:44:59 +0000 (23:44 +0200)]
tests: hoist the sourcing of "lang-default"
* tests/check.mk (TESTS_ENVIRONMENT): Source lang-default here, ...
... rather than in each of 100+ test scripts.
* tests/chgrp/basic:
* tests/chgrp/no-x:
* tests/chmod/c-option:
* tests/chmod/no-x:
* tests/chmod/setgid:
* tests/chmod/thru-dangling:
* tests/chmod/umask-x:
* tests/chmod/usage:
* tests/chown/basic:
* tests/chown/deref:
* tests/chown/preserve-root:
* tests/cp/abuse:
* tests/cp/acl:
* tests/cp/backup-is-src:
* tests/cp/cp-a-selinux:
* tests/cp/cp-i:
* tests/cp/cp-mv-backup:
* tests/cp/deref-slink:
* tests/cp/fail-perm:
* tests/cp/into-self:
* tests/cp/link-preserve:
* tests/cp/preserve-gid:
* tests/cp/same-file:
* tests/cp/slink-2-slink:
* tests/cp/special-f:
* tests/cp/symlink-slash:
* tests/cp/thru-dangling:
* tests/du/basic:
* tests/du/hard-link:
* tests/du/inacc-dest:
* tests/du/long-sloop:
* tests/du/no-x:
* tests/install/basic-1:
* tests/ln/hard-backup:
* tests/ln/sf-1:
* tests/ls/file-type:
* tests/ls/infloop:
* tests/ls/nameless-uid:
* tests/ls/rt-1:
* tests/ls/stat-failed:
* tests/ls/symlink-slash:
* tests/ls/x-option:
* tests/misc/chcon:
* tests/misc/chcon-fail:
* tests/misc/csplit:
* tests/misc/df-P:
* tests/misc/groups-dash:
* tests/misc/groups-version:
* tests/misc/nohup:
* tests/misc/printf-surprise:
* tests/misc/runcon-no-reorder:
* tests/misc/selinux:
* tests/misc/split-a:
* tests/misc/split-fail:
* tests/misc/tac-continue:
* tests/misc/wc-files0:
* tests/mkdir/p-v:
* tests/mkdir/selinux:
* tests/mv/acl:
* tests/mv/backup-dir:
* tests/mv/backup-is-src:
* tests/mv/childproof:
* tests/mv/diag:
* tests/mv/dir2dir:
* tests/mv/dup-source:
* tests/mv/force:
* tests/mv/hard-link-1:
* tests/mv/hard-verbose:
* tests/mv/i-2:
* tests/mv/i-3:
* tests/mv/i-4:
* tests/mv/i-5:
* tests/mv/i-link-no:
* tests/mv/into-self:
* tests/mv/into-self-2:
* tests/mv/into-self-3:
* tests/mv/mv-special-1:
* tests/mv/part-fail:
* tests/mv/part-symlink:
* tests/mv/partition-perm:
* tests/mv/perm-1:
* tests/mv/reply-no:
* tests/mv/sticky-to-xpart:
* tests/mv/update:
* tests/rm/cycle:
* tests/rm/dir-no-w:
* tests/rm/dir-nonrecur:
* tests/rm/fail-2eperm:
* tests/rm/fail-eacces:
* tests/rm/inaccessible:
* tests/rm/interactive-always:
* tests/rm/interactive-once:
* tests/rm/isatty:
* tests/rm/one-file-system:
* tests/rm/r-1:
* tests/rm/r-2:
* tests/rm/rm1:
* tests/rm/rm2:
* tests/rm/rm3:
* tests/rm/rm4:
* tests/rm/rm5:
* tests/rm/unread2:
* tests/rm/v-slash:
* tests/touch/fail-diag:
* tests/touch/not-owner:
Jim Meyering [Thu, 1 May 2008 21:01:40 +0000 (23:01 +0200)]
tests: hoist envvar-check so it is run for every test
I.e., also for Perl-based tests; not just the ones using test-lib.sh.
* tests/check.mk (TESTS_ENVIRONMENT): Source envvar-check here, ...
* tests/test-lib.sh: ...not here.
Jim Meyering [Thu, 1 May 2008 07:30:22 +0000 (09:30 +0200)]
fix typo in comments: s/ouput/output/
adjust spelling in that same comment: s/localisation/localization/
Jim Meyering [Sat, 3 May 2008 21:18:28 +0000 (23:18 +0200)]
* tests/touch/Makefile.am: Remove now-unused file.
Jim Meyering [Fri, 2 May 2008 22:21:37 +0000 (00:21 +0200)]
tests: test split more thoroughly
* tests/misc/split-a: Clean up. Catch more failures.
Jim Meyering [Wed, 30 Apr 2008 22:54:01 +0000 (00:54 +0200)]
* tests/misc/wc: Remove an unused variable.
Jim Meyering [Wed, 30 Apr 2008 09:57:06 +0000 (11:57 +0200)]
tests: detect and check more uses of strcmp
* maint.mk (sc_prohibit_strcmp): Relax regexp to recognize other
formatting styles.
Jim Meyering [Sat, 26 Apr 2008 07:28:48 +0000 (09:28 +0200)]
avoid problems with sign-extended "char" operand to is* functions
* src/cut.c (set_fields): Apply to_uchar to isblank operands.
* src/uniq.c (find_field): Likewise.
* src/seq.c (scan_arg): Likewise, for isspace.
* tests/misc/uniq: New file. Test for the above, but only
when isspace(0240).
* tests/Makefile.am (TESTS): Add misc/uniq.
* configure.ac: Use gt_LOCALE_FR.
* tests/check.mk (TESTS_ENVIRONMENT): Propagate LOCALE_FR to scripts.
* NEWS: Mention the bug fixes.
Before this patch, on FreeBSD 6:
$ printf 'x y z\nx \xa0 y z\n' > in
$ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' .
x.y.z
x. .y.z
With the patch:
$ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' .
x.y.z
This also affected many other locales:
for i in $(locale -a); do test $(LC_ALL=$i ./uniq -f1 in|wc -l)
= $(LC_ALL=$i uniq -f1 in|wc -l) || echo $i ; done
...
en_GB.ISO8859-1
en_GB.ISO8859-15
en_GB.UTF-8
en_IE.UTF-8
en_NZ.ISO8859-1
en_NZ.ISO8859-15
en_NZ.UTF-8
en_US.ISO8859-1
en_US.ISO8859-15
en_US.UTF-8
...
Bo Borgerson [Tue, 6 May 2008 01:58:28 +0000 (21:58 -0400)]
base64: remove some unused/redundant getopt code
* src/base64.c (struct option long_option): Remove redundant help/version
option items.
(main): Remove unused 'q' from short options.
Signed-off-by: Bo Borgerson <gigabo@gmail.com>
Jim Meyering [Mon, 5 May 2008 22:35:28 +0000 (00:35 +0200)]
help2man: fix perl 5.10 problem properly
* man/help2man: Do pull LC_ALL via "use POSIX".
Instead, limit the importing of gettext-related symbols
to just those two we'll use: gettext and textdomain.
Jim Meyering [Mon, 5 May 2008 20:44:57 +0000 (22:44 +0200)]
help2man: avoid failure with Debian unstable's Perl 5.10.0
Avoid failure that produced this diagnostic:
Constant subroutine main::LC_ALL redefined at /.../Exporter.pm
* man/help2man: Don't include LC_ALL in the "use POSIX" list,
since Locale::gettext->import will get it.
Bo Borgerson [Wed, 30 Apr 2008 21:40:38 +0000 (17:40 -0400)]
base64 module: adjust API so it's compatible with gnulib's
* gl/lib/base64.c (base64_decode_ctx): If no context structure was passed in,
treat newlines as garbage (this is the historical behavior). Formerly
base64_decode.
(base64_decode_alloc_ctx): Formerly base64_decode_alloc.
* gl/lib/base64.h (base64_decode): Macro for four-argument calls.
(base64_decode_alloc): Likewise.
* src/base64.c (do_decode): Call base64_decode_ctx instead of base64_decode.
Signed-off-by: Bo Borgerson <gigabo@gmail.com>
Jim Meyering [Mon, 5 May 2008 11:53:36 +0000 (13:53 +0200)]
* tests/misc/tac: Set execute bit.
Jim Meyering [Sun, 4 May 2008 22:07:08 +0000 (00:07 +0200)]
tac: avoid segfault for e.g., "echo > x; tac -r x x"
* src/tac.c (tac_seekable): Move local "regs" declaration out
to file scope, so its values aren't clobbered between calls.
Discovered by Cristian Cadar, Daniel Dunbar and Dawson Engler,
reported in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13501
* NEWS: Mention the bug fix.
* tests/Makefile.am (TESTS): Add misc/tac.
* tests/misc/tac: New file. Test for the above.
Jim Meyering [Wed, 30 Apr 2008 21:24:41 +0000 (23:24 +0200)]
tests: avoid a "make check-root" failure when mcstransd is running
* tests/misc/chcon: Skip this test if mcstransd seems to be running.
Jim Meyering [Wed, 30 Apr 2008 20:50:02 +0000 (22:50 +0200)]
tests: avoid spurious "make check-root" failure
* README (Running tests as root): Also set PATH in suggested "sudo"
command. This avoids failure of at least tests/cp/cp-a-selinux
when the default PATH does not contain /sbin.
* tests/cp/cp-a-selinux: Don't redirect stderr to /dev/null.
"mkfs" was failing due to /sbin not being in PATH.
Bo Borgerson [Wed, 30 Apr 2008 12:49:59 +0000 (08:49 -0400)]
Add Daniel Dunbar's lcov instructions to HACKING
* HACKING: New section `Finding things to do', points to TODO file and
gives instructions on generating an html coverage report as provided by
Daniel Dunbar.
* TODO: Add item for improving test coverage. Point back to HACKING.
Signed-off-by: Bo Borgerson <gigabo@gmail.com>
Jim Meyering [Sat, 26 Apr 2008 07:14:55 +0000 (09:14 +0200)]
chcon, runcon: make --help print the bug-reporting address
* src/chcon.c (usage): Use emit_bug_reporting_address.
* src/runcon.c (usage): Likewise.
* tests/misc/help-version: Don't exempt chcon and runcon.
* NEWS: Mention this.
Jim Meyering [Mon, 28 Apr 2008 20:59:24 +0000 (22:59 +0200)]
tests: don't hard-code coreutils list of tests/ SUBDIRS in bootstrap
* bootstrap: Extract the list from tests/Makefile.am, and die
when it is empty -- it will be, eventually.
Bo Borgerson [Mon, 28 Apr 2008 18:58:51 +0000 (14:58 -0400)]
tests: remove references to tests/wc from bootstrap
* bootstrap: Don't try to initialize anything in tests/wc.
Signed-off-by: Bo Borgerson <gigabo@gmail.com>
Jim Meyering [Mon, 28 Apr 2008 20:44:56 +0000 (22:44 +0200)]
tests: slightly relax sc_cast_of_argument_to_free syntax check
* maint.mk (sc_cast_of_argument_to_free): Relax regexp slightly.
(sc_no_have_config_h): Add a comment.
Bo Borgerson [Mon, 28 Apr 2008 17:11:26 +0000 (13:11 -0400)]
tests: don't chmod after a failed chdir in cleanup
* tests/CuTmpdir.pm (chmod_tree): Don't chmod if chdir failed.
Signed-off-by: Bo Borgerson <gigabo@gmail.com>
Bo Borgerson [Mon, 28 Apr 2008 14:30:22 +0000 (10:30 -0400)]
Only cleanup test dirs from the process that created them.
* tests/CuTmpdir.pm (import): Use closure around current PID to avoid cleanup races.
Signed-off-by: Bo Borgerson <gigabo@gmail.com>
Jim Meyering [Sat, 26 Apr 2008 21:40:03 +0000 (23:40 +0200)]
move wc tests from own subdir into a single script
* configure.ac (AC_CONFIG_FILES): Remove wc/Makefile from the list.
* tests/Makefile.am (SUBDIRS): Remove wc from the list.
(TESTS): Add misc/wc.
* tests/misc/wc: New file, derived from tests/wc/Tests.pm.
* tests/wc/Test.pm: Remove file.
Jim Meyering [Fri, 25 Apr 2008 13:20:19 +0000 (15:20 +0200)]
tests: remove temporary log file upon catchable signal
* check.mk (am__check_pre): Add signal handler to remove $@-t.
Jim Meyering [Fri, 25 Apr 2008 12:39:38 +0000 (14:39 +0200)]
tests: don't source envvar-check manually, test-lib.sh does it
* tests/cp/abuse: Remove ". $top_srcdir/tests/envvar-check".
* tests/cp/parent-perm: Likewise.
* tests/cp/special-f: Likewise.
* tests/ls/proc-selinux-segfault: Likewise.
* tests/misc/help-version: Likewise.
* tests/mkdir/selinux: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/touch/now-owned-by-other: Likewise.
* tests/sample-test: Remove commented out suggestion.
Jim Meyering [Fri, 25 Apr 2008 08:59:47 +0000 (10:59 +0200)]
tests: ensure at least one failure when $built_programs is empty
Before, this test and others would pass with empty $built_programs.
* tests/misc/help-version: Fail if built_programs is empty.
Jim Meyering [Fri, 25 Apr 2008 08:41:42 +0000 (10:41 +0200)]
tests: improve perl-based tempdir handling
Before, upon interrupt, directories would be left behind.
* tests/CuTmpdir.pm: Remove temporary directory on interrupt.
Jim Meyering [Fri, 25 Apr 2008 07:36:54 +0000 (09:36 +0200)]
tests: reorder some tests in the long list
* tests/Makefile.am (TESTS): Move some tests that use sleep
"up" in the list so that they don't delay even a little the
completion of "make check". Also run a chmod test early.
Jim Meyering [Thu, 24 Apr 2008 10:58:24 +0000 (12:58 +0200)]
tests: put root-only (usually skipped) tests at the end
* tests/Makefile.am (TESTS): Don't list root-only tests explicitly.
Instead, just use $(root_tests).
* tests/check.mk (vc_exe_in_TESTS): Now that root_tests are separate,
parse out the union of $(TESTS) and $(root_tests).
Jim Meyering [Thu, 24 Apr 2008 10:50:24 +0000 (12:50 +0200)]
tests: move another file (expensive) into test-lib.sh
* tests/expensive: Remove file. Move contents into ...
* tests/test-lib.sh (expensive_): ...here. New function.
* tests/du/fd-leak: Update caller to use the new function.
* tests/mv/leak-fd: Likewise.
* tests/rm/hash: Likewise.
* tests/tail-2/big-4gb: Likewise.
* tests/Makefile.am (EXTRA_DIST): Remove its name.
Jim Meyering [Thu, 24 Apr 2008 10:43:20 +0000 (12:43 +0200)]
tests: cp/perm (usually not run) was failing on systems with SELinux
* tests/cp/perm: Use stat to get the permission string, not ls.
This test was run only when RUN_VERY_EXPENSIVE_TESTS=yes was set
in the environment. It would fail on SELinux-enable systems
because ls-generated permission strings would not match, e.g.,
"test _-rw-r--r--+ = _-rw-r--r--" would fail.
Jim Meyering [Sun, 27 Apr 2008 19:31:08 +0000 (21:31 +0200)]
tweak HACKING advice
Jim Meyering [Thu, 24 Apr 2008 10:31:13 +0000 (12:31 +0200)]
tests: do define built_programs
* tests/check.mk (built_programs): Define here, where it's used.
This definition was in now-removed tests/misc/Makefile.am.
Jim Meyering [Wed, 23 Apr 2008 16:57:38 +0000 (18:57 +0200)]
tests: update commented-out examples in sample-test, too
* tests/sample-test: Use $top_srcdir/tests/SCRIPT_NAME, not
$top_srcdir/../SCRIPT_NAME here, too.
Ondřej Vašík [Wed, 23 Apr 2008 15:24:10 +0000 (17:24 +0200)]
tests: don't fail in a non-English locale
* tests/chmod/thru-dangling: Source lang-default.
* tests/cp/thru-dangling: Likewise.
* tests/misc/printf-surprise: Likewise.
Jim Meyering [Wed, 23 Apr 2008 12:49:20 +0000 (14:49 +0200)]
tests: remove now-unused Makefile.am
* tests/misc/Makefile.am: Remove file.
Ondřej Vašík [Wed, 23 Apr 2008 10:38:54 +0000 (12:38 +0200)]
id: do not print SELinux context when invoked with a USERNAME argument
* NEWS: Mention new behaviour.
* src/id.c (main): Do not print SELinux context when user is specified.
* tests/Makefile.am: Add the new test.
* tests/misc/id-context: New file. Test for the fix.
Problem reported by Ronny Buchmann in http://bugzilla.redhat.com/443485.
Jim Meyering [Wed, 23 Apr 2008 09:45:38 +0000 (11:45 +0200)]
id: do print the AFS-specific nameless group ID (called a PAG)
In 6.11, we mistakenly suppressed the printing of certain group IDs,
thinking they were useless AFS-specific artifacts.
This change reverts that, so now they are printed once again.
http://thread.gmane.org/gmane.org.fsf.announce/867/focus=13345
This also reverts the bug-fix that applied solely to the new code
used to avoid printing those IDs
Revert "id bug fix: don't point to potentially clobbered static storage"
This reverts commit
f7d1c59c224f81a8bab5fa2afcaf815988f50467.
Revert "Work around AFS bug: id and groups would print invalid group number."
This reverts commit
b7a836c0a3524cda8ef79c30c3fe7ea759ae4656.
Revert "* src/c99-to-c89.diff: Accommodate a C99-ism in id.c."
This reverts commit
d44893c5dba4150b4ded9cf6aad316c1ef620c9f.
Jim Meyering [Tue, 22 Apr 2008 19:28:33 +0000 (21:28 +0200)]
build: move a project-specific definition to cfg.mk
* cfg.mk (old_NEWS_hash): Define here, ...
* maint.mk: ... not here.
(update-NEWS-hash): Update comment.
Suggestion from Eric Blake.
Jim Meyering [Tue, 22 Apr 2008 08:52:37 +0000 (10:52 +0200)]
Accommodate building on OS/2 (ecomstation.com Ecs v2 rc4)
* configure.ac: Filter out carriage returns in more places.
Reported by Elbert Pol, details here:
http://thread.gmane.org/gmane.org.fsf.announce/867/focus=13332
Jim Meyering [Tue, 22 Apr 2008 08:45:21 +0000 (10:45 +0200)]
guard against inserting a NEWS entry into a block for a prior release
Without a guard like this, it is far too easy to apply a patch
prepared against a preceding release, and not notice that a NEWS
entry is inserted into the wrong block.
* maint.mk (sc_immutable_NEWS): New rule.
(update-NEWS-hash): New rule to update the hard-coded hash.
Jim Meyering [Tue, 22 Apr 2008 07:33:25 +0000 (09:33 +0200)]
tests: ensure that all exec-$PERL lines are the same
* maint.mk (sc_perl_coreutils_test): New rule.
Jim Meyering [Mon, 21 Apr 2008 12:47:56 +0000 (14:47 +0200)]
tests: skip (don't fail) rm/one-file-system when mount --bind fails
* tests/rm/one-file-system: Reported by Allen Hewes.
Jim Meyering [Sun, 20 Apr 2008 21:29:19 +0000 (23:29 +0200)]
tests: convert umask-check to a function
* tests/test-lib.sh (working_umask_or_skip_): New function, from...
* tests/umask-check: ...here. Remove file.
* tests/Makefile.am (EXTRA_DIST): Remove umask-check.
* tests/mkdir/perm: Use the function rather than sourcing the file.
* tests/cp/cp-parents: Likewise.
* tests/cp/parent-perm: Likewise.
Bruno Haible reported that parent-perm was failing to run umask-check.
Jim Meyering [Fri, 18 Apr 2008 14:51:34 +0000 (16:51 +0200)]
tests: adjust perl -I to use $top_srcdir/tests, not $srcdir/..
Jim Meyering [Fri, 18 Apr 2008 13:51:18 +0000 (15:51 +0200)]
tests: clean up root tests; adapt to new layout
* tests/Makefile.am (root_tests): New list.
(check-root): Add 'SUBDIRS='.
(root-hint): Point to README.
* Makefile.am (check-root): Add 'SUBDIRS=' here, too.
* maint.mk (sc_root_tests): Adapt rule to new syntax used
in tests/Makefile.am.
Jim Meyering [Thu, 17 Apr 2008 21:34:45 +0000 (23:34 +0200)]
Revamp test-related Makefiles.
One side-effect of this change is that "make check" now works even if
you put "." early in your shell's search PATH (don't do that!).
Remove all test-related Makefile.am files, except those generated
by mk-script. Instead, tests/Makefile.am now lists not only the
tests directly under tests/, but also those in tests/*/ that are
not generated by mk-script, e.g., cp/abuse, cp/acl, mv/i-1, etc.
A lot of these changes are like this:
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
* configure.ac (AC_CONFIG_FILES): Remove corresponding Makefiles.
* tests/check.mk (vc_exe_in_TESTS): Relax syntax requirements.
* tests/rwx-to-mode: Remove file. Rewritten as...
* tests/test-lib.sh (rwx_to_mode_): ...this new function.
* tests/Makefile.am (EXTRA_DIST): Remove rwx-to-mode.
(SUBDIRS): Remove each dir with a removed Makefile.am.
(EXTRA_DIST): Add $(TESTS).
(TESTS): Add over 300 entries.
Jim Meyering [Thu, 17 Apr 2008 19:58:53 +0000 (21:58 +0200)]
* tests/misc/Makefile.am (built_programs): Remove. Unused.
Jim Meyering [Sun, 20 Apr 2008 21:18:48 +0000 (23:18 +0200)]
Use "env" to invoke potential built-ins.
* tests/misc/pwd-unreadable-parent: Invoke pwd via "env -- pwd",
rather than via an absolute name.
* tests/touch/not-owner: Likewise for test.
* tests/chmod/setgid: Likewise.
Jim Meyering [Sat, 19 Apr 2008 15:20:00 +0000 (17:20 +0200)]
* .prev-version: Record previous version: 6.11.
Jim Meyering [Sat, 19 Apr 2008 14:09:36 +0000 (16:09 +0200)]
Version 6.11.
* NEWS: Record release date.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Jim Meyering [Sat, 19 Apr 2008 14:47:26 +0000 (16:47 +0200)]
* maint.mk (writable-files): Fix syntax error.
Jim Meyering [Sat, 19 Apr 2008 13:23:40 +0000 (15:23 +0200)]
* doc/.gitignore: Add texinfo-related outputs.
Sven Joachim [Sat, 19 Apr 2008 11:46:52 +0000 (13:46 +0200)]
* THANKS: Update my address, correct encoding for a name.
Jim Meyering [Sat, 19 Apr 2008 10:48:10 +0000 (12:48 +0200)]
pr -e, with a mix of backspaces and TABs, could corrupt the heap
* tests/pr/Test.pm: New tests for the above.
* src/pr.c (char_to_clump): Ensure that "input_position" never
goes below 0.
Also, elide any backspace encountered when input_position is 0,
to be compatible at least with /bin/pr from Solaris 10.
This bug is present in the original version:
b25038ce9a234ea0906ddcbd8a0012e917e6c661
* NEWS [Bug fixes]: Mention this.
Report and diagnosis by Cristian Cadar, Daniel Dunbar and Dawson Engler
in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13272
Mike Frysinger [Sat, 19 Apr 2008 06:51:30 +0000 (08:51 +0200)]
* src/dircolors.hin: Add .flv. Move .svgz to "image formats".
Jim Meyering [Fri, 18 Apr 2008 21:42:40 +0000 (23:42 +0200)]
md5sum -c: ignore a line with a NUL byte among checksum hex digits
* src/md5sum.c (hex_digits): Require that all "digest_hex_bytes"
be hexadecimal digits, not just those before the first NUL byte.
This bug dates back to the original version:
3763a4f24eb21be40674d13ff7b04e078f473e85
* tests/misc/md5sum (nul-in-cksum): Test for the above.
* NEWS [Bug fixes]: Mention this.
Prompted by a report from Flóki Pálsson in
http://bugzilla.redhat.com/439531
Matthew Woehlke [Wed, 16 Apr 2008 17:15:05 +0000 (19:15 +0200)]
tests: accommodate built-in mknod more cleanly still
* tests/mkdir/selinux: Use "env" rather than "nice".
Jim Meyering [Wed, 16 Apr 2008 13:28:33 +0000 (15:28 +0200)]
tests: accommodate built-in mknod more cleanly
* tests/mkdir/selinux: Undo most of previous change,
bc22dbbf844f31ddaf2e68b167d0128a985d73ab, and instead
invoke the command via "nice". Using "exec" should be
enough, but isn't with OpenBSD's PD KSH v5.2.14 99/07/13.2.
Eric Blake suggested using nice.
Jim Meyering [Wed, 16 Apr 2008 12:21:40 +0000 (14:21 +0200)]
mknod --help: note that this command may be a shell built-in
* src/mknod.c (usage): Print USAGE_BUILTIN_WARNING.
Suggestion from Eric Blake.
Jim Meyering [Wed, 16 Apr 2008 09:20:28 +0000 (11:20 +0200)]
avoid "may be used uninitialized" warning from newer gcc
* src/md5sum.c (digest_check) [lint]: Initialize local, "filename".
Jim Meyering [Wed, 16 Apr 2008 09:17:37 +0000 (11:17 +0200)]
tests: add a comment explaining the potential failure
Jim Meyering [Wed, 16 Apr 2008 08:29:10 +0000 (10:29 +0200)]
tests: avoid mkdir/selinux failure when mknod is a shell built-in
* tests/mkdir/selinux: Skip the mknod test if it's a built-in.
Jim Meyering [Tue, 15 Apr 2008 06:19:11 +0000 (08:19 +0200)]
md5sum, sha1sum, etc: handle invalid input (i.e., don't segfault)
* src/md5sum.c (bsd_split_3): Return right away if s_len == 0.
* tests/misc/md5sum (bsd-segv): New test for the above.
* tests/misc/sha1sum (bsd-segv): Likewise.
* NEWS: Mention the bug fix.
Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler.
Jim Meyering [Mon, 14 Apr 2008 21:33:43 +0000 (23:33 +0200)]
tests: don't fail on systems without a "stat" syscall
* tests/test-lib.sh (require_strace_): Add a syscall parameter.
* tests/ls/stat-free-symlinks: Update caller.
* tests/mv/atomic: Likewise.
* tests/mv/atomic2: Likewise.
Reported by Mike Frysinger in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13222
Jim Meyering [Mon, 14 Apr 2008 20:17:23 +0000 (22:17 +0200)]
tests: accommodate a different errno string on Irix 6.5
* tests/mkdir/selinux: Also handle "Not supported".
Reported by Peter Fales.
Jim Meyering [Mon, 14 Apr 2008 09:21:26 +0000 (11:21 +0200)]
seq: work around floating point inaccuracies on more systems
* src/seq.c: Include <math.h> for fabs.
Include <float.h> for DBL_EPSILON.
(abs_rel_diff): New function.
(print_numbers): Use abs_rel_diff rather than a strict equality test.
Without this change, Solaris 8 and Irix 6.2 would fail the float-6
test. Reported by Peter Fales in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13183
* src/c99-to-c89.diff: Adjust seq.c offsets.
Jim Meyering [Mon, 14 Apr 2008 07:02:20 +0000 (09:02 +0200)]
doc: fix typo
* coreutils.texi (sort invocation): s/Whitespace/White space/
Jim Meyering [Sat, 12 Apr 2008 11:14:29 +0000 (13:14 +0200)]
tests: Accommodate a different errno value on OSF/1 4.0F.
* tests/mkdir/selinux: Also handle "Function not implemented".
Jim Meyering [Sat, 12 Apr 2008 10:43:24 +0000 (12:43 +0200)]
Avoid link failure when using mkstemp replacement.
* src/Makefile.am (tac_LDADD): Add $(LIB_CLOCK_GETTIME).
This is necessary at least on a DEC Alpha OSF/1 4.0F.
Jim Meyering [Sat, 12 Apr 2008 07:52:42 +0000 (09:52 +0200)]
tests: always enable VERBOSE output, now that test framework works better
* cfg.mk: Set VERBOSE=yes.
* tests/check.mk: Likewise.
Jim Meyering [Fri, 11 Apr 2008 10:11:06 +0000 (12:11 +0200)]
doc: avoid "make pdf" failure (due to texi2dvi bug?)
* doc/coreutils.texi (filesZeroFromOption):
Comment out @cindex-in-@macro use.
Jim Meyering [Fri, 11 Apr 2008 10:08:41 +0000 (12:08 +0200)]
doc: use a valid texinfo macro name
* doc/coreutils.texi (filesZeroFromOption): s/0/Zero/
Jim Meyering [Tue, 8 Apr 2008 06:01:00 +0000 (08:01 +0200)]
tests: accommodate a different errno value on HPUX-10.20
* tests/mkdir/selinux: Also handle "Unknown system error".
Reported by Peter Fales.
Jim Meyering [Sun, 6 Apr 2008 20:10:18 +0000 (22:10 +0200)]
doc: factor out --files0-from duplication
* coreutils.texi (wc invocation) [files0fromOption]: New macro. Use it.
(du invocation): Use it here, too.