summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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.
2006-12-07cp -p now clears special bits if it fails to preserve owner or groupPaul Eggert
* NEWS: Document the cp -p fix for special bits. * src/copy.c (set_owner): Now returns a three-way result, so that the caller can clear the special bits. All callers changed. (copy_reg): Don't set the special bits if chown failed. (copy_internal): Likewise. * tests/cp/special-bits: Test this fix. Signed-off-by: Jim Meyering <jim@meyering.net>
2006-12-06Make the output of "make check" more reproducible.Jim Meyering
* tests/misc/date-sec: Don't emit any diagnostic about sleeping.
2006-12-03* tests/misc/date-sec: Output a fixed string.Jim Meyering
2006-12-03* NEWS: du --one-file-system (-x) would skip subdirectories of anyJim Meyering
directory listed as second or subsequent command line argument. * tests/du/one-file-system: New file. Test for today's fts.c fix. * tests/du/Makefile.am (TESTS): Add one-file-system.
2006-12-02* tests/du/basic: Generate 4KB file simply using printf, rather thanJim Meyering
seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
2006-11-28* tests/mv/no-target-dir: Detect a buggy rename syscall. If found,Jim Meyering
skip this test. This happens at least on ia64 linux-2.4.19 w/ext3. Reported by Matthew Woehlke.
2006-11-28* tests/mv/dir2dir: Also accept EBUSY.Jim Meyering
Reported by Matthew Woehlke.
2006-11-24* tests/du/inacc-dest: Skip this test when running as root.Theodoros V. Kalamatianos
2006-11-23* tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,Jim Meyering
rather than a pipeline that would sometimes evoke a diagnostic like "seq: write error: Broken pipe".
2006-11-23* tests/help-version: Suppress dd transfer rate output.Jim Meyering
2006-11-21* tests/rm/one-file-system: Upon setup failure (e.g., mount failure),Jim Meyering
skip the test rather than failing. Reported by Michael Deutschmann.
2006-11-21* tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,Jim Meyering
rather than just "exit N".
2006-11-21Arrange for "make check-root" to run the new root-only test.Jim Meyering
* tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid. (all_t): Add t7.
2006-11-20Add a root-only test for today's lib/idcache.c fix.Jim Meyering
* tests/ls/nameless-uid: New file. * tests/ls/Makefile.am (TESTS): Add nameless-uid. (TESTS_ENVIRONMENT): Add PERL to the list.
2006-11-19* tests/tail-2/assert-2: Mark as a very-expensive test, because IJim Meyering
find the 7-second sleep annoyingly long. Besides, this test is probably far too specific and timing sensitive ever to trigger again. * tests/tail-2/assert: Likewise.
2006-11-18"ln --backup f f" produces a misleading diagnostic:Jim Meyering
ln: creating hard link `f' => `f': No such file or directory * src/ln.c (do_link): Give a better diagnostic in this unusual case. (do_link): Rename local: s/lstat_ok/dest_lstat_ok/. * tests/ln/Makefile.am (TESTS): Add hard-backup. * tests/ln/hard-backup: New test for the above.
2006-11-16* tests/tail-2/append-only: If chattr +a fails, exit 77 (to tellJim Meyering
automake we're skipping this test), and give a diagnostic to tell the user the same thing. Reported by Mike Grayson.
2006-11-12* tests/du/Makefile.am (TESTS): Add inacc-dest.Jim Meyering
2006-11-12du would exit early, when encountering an inaccessible directoryJim Meyering
Reported by Mike Frysinger, in http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger. * tests/chgrp/no-x: Remove the "fts_read failed: ..." diagnostic from the expected output when using native fdopendir. * tests/chmod/no-x: Likewise. * tests/du/no-x: Likewise.
2006-11-12Avoid false-positive when testing via valgrind.Jim Meyering
* tests/mv/atomic: Grep strace output for a more specific pattern than just "unlink", since that got a false positive when testing under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
2006-10-26Avoid a shell bug in Tru64 4.0 sh's handling of double-quoted strings.Jim Meyering
[patch by Paul Eggert] * tests/chmod/c-option: When double-quoting part of a word, prefer to double-quote the whole word. This is a bit easier to read (at least for me), and in some cases it avoids a shell bug with Tru64 4.0 sh reported by Nelson H. F. Beebe. For example, instead of "$abs_srcdir"/../setgid-check we now write "$abs_srcdir/../setgid-check". * tests/cp/cp-parents: Likewise. * tests/du/inaccessible-cwd: Likewise. * tests/du/long-from-unreadable: Likewise. * tests/install/basic-1: Likewise. * tests/install/trap: Likewise. * tests/misc/close-stdout: Likewise. * tests/mkdir/concurrent-1: Likewise. * tests/mkdir/p-1: Likewise. * tests/mkdir/p-3: Likewise. * tests/mkdir/parents: Likewise. * tests/mkdir/perm: Likewise. * tests/readlink/can-e: Likewise. * tests/readlink/can-f: Likewise. * tests/readlink/can-m: Likewise. * tests/rm/inaccessible: Likewise. * tests/rm/unread3: Likewise. * tests/touch/no-create-missing: Likewise. * lib/.cvsignore: Add uinttostr.c.
2006-10-25* tests/sample-test: Update copyright year list to include onlyJim Meyering
the current year, since this is what I'll want in any new test.
2006-10-25new feature: rm accepts new option: --one-file-systemJim Meyering
Suggested by Steve McIntyre in <http://bugs.debian.org/392925>. * src/remove.h (struct rm_options) [one_file_system]: New member. * src/rm.c (rm_option_init): Initialize it. (usage): Document the option. * src/mv.c (rm_option_init): Likewise. * src/remove.c (remove_dir): With --one-file-system and --recursive, for each directory command line argument, do not affect a file system different from that of the starting directory. And give a diagnostic. * src/rm.c (ONE_FILE_SYSTEM): New enum. (main): Handle new option. * tests/rm/one-file-system: Test the above. * tests/rm/Makefile.am (TESTS): Add one-file-system. * tests/Makefile.am (check-root): Add the rm/one-file-system test to the list. (EXTRA_DIST): Add other-fs-tmpdir. * tests/mv/setup: Removed. Renamed to... * tests/other-fs-tmpdir: ...this new file. * tests/mv/Makefile.am (EXTRA_DIST): Remove setup. * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir. * tests/mv/backup-is-src: Likewise. * tests/mv/hard-link-1: 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/to-symlink: Likewise. * tests/mv/into-self-2: Likewise. [doc/ChangeLog] * coreutils.texi (rm invocation): Describe --one-file-system.
2006-10-24Don't let a failure in one test stop "make -k".Jim Meyering
* tests/Makefile.am (t1 t2 t3 t4 t5): New targets. (check-root): Depend on them, rather than executing the five commands in a single rule. Reported by Greg Schafer.
2006-10-23* tests/misc/pwd-long: Whoops. Don't exec the perl script. Otherwise, the ↵Jim Meyering
sh-trap-based clean-up code isn't run.
2006-10-23* tests/misc/pwd-long: Undo last change, since it made Perl invokeJim Meyering
pwd via a shell. Instead, ensure that the absolute name of the pwd binary consists solely of reasonable characters.
2006-10-22* tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.Jim Meyering
* tests/cp/cp-parents: Likewise. * tests/mkdir/parents: Likewise. * tests/mkdir/perm: Likewise.