Commit Graph

24461 Commits

Author SHA1 Message Date
Eric Blake
17f0d568d3 Fix testsuite on cygwin.
* check.mk (%.log): Also allow suffix-less tests, on platforms
where $(EXEEXT) is not empty.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-09-30 09:40:26 +02:00
Eric Blake
3c98f1d3ee Test previous patch.
* tests/misc/groups-dash: New test.
* tests/misc/Makefile.am (TESTS): Add it.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-09-30 09:40:25 +02:00
Eric Blake
329982b723 * src/groups.sh: Don't ignore first argument if later argument is --.
Signed-off-by: Eric Blake <ebb9@byu.net>
2007-09-29 07:53:49 +02:00
Jim Meyering
5b0e904272 Avoid spurious test failure when SELinux stats "selinux/class".
* tests/ls/stat-free-symlinks: Grep for more precise /^stat("x"/.
2007-09-27 22:37:33 +02:00
Jim Meyering
491c54ca99 Move file-set and hash-triple modules to gnulib.
* bootstrap.conf (gnulib_modules): Remove file-set, now that
it's in gnulib, and the canonicalize module requires it there.
* gl/lib/file-set.c, gl/lib/file-set.h, gl/modules/hash-triple: Remove.
* gl/lib/hash-triple.c, gl/lib/hash-triple.h, gl/modules/file-set: Remove.
2007-09-27 10:53:36 +02:00
Jim Meyering
beaa39a649 Add a test to exercise a readlink bug.
* tests/misc/readlink-fp-loop: New file.  Test for the readlink bug
fixed through today's change to Gnulib's canonicalize module.
* tests/misc/Makefile.am (TESTS): Add readlink-fp-loop.
Bug report and a test case from mpb.mail@gmail.com.
2007-09-27 10:53:08 +02:00
Pádraig Brady
23d293cbc2 Make "Date input formats" easier to find in info file
* doc/coreutils.texi (date invocation):
`man date` gives all options for the date command except
the description of the date input formats. Therefore it
should be easy to browse to this info using `info date`.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
2007-09-27 08:41:03 +02:00
Jim Meyering
0359c2e1ca Use XOR, not OR to combine bits.
* gl/lib/hash-triple.c (triple_hash): Use XOR (^), not OR (|), to
combine the bits from hashing the name and those of the inode number.
Add a few comments and remove out-of-context ones.
2007-09-25 21:27:14 +02:00
Jim Meyering
e2a6cbca3b * NEWS: The recent rm-diagnostic fix also affects cross-partition "mv". 2007-09-24 16:33:35 +02:00
Jim Meyering
49e002db5e copy.c: Remove definitions of factored-out functions.
* src/copy.c: Include "file-set.h".
(seen_file, record_file): Remove functions that I factored
out on 2007-08-23.
2007-09-24 15:09:26 +02:00
Jim Meyering
1b246cc692 Don't print the commands of a 10-line script that's run in each subdir.
* tests/check.mk (vc_exe_in_TESTS): Add a leading "@", to reduce noise.
2007-09-22 23:26:45 +02:00
Jim Meyering
a7ec8caffe rm: give a sensible diagnostic when failing to remove a symlink
On some systems (those with openat et al), when rm would fail to
remove a symlink, it would fail with the misleading diagnostic,
"Too many levels of symbolic links".
* NEWS: Mention the bug fix.
* src/remove.c (is_nondir_lstat): New function.
(remove_entry): Use it to catch failed-to-remove symlink (and any
other non-dir) here so that we don't fall through and try to treat
it as directory, which -- with a symlink -- would provoke the bogus
ELOOP failure.
* tests/rm/fail-eacces: Add a test for the above.
* src/c99-to-c89.diff: Adjust offsets.
2007-09-22 13:27:57 +02:00
Jim Meyering
920b4416c1 rm: fix a tiny, nearly inconsequential bug.
Don't perform a "."-relative lstat, when the file in question
may well not be in ".".  Although this is a bug, a few attempts
to exercise it on a linux-2.6.22 system failed.  You probably need
a pre-openat system to trigger the failure.  The consequence of this
bug would be a lower-quality diagnostic upon failed dir removal.
* src/remove.c (is_dir_lstat): Add a parameter, fd_cwd.
Use it instead of hard-coding AT_FDCWD.
(remove_entry): Call is_dir_lstat with fd_cwd.

Signed-off-by: Jim Meyering <jim@meyering.net>
2007-09-22 08:44:42 +02:00
Karl Berry
ebeb56f9df TODO: It'd be nice to add renice.
Signed-off-by: Jim Meyering <jim@meyering.net>
2007-09-22 08:39:44 +02:00
Jim Meyering
308adf1691 Avoid a test failure due to now-parallelized tests.
* tests/du/two-args: Run "du .." from a sub-directory one level deeper.
2007-09-21 08:30:55 +02:00
Jim Meyering
5d0c06a24a Fix typo in previous change.
Spotted by Andreas Schwab.
2007-09-19 11:13:46 +02:00
Jim Meyering
cbade34401 * coreutils.texi (expr invocation): Correct description of relative
operator precedence.  Reported by hanpingtian@gmail.com.
2007-09-19 10:25:40 +02:00
Jim Meyering
dbab417753 tests/misc/tac-continue: Arrange to remove a temporary file.
Signed-off-by: Jim Meyering <jim@meyering.net>
2007-09-16 11:29:57 +02:00
Jim Meyering
ed2a9e9637 tests/check.mk (vc_exe_in_TESTS): Don't rely on the value of $(TESTS),
so that "make check TESTS=test-name" works once again.

Signed-off-by: Jim Meyering <jim@meyering.net>
2007-09-16 11:29:57 +02:00
Jim Meyering
d423f4a14b tests/CuTmpdir.pm: Use File::Find + chmod syscall, not chmod -R.
Signed-off-by: Jim Meyering <jim@meyering.net>
2007-09-16 11:29:57 +02:00
Jim Meyering
2983e54536 Revamp most test scripts.
Add a ChangeLog entry summarizing the preceding 30+ change sets.
2007-09-16 01:24:37 +02:00
Jim Meyering
57c4cb5d88 * tests/rm/v-slash: Avoid test failure with non-C locale.
Reported by Michael Stone.
2007-09-16 01:06:16 +02:00
Jim Meyering
d96a863cf5 Enable some previously omitted test scripts. Add a test cross-check.
* tests/rm/Makefile.am (TESTS): Add empty-name and unreadable.
* tests/rm/empty-name: Likewise.
* tests/rm/unreadable: Reenable this test.  Adjust for new rm.
* tests/mkdir/Makefile.am: Add writable-under-readonly.
* tests/mkdir/writable-under-readonly: Add some comments.
This test is always skipped, for now.
* tests/Makefile.am (ta): Hook up the new root-only script.
* tests/tail-2/infloop-1: Make this test pass.
* tests/tail-2/Makefile.am (TESTS): Add infloop-1.
* tests/tail-2/fflush: Remove unused file.
* tests/check.mk (vc_executable_is_in_TESTS): More portable.
* tests/check.mk (check): Depend on the above.
* build-aux/check.mk: Remove comment mentioning AUTHORS file.
2007-09-15 18:59:08 +02:00
Jim Meyering
56f1bd10fc Factor out definitions in TESTS_ENVIRONMENT of srcdir, top_srcdir, etc.
tests/check.mk (top_srcdir): Define.
tests/*/Makefile.am: Remove definitions of $(srcdir), $(top_srcdir),
$(abs_top_srcdir), and $(abs_top_builddir), since they're
defined via the included tests/check.mk.
2007-09-15 08:40:39 +02:00
Jim Meyering
fbae6a7b39 tests/general: Remove from VC, this long-unused directory and contents. 2007-09-15 08:40:39 +02:00
Jim Meyering
53d36aaf9a Adapt tests/tail-2/ to use test-lib.sh. 2007-09-15 08:40:39 +02:00
Jim Meyering
10d190b8b6 Adapt tests/readlink/ to use test-lib.sh. 2007-09-15 08:40:39 +02:00
Jim Meyering
5cb2610710 Move the sole test in tests/ls-2/ to tests/misc/.
* tests/ls-2/basic-1: Move this file to ...
* tests/misc/ls-misc: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add ls-misc.
* tests/Makefile.am (SUBDIRS): Remove ls-2.
* tests/ls-2: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/ls-2/Makefile.
2007-09-15 08:40:39 +02:00
Jim Meyering
a669dfdabb More misc, test-related changes. (some to allow running tests as root) 2007-09-15 08:40:39 +02:00
Jim Meyering
0539705768 Move all tests from test/{od,sha1sum,shred,stty} to tests/misc/.
Reflect these renamings:
od/od-N             misc/od-N
od/x8               misc/od-x8
sha1sum/basic-1     misc/sha1sum
sha1sum/sample-vec  misc/sha1sum-vec
shred/exact         misc/shred-exact
shred/remove        misc/shred-remove
stty/basic-1        misc/stty
stty/invalid        misc/stty-invalid
stty/row-col-1      misc/stty-row-col

* tests/misc/Makefile.am (TESTS): Add the new files.
* tests/Makefile.am (SUBDIRS): Remove the dir names.
* tests/od, tests/sha1sum, tests/shred, tests/stty: Remove the directories.
* configure.ac (AC_CONFIG_FILES): Remove the corresponding Makefile names.
2007-09-15 08:40:39 +02:00
Jim Meyering
44629cf147 Move the two tests in tests/tee to tests/misc/.
* tests/tee/basic: Move this file to ...
* tests/misc/tee: ...here.  Don't rely on $PROG in env.
* tests/tee/dash: Move this file to ...
* tests/misc/tee-dash: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add tee.
* tests/Makefile.am (SUBDIRS): Remove tee.
* tests/tee: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/tee/Makefile
2007-09-15 08:40:39 +02:00
Jim Meyering
eb3f59b7e1 Move the two tests in tests/sum/ to tests/misc/.
* tests/sum/basic-1: Move this file to ...
* tests/misc/sum: ...here.  Don't rely on $PROG in env.
* tests/sum/sysv: Move this file to ...
* tests/misc/sum-sysv: ...here.  Adapt it to use test-lib.sh.
* tests/misc/Makefile.am (TESTS): Add sum and sum-sysv.
* tests/Makefile.am (SUBDIRS): Remove sum.
* tests/sum: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/sum/Makefile.
2007-09-15 08:40:39 +02:00
Jim Meyering
1529be6051 Move the sole test in tests/tsort/ to tests/misc/tsort.
* tests/tsort/basic-1: Move this file to ...
* tests/misc/tsort: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add tsort.
* tests/Makefile.am (SUBDIRS): Remove tsort.
* tests/tsort: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/tsort/Makefile.
2007-09-15 08:40:39 +02:00
Jim Meyering
47b7234de3 Move the sole test in tests/unexpand to tests/misc/unexpand.
* tests/unexpand/basic-1: Move this file to ...
* tests/misc/unexpand: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add unexpand.
* tests/Makefile.am (SUBDIRS): Remove unexpand.
* tests/unexpand: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/unexpand/Makefile.
2007-09-15 08:40:39 +02:00
Jim Meyering
d62bdb30f7 Move the sole test in tests/seq to tests/misc/seq.
* tests/seq/basic: Move this file to ...
* tests/misc/seq: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add seq.
* tests/Makefile.am (SUBDIRS): Remove seq.
* tests/seq: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/seq/Makefile
2007-09-15 08:40:39 +02:00
Jim Meyering
be23f60132 Convert tests/mkdir/ to use test-lib.sh. 2007-09-15 08:40:39 +02:00
Jim Meyering
570fd054c6 Move the two tests in tests/md5sum to tests/misc/md5sum.
* tests/md5sum/basic-1: Move this file to ...
* tests/misc/md5sum: ...here.  Don't rely on $PROG in env.
* tests/md5sum/newline-1: Move this file to ...
* tests/misc/md5sum-newline: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add md5sum.
* tests/Makefile.am (SUBDIRS): Remove md5sum.
* tests/md5sum: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/md5sum/Makefile
2007-09-15 08:40:39 +02:00
Jim Meyering
b10817d9bd tests/sample-test: Update to use test-lib.sh. 2007-09-15 08:40:39 +02:00
Jim Meyering
03a08a4cd0 Convert tests/misc/ to use test-lib.sh, too. 2007-09-15 08:40:38 +02:00
Jim Meyering
28f1844cef Convert tests/ls/, too. 2007-09-15 08:40:38 +02:00
Jim Meyering
7455bf9432 Convert tests/ln/, too. 2007-09-15 08:40:38 +02:00
Jim Meyering
74ffe86ed0 Convert tests/install/, too. 2007-09-15 08:40:38 +02:00
Jim Meyering
a0cbaa4fc8 Move the two tests in tests/fmt to tests/misc/fmt.
* tests/fmt/basic: Move this file to ...
* tests/misc/fmt: ...here.  Don't rely on $PROG in env.
* tests/fmt/long-line: Move this file to ...
* tests/misc/fmt-long-line: ...here.
* tests/misc/Makefile.am (TESTS): Add fmt.
* tests/Makefile.am (SUBDIRS): Remove fmt.
* tests/fmt: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/fmt/Makefile
2007-09-15 08:40:38 +02:00
Jim Meyering
aa3a727dc0 Move the sole test in tests/factor to tests/misc/factor.
* tests/factor/basic: Move this file to ...
* tests/misc/factor: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add factor.
* tests/Makefile.am (SUBDIRS): Remove factor.
* tests/factor: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/factor/Makefile
2007-09-15 08:40:38 +02:00
Jim Meyering
fd9f53cfdf Move the sole test in tests/expr to tests/misc/expr.
* tests/expr/basic: Move this file to ...
* tests/misc/expr: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add expr.
* tests/Makefile.am (SUBDIRS): Remove expr.
* tests/expr: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/expr/Makefile
2007-09-15 08:40:38 +02:00
Jim Meyering
ec2064acc8 Convert tests/du/*, too. 2007-09-15 08:40:38 +02:00
Jim Meyering
18b3231bbf Move the sole test in tests/dircolors to tests/misc/dircolors.
* tests/dircolors/simple: Move this file to...
* tests/misc/dircolors: ...here.  Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add dircolors.
* tests/Makefile.am (SUBDIRS): Remove dircolors.
* tests/dircolors: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/dircolors/Makefile
2007-09-15 08:40:38 +02:00
Jim Meyering
ceb5b04614 Convert tests/dd/*, too. 2007-09-15 08:40:38 +02:00
Jim Meyering
33173e867a Convert tests/mv, too.
* tests/other-fs-tmpdir: Before, all callers would exit 77 upon failure to
find the required dir.  Now, exit 77 in this script so callers don't have to.
Adjust callers.
2007-09-15 08:40:38 +02:00
Jim Meyering
df0beae1eb Adjust chgrp, chmod, chown, cp tests to use test-lib.sh.
* tests/check.mk: Also define abs_top_builddir.
2007-09-15 08:40:38 +02:00