1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-06-06 01:36:28 +02:00
Commit Graph

43 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 c8ef95eaed "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
* 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-21 08:58:11 +01:00
Jim Meyering 5e42576c01 new feature: rm accepts new option: --one-file-system
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-25 00:01:33 +02:00
Jim Meyering a1da4a039d * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
Paul Eggert pointed out that the specified file may exist,
in spite of such an errno value.
* tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
* tests/rm/ignore-name-too-long: Remove file.
2006-10-03 22:06:31 +00:00
Jim Meyering da9541f18e With --force (-f), rm no longer fails for ENOTDIR.
* src/remove.c (ignorable_missing): New function.
Use it everywhere, rather than open-coding the test.
Andreas Schwab reported the ENOTDIR problem.
(ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
* NEWS: Mention the bug fix.
* tests/rm/ignorable: New file.  Test for the ENOTDIR case.
* tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
* tests/rm/Makefile.am (TESTS): Add the new file names.
2006-10-03 13:13:09 +00:00
Jim Meyering a4d470409f Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
and NFS, whereby rm would not remove all files in a directory.
* src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
(NEED_REWIND): New macro, so that we incur the cost of the work-around
rewinddir only on afflicted systems.
* NEWS: Clarify and correct.
* tests/rm/readdir-bug: New file.  Test for the above fix.
* tests/rm/Makefile.am (TESTS): Add it.
Prompted by testing and analysis from Bruno Haible:
http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
2006-09-29 09:54:24 +00:00
Jim Meyering fbb234c2a7 Use $CONFIG_HEADER, rather than hard-coding it.
* tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
2006-09-03 07:22:08 +00:00
Paul Eggert b438e7548e (TESTS): Add r-4. 2006-09-03 02:55:20 +00:00
Paul Eggert 218fa5c61b Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +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 2e1677873a (TESTS): Add interactive-always and interactive-once. 2006-02-20 12:49:14 +00:00
Jim Meyering f00751ef19 (TESTS): Add empty-inacc. 2006-02-11 18:03:52 +00:00
Jim Meyering 4df4047d35 (TESTS): Add dir-nonrecur. 2005-11-02 09:38:16 +00:00
Jim Meyering 7a6efe58da (TESTS): Add dot-rel. 2004-10-21 08:07:27 +00:00
Jim Meyering 19000dd0f1 (TESTS): Add inaccessible. 2004-05-21 14:32:20 +00:00
Jim Meyering 4dbfc4c582 (TESTS): Add unread3. 2004-05-11 19:41:33 +00:00
Jim Meyering 66fd845fed (TESTS): Add no-give-up. 2004-05-08 12:49:53 +00:00
Jim Meyering 5395255560 (TESTS): Add dir-no-w. 2003-07-27 19:47:58 +00:00
Jim Meyering 9c8f60eaa0 (TESTS_ENVIRONMENT): Define PACKAGE_VERSION. 2003-07-23 07:03:42 +00:00
Jim Meyering 4cfe78b8a0 *** empty log message *** 2003-04-05 18:03:47 +00:00
Jim Meyering dc5916a65f (TESTS): Add fail-2eperm. 2003-03-04 19:52:20 +00:00
Jim Meyering 89fc480602 *** empty log message *** 2003-02-02 20:15:11 +00:00
Jim Meyering 7e4c16df3d (TESTS): Add cycle. 2003-01-04 09:09:48 +00:00
Jim Meyering fb918bedbf (TESTS): Add i-no-r. 2002-10-05 19:56:34 +00:00
Jim Meyering 7678915a9e (TESTS): Add fail-eperm. 2002-07-13 09:24:13 +00:00
Jim Meyering 99c8e3f461 (TESTS): Add dangling-symlink. 2002-07-04 12:06:08 +00:00
Jim Meyering 63a8743830 (TESTS): Add rm5. 2002-06-02 20:39:00 +00:00
Jim Meyering 59d5765b0f (TESTS): Add rm1, rm2, rm3, rm4. 2002-05-21 22:59:16 +00:00
Jim Meyering 2307570c3e (TESTS): Add isatty. 2001-02-18 19:39:33 +00:00
Jim Meyering 5c136d939e put hash at the end of the list 2000-05-19 07:10:09 +00:00
Jim Meyering 83616b114e (TESTS): Add hash. 2000-05-18 14:26:00 +00:00
Jim Meyering 11eebed20f (TESTS_ENVIRONMENT): Add pwd/ prefix to exported PATH value (though not strictly necessary, here). 2000-01-07 08:56:38 +00:00
Jim Meyering cf50a06294 (TESTS): Add new test `empty-name', but comment it out. 1998-11-01 00:12:07 +00:00
Jim Meyering c729fe037e (TESTS): Add new test `unreadable'. But comment
it out since we're so close to release and since the test compares the
text of diagnostics that are likely to vary between systems.
(TEST_ENVIRONMENT): Add required framework.
1998-10-25 14:08:38 +00:00
Jim Meyering 4a28ea9bd6 *** empty log message *** 1998-03-14 10:41:26 +00:00
Jim Meyering d255fdbe9c *** empty log message *** 1997-10-17 18:58:04 +00:00
Jim Meyering 4aa3cfc3db *** empty log message *** 1997-08-31 22:19:30 +00:00
Jim Meyering 59e5cb3ea3 *** empty log message *** 1997-08-31 16:18:10 +00:00
Jim Meyering 4a3c8c53e3 *** empty log message *** 1997-08-24 20:55:56 +00:00
Jim Meyering db00e4acb1 *** empty log message *** 1997-08-16 16:41:15 +00:00
Jim Meyering dd9b964694 *** empty log message *** 1997-08-02 17:21:18 +00:00
Jim Meyering 9a012ca907 . 1997-08-02 15:29:55 +00:00
Jim Meyering eb1e691d00 . 1997-08-02 15:23:59 +00:00