Commit Graph

46 Commits

Author SHA1 Message Date
Jim Meyering 9c88531fb0 Put CU_TEST_NAME in the environment for each test run by "make check".
* Transform all Makefile.am files so that when running "make check",
CU_TEST_NAME is set to the name of the test.  This is so that when I
run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
on the entire package it is more convenient to map a leak or error
found in a valgrind log file back to the offending test.
Use this command:
(echo tests/Makefile.am.in; find tests -name Makefile.am) \
 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
   -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
2007-01-13 11:32:19 +01:00
Jim Meyering d69fc66d81 "cut -f 2- A B" no longer triggers a double-free bug
* src/cut.c (cut_fields): Set file-scoped global to NULL after
freeing it.  This avoids a double-free (and core dump on some systems)
for this usage: "echo 1>a; echo 2>b; cut -f2- a b".  Reported by
James Hunt in <http://bugzilla.redhat.com/220312>.
* NEWS: List this bug fix.
* THANKS: Mention him.
* tests/misc/cut: New file.
* tests/misc/Makefile.am (TESTS): Add cut.
2006-12-20 14:25:55 +01:00
Paul Eggert 218fa5c61b Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
Paul Eggert 9e2b97bf35 * NEWS: Mention that df exits with nonzero status if it generates
no output.  This change was in 6.0 but inadvertently unmentioned.
* doc/coreutils.texi (df invocation): df exits nonzero if it outpus
nothing.
* src/df.c (file_systems_processed): Renamed from n_valid_args, and now
a boolean.
(show_dev): Don't set it until we actually output something.
Print the header if this is the first output.
(main): Don't print a header, as that is now show_dev's job.
* tests/misc/Makefile.am (TESTS): Add df.
* tests/misc/df: New file.
2006-08-15 23:41:24 +00:00
Paul Eggert f2f8ea1001 (TESTS): Add shuf. 2006-08-08 22:20:59 +00:00
Jim Meyering ae87c86b4a * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
Add $VG_PATH_PREFIX as a prefix to $PATH
2006-07-03 12:55:25 +00:00
Jim Meyering cc70571401 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
contains a list of NUL-separated file names.

* src/wc.c: Include "readtokens.h".
(usage): Describe the new option, and adjust the `Usage':
with this option, no FILE may be specified on the command line.
(main): Handle the new option.
* tests/misc/wc-files0: New tests, for the above.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/Makefile.am (TESTS): Add wc-files0.
2006-06-25 18:26:09 +00:00
Jim Meyering 790892db65 Ensure that cat works with any of the options, -A -v -e -E -T,
when applied to files in /proc and /sys, even when the FIONREAD
ioctl produces nonsensical results.  Before this change, cat would
produce no output (or truncated output), for some linux kernels.

* src/cat.c (write_pending): New function, factored out of cat.
(cat): Also interpret a negative ioctl/FIONREAD count as indicating
that there are bytes to read.  Some versions of linux-2.6.16 do that.
Write any pending output before returning.
Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
* NEWS: Mention this bug fix.
* tests/misc/cat-proc: New file.  Test for the above.
* tests/misc/Makefile.am (TESTS): Add cat-proc.
2006-06-08 20:13:37 +00:00
Paul Eggert 0d82817eb4 (PROG): Take the basename of $$tst,
in case Solaris make has prepended the directory.
(TESTS): Adjust to test script renamings.
2006-06-05 20:03:27 +00:00
Jim Meyering 8ebb9e3154 (TESTS): Sort. Add basename, dirname. 2006-03-26 11:48:19 +00:00
Jim Meyering 909b7b12a2 (TESTS): Add base64. 2006-02-27 13:38:42 +00:00
Jim Meyering d80a835f4a (TESTS): Add test. 2006-01-12 07:22:18 +00:00
Jim Meyering a8b913cfdd (TESTS): Add mknod. 2005-12-19 18:18:57 +00:00
Jim Meyering 7383c9a1a3 (TESTS): Add stat-printf. 2005-12-15 12:23:57 +00:00
Jim Meyering d65090198c (TESTS): Add sort-rand. 2005-12-10 09:38:07 +00:00
Jim Meyering 1ad9207ebb (TESTS): Add new sha224sum, sha256sum, sha384sum, sha512sum test scripts
here rather that each in its own directory.
2005-10-23 15:46:14 +00:00
Jim Meyering 0b20b31116 (TESTS): Add date. 2005-08-13 14:08:26 +00:00
Jim Meyering 6f4d4a7a52 (TESTS): Add tac-continue. 2004-12-14 10:36:04 +00:00
Jim Meyering 545e8add4d (TESTS): Add close-stdout. 2004-11-14 00:17:10 +00:00
Jim Meyering ef09b8426a (TESTS): Remove basic readlink test. 2004-07-06 16:13:01 +00:00
Jim Meyering 5956d74d8b (TESTS): Add pwd.
(BUILD_SRC_DIR): Define BUILD_SRC_DIR.
2004-06-14 17:20:19 +00:00
Jim Meyering ec55878bfe (TESTS): Add date-sec. 2004-03-15 09:02:50 +00:00
Jim Meyering 6c6abf3e4f (TESTS): Add expand. 2004-01-09 21:49:28 +00:00
Jim Meyering 88d5e8e8f1 (TESTS_ENVIRONMENT): Define PACKAGE_VERSION. 2003-11-03 16:11:06 +00:00
Jim Meyering 87052bad50 (TESTS): Add paste-no-nl. 2003-08-27 11:35:34 +00:00
Jim Meyering 2f9876c910 (TESTS): Add stat-fmt. 2003-08-27 09:01:01 +00:00
Jim Meyering 2a06944a15 (TESTS): Add fold. 2003-08-11 14:34:51 +00:00
Jim Meyering 326b48f041 (TESTS): Add nohup. 2003-07-11 20:35:29 +00:00
Jim Meyering 997f9e72d2 (TESTS): Add head-elide-tail. 2003-05-04 13:56:43 +00:00
Jim Meyering a20d798296 (TESTS): Add readlink. 2003-04-12 13:02:57 +00:00
Jim Meyering 2869e1b2ff (TESTS): Add split-fail. 2003-04-08 11:45:58 +00:00
Jim Meyering 4cfe78b8a0 *** empty log message *** 2003-04-05 18:03:47 +00:00
Jim Meyering 55277831b2 (TESTS): Add false. 2003-04-02 18:06:15 +00:00
Jim Meyering 68f68b6bf2 (TESTS): Reflect renaming. 2003-02-19 12:59:14 +00:00
Jim Meyering 89fc480602 *** empty log message *** 2003-02-02 20:15:11 +00:00
Jim Meyering a50dbaf78c (TESTS): Add cat-tty-eof. 2002-12-14 17:21:25 +00:00
Jim Meyering 76e1efd955 (TESTS): Add printf-hex. 2002-11-06 09:23:50 +00:00
Jim Meyering 79adfda48d (TESTS): Add nl. 2002-10-14 08:19:31 +00:00
Jim Meyering 38e6669301 (TESTS): Add split-l. 2002-10-13 22:10:20 +00:00
Jim Meyering 6b11de0aad (TESTS): Add printf. 2002-09-13 09:48:04 +00:00
Jim Meyering 78c7cfea3f (TESTS): Add nice and pathchk1. 2002-08-05 08:28:29 +00:00
Jim Meyering 0798f9740f (TESTS): Add split-a. 2002-02-16 07:21:59 +00:00
Jim Meyering 213d9a655f (TESTS): Add head-pos. 2002-02-11 11:00:46 +00:00
Jim Meyering 37d93402d2 (TESTS): Add sort.
(TESTS_ENVIRONMENT): Add PROG=$$tst.  This is a gross kludge
that depends on the name of an automake-generated local variable.
2002-01-14 08:53:25 +00:00
Jim Meyering 84d2cd2820 (TESTS): Add csplit. 2001-11-22 08:40:37 +00:00
Jim Meyering 34a52b7574 *** empty log message *** 2001-08-18 09:23:11 +00:00