summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2007-02-24* NEWS: sort no longer compresses temporaries by default.Paul Eggert
* bootstrap.conf: Remove findprog. * doc/coreutils.texi (sort invocation): The default is to not compress. Don't treat "" specially. * src/sort.c: Don't include findprog.h. (create_temp): Compress only if the user specified --compress-program. * tests/misc/sort-compress: Adjusts tests to match new behavior.
2007-02-24* tests/readlink/can-e: Put the closing double-quote at the end of aBruno Haible
backquoted word, not in the middle. Works around a bug in sh on OSF/1 4.0d. * tests/readlink/can-f: Likewise. * tests/readlink/can-m: Likewise.
2007-02-24* tests/du/slink: Skip the test if executing on an nfsv3 file system.Bruno Haible
This avoids a test failure at least on OSF/1 4.0d.
2007-02-23With -Dlint, make shuf free all heap-allocated storage.Jim Meyering
* src/shuf.c (main): Move declaration of input_lines to function scope, and initialize to NULL, so we can free it. [lint]: Free all malloc'd memory. * tests/misc/shuf: Also test shuf's -e and -i options.
2007-02-22Honor dd's noatime flag if possible, even if not supported on build fsPaul Eggert
* doc/coreutils.texi (dd invocation): Warn that noatime might not be reliable. * src/dd.c (flags, usage): Look at O_NOATIME, not HAVE_WORKING_O_NOATIME, to decide whether to support the noatime flag, so that dd attempts O_NOATIME even if the build file system does not support it. Problem reported by Jim Meyering today in bug-coreutils. * tests/dd/misc: Generate a warning, not a failure, if noatime exists but fails.
2007-02-21* tests/misc/date: Remove vestigial use of Data::Dumper.Jim Meyering
2007-02-19* NEWS: sort now uses a --compress-program option rather thanPaul Eggert
an environment variable. * doc/coreutils.texi (sort invocation): Document this. * src/sort.c (usage): Likewise. (COMPRESS_PROGRAM_OPTION): New const. (long_options, create_temp, main): Support new option. * tests/misc/sort-compress: Test it.
2007-02-18* tests/rm/fail-eacces: Skip this test when running as root.Jim Meyering
Reported by Matthew Woehlke.
2007-02-13Also check for and print stderr output, in case a program fails.Jim Meyering
* tests/misc/tty-eof: Occasionally (not reproducible), this test would fail, with one or more programs exiting nonzero, e.g., tty-eof: sha224sum exited with status 1 (expected 0) Now, maybe we'll get a clue, the next time that happens.
2007-02-12* tests/misc/pwd-unreadable-parent: Skip the test if we'reJim Meyering
definitely using the replacement. * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
2007-02-03Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlinkJim Meyering
* NEWS: Mention the bug fix. * tests/misc/pwd-unreadable-parent: New file. * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
2007-02-03* NEWS: Document fix for cp --preserve=mode.Paul Eggert
* src/copy.c (copy_internal): Omit the group- or other-writeable permissions when creating a directory, to avoid a race condition if the special mode bits aren't right just after the directory is created. * src/cp.c (make_dir_parents_private): Likewise. * tests/cp/parent-perm-race: Test for the "cp --preserve=mode" race fix in copy.c.
2007-02-03* NEWS: Document fix for cp --parents.Paul Eggert
* src/cp.c (make_dir_parents_private): Report the error sooner with "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not creating the directory, DEST/DIR. * tests/cp/cp-parents: Test for the non-race-condition bug fixed by the above change.
2007-01-24Remove usually-skipped test.Jim Meyering
* tests/cp/open-perm-race: Remove this file. It is subsumed by parent-perm-race. * tests/cp/Makefile.am (TESTS): Remove open-perm-race. * tests/sort/Makefile.am: Regenerate.
2007-01-24* NEWS: New option sort -C, proposed by XCU ERN 127, which looksPaul Eggert
like it will be approved. Also add --check=quiet, --check=silent as long aliases, and --check=diagnose-first as an alias for -c. * doc/coreutils.texi (sort invocation): Document this. Also, mention that sort -c can take at most one file. * src/sort.c: Implement this. Include argmatch.h. (usage): Document the change. (CHECK_OPTION): New constant. (long_options): --check now takes an optional argument, and is now treated differently from 'c'. (check_args, check_types): New constant arrays. (check): New arg CHECKONLY, which suppresses diagnostic if -C. (main): Parse the new options. * tests/sort/Test.pm (02d, 02d, incompat5, incompat6): New tests for -C.
2007-01-24Fix a typo.Jim Meyering
* tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir. * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
2007-01-24Don't depend on "which".Jim Meyering
* tests/misc/sort-compress (SORT): Use $abs_builddir, now which. * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
2007-01-24Test sort compression.Dan Hipschman
* tests/misc/Makefile.am: Add the test. * tests/misc/sort-compress: New file containing the tests.
2007-01-20* tests/misc/pwd-long: Work properly even when run from theJim Meyering
wrong one of two or more bind-mounted sibling directories. Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
2007-01-17Make "rm --interactive=never ..." never prompt.Jim Meyering
* NEWS: Mention this. * src/remove.h (enum rm_interactive): New ternary type. (struct rm_options) [interactive]: Use it, here -- rather than bool. * src/remove.c (prompt): Reflect type change. * src/mv.c (rm_option_init): Initialize to RMI_NEVER now. * src/rm.c (main): Add a FIXME comment for '-d' option. Adapt to type change of rm_options.interactive. * tests/rm/i-never: New file. Test for the above fix. * tests/rm/Makefile.am (TESTS): Add i-never.
2007-01-13Put CU_TEST_NAME in the environment for each test run by "make check".Jim Meyering
* 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-11* tests/misc/test-diag: Work also when libc's error functionJim Meyering
reports the entire program name ("../../src/test"), rather than just the final component.
2007-01-07* tests/sample-test: Update copyright date to 2007.Jim Meyering
* Makefile.maint (copyright-check): Also check the copyright date in tests/sample-test.
2007-01-06* tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,Jim Meyering
based on examples from G.P. Halkes in <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
2007-01-06* src/fmt.c (copy_rest): Correct prefix handling.G.P. Halkes
Don't elide a line with the prefix followed by only white space. (get_line): Move EOF-check to loop-termination condition. * tests/fmt/basic (pfx-1): Adjust test to expect desired result. (pfx-2): Remove test; its premise was contrary to the documentation.
2007-01-04[ChangeLog]Jim Meyering
When decoding, always allow newlines in input, with almost no performance impact. * src/base64.c (do_decode): Initialize decode context. Call base64_decode one more time, after all input is processed. (usage): When decoding, newlines are always accepted. * tests/misc/base64: Add a bunch of tests, for the above. * gl/lib/base64.c: Include <string.h>. (base64_decode_ctx_init, get_4, decode_4): New functions. (base64_decode): Efficiently handle interspersed newlines. (base64_decode_alloc): Update signature. * gl/lib/base64.h (struct base64_decode_context): Define. (base64_decode_ctx_init): Add prototype. (base64_decode, base64_decode_alloc): Update prototypes. [doc/ChangeLog] * coreutils.texi (base64 invocation): When decoding, newlines are always accepted.
2007-01-03Avoid spurious test failures on MacOS X 10.3.9, in a German locale.Bruno Haible
* tests/chown/deref: Apply lang-default. * tests/misc/split-a: Likewise. * tests/mv/reply-no: Likewise. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-01-02Now, "ls -FRL" always follows symbolic links on Linux.Paul Eggert
* NEWS: Mention this bug fix. * src/ls.c (gobble_file): Fix bug reported by Nobuyuki Tsuchimura in http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html where "ls -FRL" didn't follow a symbolic link in some cases on Linux. * tests/ls/follow-slink: Add a test for this case. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-01-01* tests/rm/fail-eperm: Instead, simply transform the actual output diagnostic.Jim Meyering
Test failure reported by Bob Proulx.
2007-01-01* tests/rm/fail-eperm: Revert last change. The PATH=... settingJim Meyering
is not honored at least on HP-UX 11.23 systems.
2006-12-30* tests/misc/base64: Factor a long, repetitive string.Jim Meyering
2006-12-30* tests/rm/fail-eperm: Avoid spurious differences (the error functionJim Meyering
from latest glibc no longer prints the full program_name): so don't invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
2006-12-30* tests/mv/acl (skip): Skip this test also if the destinationJim Meyering
directory, which is on a different file system, lacks ACL support.
2006-12-22* NEWS: dd bs= operands now silently override later ibs= and obs=,Paul Eggert
as POSIX requires. * src/dd.c (scanargs): Implement it. * tests/dd/misc (outbytes): Test it. * doc/coreutils.texi (dd invocation): Specify that bs=N overrides later ibs and obs, undoing part of the previous change. (The behavior was wrong.)
2006-12-21"rm -rf /etc/motd" (run by non-root) now prints a diagnostic.Jim Meyering
* src/remove.c (remove_entry): Handle EACCES for a non-directory, too. Karl Berry reported that a cross-partition "mv /etc/issue ~" failed with the um,... suboptimal diagnostic, "mv: cannot remove `/etc/issue': Not a directory". * tests/rm/Makefile.am (TESTS): Add fail-eacces. * tests/rm/fail-eacces: New file. * NEWS: Mention that both mv and rm are affected.
2006-12-20"cut -f 2- A B" no longer triggers a double-free bugJim Meyering
* 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-15* tests/cp/open-perm-race: Correct the gdb-existence check.Jim Meyering
Don't run either subsequent gdb command in a sub-shell. Reported by Thomas Schwinge. * THANKS: bring up to date.
2006-12-15Make sure cp -p isn't too generous with file permissions.Paul Eggert
* tests/cp/Makefile.am (TESTS): Add file-perm-race. * tests/cp/file-perm-race: New file. Signed-off-by: Jim Meyering <jim@meyering.net>
2006-12-15Ensure cp -pR --parents isn't too generous with parent permissions.Paul Eggert
* tests/cp/Makefile.am (TESTS): Add parent-perm-race. * tests/cp/parent-perm-race: New file. Signed-off-by: Jim Meyering <jim@meyering.net>
2006-12-14* tests/chgrp/default-no-deref: Don't assume that files are createdJim Meyering
with the primary group by default. That's not true in a directory with the set-GID bit set.
2006-12-14Don't hang when there's no input tty.Jim Meyering
* tests/cp/open-perm-race: Skip this test if there is no controlling input `terminal'.
2006-12-14Test for a hard-to-detect race fix, using gdb.Jim Meyering
* tests/cp/open-perm-race: New file, to test for the cp --preserve=ownership fix of 2006-12-06. * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir. (TESTS): Add open-perm-race.
2006-12-14chgrp, chown: Don't prohibit -RLh, aka -RL with --no-dereference.Jim Meyering
* src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference. * src/chown.c (main): Likewise. * src/chown-core.c (change_file_owner): Add to a comment. * tests/chown/preserve-root: Add tests. * doc/coreutils.texi (Treating / specially): With --preserve-root, chgrp and chown will not modify "/", even through a symlink.
2006-12-14* NEWS: --preserve-root now works with chgrp, chmod, and chown.Jim Meyering
* src/chmod.c (process_file): Do honor the --preserve-root option. * src/chown-core.c (change_file_owner): Likewise, but here, also handle the case in which a traversal would go "through" a symlink to root. Reported by Matthew M. Boedicker * tests/chown/preserve-root: Test for the above. * tests/chown/Makefile.am (TESTS): Add preserve-root.
2006-12-13Don't fail if mv/acl test succeeds.Andreas Schwab
* tests/mv/acl (skip): Check for acl support in the file system. * tests/mv/Makefile.am (XFAIL_TESTS): Remove. (TESTS_ENVIRONMENT): Pass CONFIG_HEADER. Signed-off-by: Jim Meyering <jim@meyering.net>
2006-12-13Remove some arbitrary restrictions on size fields,Paul Eggert
so that commands like "sort -k 18446744073709551616" no longer fail merely because 18446744073709551616 doesn't fit in uintmax_t. The trick is that these fields can all be treated as effectively infinity; their exact values don't matter, since no internal buffer can be that long. * src/join.c (string_to_join_field): Verify that SIZE_MAX <= ULONG_MAX if the code assumes this. Silently truncate too-large values to SIZE_MAX, as the remaining code will do the right thing in this case. * src/sort.c (parse_field_count): Likewise. * src/uniq.c (size_opt, main): Likewise. * tests/join/Test.pm (bigfield): New test. * tests/sort/Test.pm (bigfield): New test. * tests/uniq/Test.pm (121): New test. Signed-off-by: Jim Meyering <jim@meyering.net>
2006-12-13* tests/chgrp/default-no-deref: New test.Jim Meyering
* tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
2006-12-09* tests/uniq/Test.pm (test_vector): Skip the pipe-reading testJim Meyering
whenever uniq is expected to fail. This should catch the other case [test #112] in which uniq emits "cat: write error: Broken pipe" on some systems.
2006-12-07* tests/touch/empty-file: Use envvar-check, so "make check" doesn'tJim Meyering
evoke diagnostics like this when COLUMNS=0 in the environment: ls: ignoring invalid width in environment variable COLUMNS: 0 * tests/touch/no-rights: Likewise. * tests/help-version: Likewise.
2006-12-07Make the output of "make check" more reproducible.Jim Meyering
* tests/uniq/Test.pm: Don't perform the pipe-reading version of test 118, since it emits "cat: write error: Broken pipe" on some systems.