Jim Meyering [Mon, 2 Jun 2008 19:17:57 +0000 (21:17 +0200)]
accommodate older SELinux which lacks matchpathcon_init_prefix
* m4/jm-macros.m4: Check for matchpathcon_init_prefix.
* src/install.c [!HAVE_MATCHPATHCON_INIT_PREFIX]
(matchpathcon_init_prefix): Define away.
* gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define.
Reported by Ilya N. Golubev in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13686>.
Jim Meyering [Mon, 2 Jun 2008 15:48:11 +0000 (17:48 +0200)]
each file with a "main" must also declare program_name
* maint.mk (sc_program_name): New rule.
* .x-sc_program_name: New file.
* Makefile.am (EXTRA_DIST): Add .x-sc_program_name.
Jim Meyering [Mon, 2 Jun 2008 15:47:32 +0000 (17:47 +0200)]
declare program_name consistently
* src/base64.c: Likewise.
* src/basename.c: Likewise.
* src/cat.c: Likewise.
* src/chcon.c: Likewise.
* src/chgrp.c: Likewise.
* src/chmod.c: Likewise.
* src/chown.c: Likewise.
* src/chroot.c: Likewise.
* src/cksum.c: Likewise.
* src/comm.c: Likewise.
* src/cp.c: Likewise.
* src/csplit.c: Likewise.
* src/cut.c: Likewise.
* src/date.c: Likewise.
* src/dd.c: Likewise.
* src/df.c: Likewise.
* src/dircolors.c: Likewise.
* src/dirname.c: Likewise.
* src/du.c: Likewise.
* src/echo.c: Likewise.
* src/env.c: Likewise.
* src/expand.c: Likewise.
* src/expr.c: Likewise.
* src/factor.c: Likewise.
* src/fmt.c: Likewise.
* src/fold.c: Likewise.
* src/groups.c: Likewise.
* src/head.c: Likewise.
* src/hostid.c: Likewise.
* src/hostname.c: Likewise.
* src/id.c: Likewise.
* src/install.c: Likewise.
* src/join.c: Likewise.
* src/kill.c: Likewise.
* src/link.c: Likewise.
* src/ln.c: Likewise.
* src/logname.c: Likewise.
* src/ls.c: Likewise.
* src/md5sum.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
* src/mktemp.c: Likewise.
* src/mv.c: Likewise.
* src/nice.c: Likewise.
* src/nl.c: Likewise.
* src/nohup.c: Likewise.
* src/od.c: Likewise.
* src/paste.c: Likewise.
* src/pathchk.c: Likewise.
* src/pinky.c: Likewise.
* src/pr.c: Likewise.
* src/printenv.c: Likewise.
* src/printf.c: Likewise.
* src/ptx.c: Likewise.
* src/pwd.c: Likewise.
* src/readlink.c: Likewise.
* src/rm.c: Likewise.
* src/rmdir.c: Likewise.
* src/runcon.c: Likewise.
* src/seq.c: Likewise.
* src/setuidgid.c: Likewise.
* src/shuf.c: Likewise.
* src/sleep.c: Likewise.
* src/sort.c: Likewise.
* src/split.c: Likewise.
* src/stat.c: Likewise.
* src/stty.c: Likewise.
* src/su.c: Likewise.
* src/sum.c: Likewise.
* src/sync.c: Likewise.
* src/tac.c: Likewise.
* src/tail.c: Likewise.
* src/tee.c: Likewise.
* src/test.c: Likewise.
* src/timeout.c: Likewise.
* src/touch.c: Likewise.
* src/tr.c: Likewise.
* src/true.c: Likewise.
* src/tsort.c: Likewise.
* src/tty.c: Likewise.
* src/uname.c: Likewise.
* src/unexpand.c: Likewise.
* src/uniq.c: Likewise.
* src/unlink.c: Likewise.
* src/uptime.c: Likewise.
* src/users.c: Likewise.
* src/wc.c: Likewise.
* src/who.c: Likewise.
* src/whoami.c: Likewise.
* src/yes.c: Likewise.
Eric Blake [Mon, 2 Jun 2008 13:53:26 +0000 (07:53 -0600)]
export program_name, required by gnulib
* src/timeout.c (program_name): Export.
Jim Meyering [Mon, 2 Jun 2008 13:05:38 +0000 (15:05 +0200)]
revert inadvertent change in last patch
* configure.ac (AM_INIT_AUTOMAKE): Restore accidentally-modified
options. Spotted by Eric Blake.
Pádraig Brady [Fri, 28 Mar 2008 11:05:55 +0000 (11:05 +0000)]
new program: timeout
* AUTHORS: Register as the author.
* NEWS: Mention this change.
* README: Add timeout command to list.
* src/timeout.c: New file.
* src/kill.c (operand2sig): Move function to its own file,
now that timeout.c will also use it.
* src/operand2sig.c (operand2sig): New file, extracted from kill.c.
* src/operand2sig.h (operand2sig): Declare.
* src/Makefile.am (EXTRA_PROGRAMS): Add timeout.
* src/.gitignore: Add timeout binary to list to ignore.
* doc/coreutils.texi (timeout invocation): Add timeout info.
(Signal specifications): New section, also referenced by kill.
* man/Makefile.am (timeout.1): Add dependency.
* man/timeout.x: New file.
* po/POTFILES.in: Add timeout.c and operand2sig.c to list to translate.
* tests/Makefile.am (TESTS): Add the two new tests.
* tests/misc/help-version: Add support for new timeout command.
* tests/misc/invalid-opt: Add support for new timeout command.
* tests/misc/timeout: New file: check basic timeout operation.
* tests/misc/timeout-parameters: New file: check invalid parameter
combinations.
Jim Meyering [Mon, 2 Jun 2008 12:12:59 +0000 (14:12 +0200)]
spell author names consistently
* src/comm.c (AUTHORS): Use RMS' middle initial.
* src/ls.c (AUTHORS): Likewise.
* src/rm.c (AUTHORS): Likewise.
* src/uniq.c (AUTHORS): Likewise.
* src/cut.c (AUTHORS): Use David M. Ihnat's middle initial.
* AUTHORS: Update to match.
Reported by Michael Piefel.
Simon Josefsson [Sun, 1 Jun 2008 11:51:14 +0000 (13:51 +0200)]
doc: adjust base64 documentation
* coreutils.texi (base64 invocation): Use RFC 4648 as the specification.
Move the URL down a bit in the text.
Erik Auerswald [Sun, 1 Jun 2008 10:40:40 +0000 (12:40 +0200)]
md5sum: new option, --quiet, to suppress OK messages
sha1sum, sha224sum, sha384sum, and sha512sum accept it, too.
* src/md5sum.c: add option --quiet to suppress OK messages
* doc/coreutils.texi: document option --quiet
* tests/misc/md5sum: add test for option --quiet
* NEWS: mention new option --quiet for md5sum+sha*sum in "New
features" section
Jim Meyering [Sun, 1 Jun 2008 12:48:07 +0000 (14:48 +0200)]
add rules to commit three post-release changes automatically
* maint.mk (noteworthy): Define.
(emit-commit-log): Define.
(alpha beta major): Also update NEWS and cfg.mk automatically,
and commit all three changes at once.
Jim Meyering [Sun, 1 Jun 2008 12:44:50 +0000 (14:44 +0200)]
update old_NEWS_hash
* cfg.mk (old_NEWS_hash): Update by running "make update-NEWS-hash".
Reported by Erik Auerswald.
Simon Josefsson [Sun, 1 Jun 2008 11:08:20 +0000 (13:08 +0200)]
src/base64.c: Improve comments.
Jim Meyering [Sun, 1 Jun 2008 09:00:51 +0000 (11:00 +0200)]
* NEWS: add header line for next release
Jim Meyering [Sun, 1 Jun 2008 08:39:13 +0000 (10:39 +0200)]
adjust format of .prev-version commit message
* maint.mk (alpha beta major): Start with "*", omit version number.
Jim Meyering [Sun, 1 Jun 2008 08:11:01 +0000 (10:11 +0200)]
* .prev-version: Record previous version.
Jim Meyering [Sat, 31 May 2008 21:20:56 +0000 (23:20 +0200)]
Version 6.12.
* NEWS: Record release date.
Jim Meyering [Sat, 31 May 2008 20:42:20 +0000 (22:42 +0200)]
install: reenable matchpathcon-related code
The underlying performance problem is being dealt with in Automake
by limiting the number of install invocations, and in SELinux with
incremental changes as well as a potential new implementation.
* src/Makefile.am (ginstall_CPPFLAGS) [ENABLE_MATCHPATHCON]: Define.
* src/install.c [ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT]:
Rename to ENABLE_MATCHPATHCON.
* NEWS: mention this change
Jim Meyering [Fri, 30 May 2008 12:14:43 +0000 (14:14 +0200)]
configure.ac: remove explicit use of AB_INIT
* configure.ac: Don't invoke AB_INIT directly, now that it's
done automatically via gl_INIT.
Jim Meyering [Fri, 30 May 2008 08:45:45 +0000 (10:45 +0200)]
tests: ignore known failure on all Darwin 8.x / Mac OS X v10.4.x
* tests/chgrp/basic: Update comment and host_triplet version test.
Jim Meyering [Fri, 30 May 2008 07:45:53 +0000 (09:45 +0200)]
tests: avoid failure with older version of Perl's File::Temp
* tests/CuTmpdir.pm (import): Use &File::Temp::cleanup only
if it is defined. Reported by Bruno Haible in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13652
Jim Meyering [Fri, 30 May 2008 07:08:51 +0000 (09:08 +0200)]
NEWS: mention that cp -p copies permissions more portably
Based on wording suggested by Bruno Haible.
Jim Meyering [Thu, 29 May 2008 19:32:40 +0000 (21:32 +0200)]
improve description of du's--separate-dirs option
* coreutils.texi (du invocation): Prompted by Volker Badziong's
report in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13646
Jim Meyering [Thu, 29 May 2008 16:01:05 +0000 (18:01 +0200)]
du.c: tiny cleanup (no semantic change)
* src/du.c (process_file): Use "file", rather than
equivalent "ent->fts_path".
Jim Meyering [Tue, 27 May 2008 11:45:44 +0000 (13:45 +0200)]
in 280+ tests/* files, use $srcdir, not $top_srcdir/tests
Jim Meyering [Tue, 27 May 2008 11:24:20 +0000 (13:24 +0200)]
prefer abs_srcdir over abs_top_srcdir, ...
so that e.g., tests/* may refer to absolute names without
hard-coding the name of the containing directory (tests/, here).
* tests/check.mk (TESTS_ENVIRONMENT): Define abs_srcdir.
* tests/pr/pr-tests: Use $abs_srcdir/pr not $abs_top_srcdir/tests/pr.
* tests/chmod/c-option: Use $abs_srcdir, not $abs_top_srcdir/tests.
* tests/cp/cp-parents: Likewise.
* tests/mkdir/parents: Likewise.
* tests/mkdir/perm: Likewise.
* tests/mv/acl: Likewise.
* tests/mv/backup-is-src: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/into-self-2: Likewise.
* tests/mv/leak-fd: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/part-hardlink: Likewise.
* tests/mv/part-rename: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/partition-perm: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/mv/to-symlink: Likewise.
* tests/rm/one-file-system: Likewise.
* tests/sample-test: Likewise.
Jim Meyering [Tue, 27 May 2008 10:29:57 +0000 (12:29 +0200)]
tests: generalize my-distcheck
* maint.mk (my-distcheck): Accommodate missing gnulib-tests.
Jim Meyering [Mon, 26 May 2008 12:35:56 +0000 (14:35 +0200)]
reflect renaming of acl.c in gnulib
* POTFILES.in: s/acl.c/set-mode-acl.c/
Jim Meyering [Wed, 21 May 2008 21:08:11 +0000 (23:08 +0200)]
test installation results more thoroughly
* maint.mk (my-distcheck): Ensure that properly-named binaries
are installed. Also check all man pages, except [.1.
Move configure-time --prefix= to install-time prefix=.
(my-instcheck, install-transform-check): Define.
Jim Meyering [Wed, 21 May 2008 21:08:11 +0000 (23:08 +0200)]
install many binaries at once, when possible
* src/Makefile.am (install-exec-am): Override the standard
automake-generated target, so we can decide whether to use
the usual install-one-by-one rule, or whether we can use
the new install-many-at-once rule:
(cu-install-binPROGRAMS): New rule.
Jim Meyering [Mon, 19 May 2008 15:02:12 +0000 (17:02 +0200)]
* src/runcon.c: Add copyright comment.
Jim Meyering [Mon, 19 May 2008 17:39:30 +0000 (19:39 +0200)]
adjust AUTHORS and check-AUTHORS rule to accommodate
* AUTHORS: Add coding: utf-8 comment at end.
Spell François' and Torbjörn's names properly.
* src/Makefile.am: Parse AUTHORS file more carefully.
Use perl to join now-split lines.
Use en_US.UTF-8 to generate --version output.
Jim Meyering [Mon, 19 May 2008 15:34:56 +0000 (17:34 +0200)]
* src/c99-to-c89.diff: Adjust offsets.
Jim Meyering [Mon, 19 May 2008 14:49:35 +0000 (16:49 +0200)]
adjust copyright dates
Jim Meyering [Mon, 19 May 2008 14:43:32 +0000 (16:43 +0200)]
convert the rest to use proper_name -- manually
* src/base64.c (AUTHORS): Rename from AUTHOR, for consistency.
Jim Meyering [Mon, 19 May 2008 14:28:14 +0000 (16:28 +0200)]
convert 3-author programs to use proper_name
g grep -E -l 'define AUTHORS "[^,]+", "[^,]+", "[^,]+"$'|xargs perl -pi -e \
's/(define AUTHORS) ("[^,]+"), ("[^,]+"), ("[^,]+")$/$1 \\\n proper_name ($2), \\\n proper_name ($3), \\\n proper_name ($4)/'
Jim Meyering [Mon, 19 May 2008 14:26:25 +0000 (16:26 +0200)]
convert 2-author programs to use proper_name
g grep -E -l 'define AUTHORS "[^,]+", "[^,]+"$'|xargs perl -pi -e \
's/(define AUTHORS) ("[^,]+"), ("[^,]+")$/$1 \\\n proper_name ($2), \\\n proper_name ($3)/'
Jim Meyering [Mon, 19 May 2008 14:24:27 +0000 (16:24 +0200)]
convert single-author programs to use proper_name
g grep -E -l 'define AUTHORS "[^,]+"$'|xargs perl -pi -e \
's/(define AUTHORS) ("[^,]+")$/$1 proper_name ($2)/'
Jim Meyering [Mon, 19 May 2008 14:14:13 +0000 (16:14 +0200)]
use gnulib's proper_name_utf8 function, but *not* proper_name
* bootstrap.conf (gnulib_modules): Add propername.
(XGETTEXT_OPTIONS): Add options to tell xgettext about the functions.
* src/cat.c, src/cp.c, src/df.c, src/du.c, src/split.c:
Mark Torbjörn Granlund's name.
* src/ptx.c: Mark François Pinard's name.
Use "TRANSLATORS:" comment marker, rather than "Note to translators:".
* src/system.h: Include propername.h.
(proper_name): Define away.
* src/Makefile.am (cat_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD):
Initialize, so we can...
(cat_LDADD, cp_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD):
...Use "+=" to append $(LIBICONV) for each program that uses
proper_name_utf8.
Jim Meyering [Thu, 22 May 2008 22:30:46 +0000 (00:30 +0200)]
* POTFILES.in: Add lib/copy-acl.c.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Jim Meyering [Tue, 20 May 2008 15:58:42 +0000 (17:58 +0200)]
install: avoid a leak in currently-ifdef'd-out code
* src/install.c (setdefaultfilecon)
[ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT]:
Call matchpathcon_init_prefix only once.
Suggestion from Stephen Smalley. Reported by Ben Webb in
<http://bugzilla.redhat.com/447410>.
Jim Meyering [Mon, 19 May 2008 17:50:34 +0000 (19:50 +0200)]
use gnulib's base64 module, now that it's sync'd to match this one
* gl/lib/base64.c: Remove file.
* gl/lib/base64.h: Remove file.
Pádraig Brady [Mon, 19 May 2008 06:54:07 +0000 (07:54 +0100)]
doc: clarify field delimiter description in uniq --help output
* src/uniq.c: Clarify in help output that field delimiters are
blanks and not the larger set of whitespace characters.
Jim Meyering [Fri, 16 May 2008 20:55:27 +0000 (22:55 +0200)]
tests: skip when a debian libc6-2.7-11 bug makes printf segfault
* tests/misc/printf-surprise: Detect case of a low-memory-provoked
segfault and skip the test (this is actually a bug in snprintf).
For details, see http://bugs.debian.org/481543
Jim Meyering [Thu, 15 May 2008 09:43:18 +0000 (11:43 +0200)]
tests: sync and update wc and du --files0-from tests
* tests/du/files0-from: Sync from tests/misc/wc-files0-from.
(minus-in-minus): New test.
Adjust for new diagnostics.
* tests/misc/wc-files0-from: Adjust for new diagnostics.
Jim Meyering [Thu, 15 May 2008 09:19:44 +0000 (11:19 +0200)]
du, wc: merge improved --files0-from=F-related diagnostics
du gave a better diagnostic for one unusual case,
and wc gave a better diagnostic for a different one.
Now each diagnoses both unusual cases.
* src/du.c (main): Disallow '-' as file name when reading from stdin.
* src/wc.c (main): Give a better diagnostic for a zero-length file name.
Jim Meyering [Mon, 12 May 2008 12:43:23 +0000 (14:43 +0200)]
test invalid-option handling in all programs
* tests/Makefile.am (TESTS): Add misc/invalid-opt.
* tests/misc/invalid-opt: New file.
Jim Meyering [Wed, 14 May 2008 07:37:02 +0000 (09:37 +0200)]
tests: remove ugly /bin/sh wrapper around each perl-based test script
* tests/check.mk (TESTS_ENVIRONMENT): Save and restore TMPDIR around
envvar-check, so that the few scripts that require $TMPDIR don't fail.
This is also good to let a user's default TMPDIR setting be used e.g.,
in the search for an 'other-partition'.
FIXME: this is pretty ugly. maybe undo it and find a better way.
(TESTS_ENVIRONMENT): Invoke perl scripts with $(PERL), and use -T
if the script requires that. Otherwise, use $(SHELL).
* tests/misc/md5sum-newline: Create a file whose name contains
a newline in Perl (resort to using "system", since open refuses).
Fix old brokenness exposed by this change:
* tests/du/files0-from: Correct test not to rely on stdin
being attached to a non-tty.
* tests/misc/sort (3g, 3h, 3i): Likewise: add explicit empty input file.
Avoid warnings about using qw()-around-commas.
* tests/rm/fail-eperm: Now that this test is run from a temporary
subdirectory, adjust the full name of the "rm" program we're going
to run.
Change #!/bin/sh to #!/usr/bin/perl, and factor out the few lines
of boilerplate code to invoke perl. Do not "require 5.00x";
a configure-time Perl test handles that
* tests/dd/skip-seek:
* tests/misc/base64:
* tests/misc/basename:
* tests/misc/cut:
* tests/misc/date:
* tests/misc/dircolors:
* tests/misc/dirname:
* tests/misc/expand:
* tests/misc/expr:
* tests/misc/factor:
* tests/misc/fmt:
* tests/misc/fold:
* tests/misc/head:
* tests/misc/head-elide-tail:
* tests/misc/join:
* tests/misc/ls-misc:
* tests/misc/md5sum:
* tests/misc/md5sum-newline:
* tests/misc/mktemp:
* tests/misc/od:
* tests/misc/paste:
* tests/misc/pr:
* tests/misc/printf-cov:
* tests/misc/seq:
* tests/misc/sha1sum:
* tests/misc/sha1sum-vec:
* tests/misc/sha224sum:
* tests/misc/sha256sum:
* tests/misc/sha384sum:
* tests/misc/sha512sum:
* tests/misc/sort-merge:
* tests/misc/stat-printf:
* tests/misc/sum:
* tests/misc/tac:
* tests/misc/tail:
* tests/misc/test:
* tests/misc/test-diag:
* tests/misc/tr:
* tests/misc/tsort:
* tests/misc/tty-eof:
* tests/misc/unexpand:
* tests/misc/uniq:
* tests/misc/wc:
* tests/misc/wc-files0-from:
* tests/misc/xstrtol:
* tests/mv/i-1:
* tests/pr/pr-tests:
* tests/rm/empty-name:
* tests/rm/fail-eperm:
* tests/rm/unreadable:
Jim Meyering [Mon, 12 May 2008 12:39:55 +0000 (14:39 +0200)]
tests: allow to run Perl tests more cleanly
Before this change, perl tests were run via a #!/bin/sh script
in which perl was invoked via $(PERL) ... -- - <<\EOF.
That made some stty tests fail due to the way stdin was usurped.
* build-aux/check.mk (am__check_pre): Don't append $(SHELL) to this
nominally automake-internal variable.
* tests/check.mk (TESTS_ENVIRONMENT): Instead, define a shell function
here, and append it to the more user-visible $(TESTS_ENVIRONMENT).
Jim Meyering [Mon, 12 May 2008 06:49:58 +0000 (08:49 +0200)]
tests: env-related clean up
* tests/Coreutils.pm: tiny clean-up: s/env/env --/
* tests/misc/help-version: Use "env" rather than an absolute file
name prefix.
* tests/misc/printf-surprise: Likewise.
Jim Meyering [Sun, 11 May 2008 22:27:37 +0000 (00:27 +0200)]
tests: improve coverage of printf.c
* tests/misc/printf-cov: New file.
* tests/Makefile.am (TESTS): Add misc/printf-cov.
* tests/misc/help-version: Use env rather than abs file name prefix.
Jim Meyering [Sun, 11 May 2008 22:28:28 +0000 (00:28 +0200)]
make HACKING slightly more generic
* HACKING: remove some uses of "coreutils"
Point to git's own SubmittingPatches URL.
Bruno Haible [Thu, 15 May 2008 07:32:07 +0000 (09:32 +0200)]
doc: some Unicode characters cannot be specified via \u or \U
* doc/coreutils.texi (printf invocation): Clarify invalid ranges for
Unicode character escape syntax.
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.