summaryrefslogtreecommitdiff
path: root/tests/mv/Makefile.am
AgeCommit message (Collapse)Author
2008-04-21Revamp test-related Makefiles.Jim Meyering
One side-effect of this change is that "make check" now works even if you put "." early in your shell's search PATH (don't do that!). Remove all test-related Makefile.am files, except those generated by mk-script. Instead, tests/Makefile.am now lists not only the tests directly under tests/, but also those in tests/*/ that are not generated by mk-script, e.g., cp/abuse, cp/acl, mv/i-1, etc. A lot of these changes are like this: -. $srcdir/../lang-default +. $top_srcdir/tests/lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh * configure.ac (AC_CONFIG_FILES): Remove corresponding Makefiles. * tests/check.mk (vc_exe_in_TESTS): Relax syntax requirements. * tests/rwx-to-mode: Remove file. Rewritten as... * tests/test-lib.sh (rwx_to_mode_): ...this new function. * tests/Makefile.am (EXTRA_DIST): Remove rwx-to-mode. (SUBDIRS): Remove each dir with a removed Makefile.am. (EXTRA_DIST): Add $(TESTS). (TESTS): Add over 300 entries.
2008-03-19mv: never unlink a destination file before calling renameJim Meyering
While cp --preserve=links must unlink certain destination files, mv must never do that. * src/copy.c (copy_internal): Pull the '! x->move_mode' test "up", so it affects the entire condition, and not just DEREF_NEVER mode. Reported by James Ralston in <http://bugzilla.redhat.com/438076>. * tests/mv/atomic2: New file. Test for the above fix. * tests/mv/Makefile.am (TESTS): Add atomic2. * NEWS: Mention the bug-fix. [Bug introduced in 367719ba5f1dbd5e2f7fa2466c441f23f66a7c9e]
2007-10-14Pull all TESTS_ENVIRONMENT settings "up" into tests/check.mk.Jim Meyering
* tests/Makefile.am.in (TESTS_ENVIRONMENT): Remove definition. * tests/chgrp/Makefile.am: Likewise. * tests/chmod/Makefile.am: Likewise. * tests/chown/Makefile.am: Likewise. * tests/cp/Makefile.am: Likewise. * tests/dd/Makefile.am: Likewise. * tests/du/Makefile.am: Likewise. * tests/install/Makefile.am: Likewise. * tests/ln/Makefile.am: Likewise. * tests/ls/Makefile.am: Likewise. * tests/misc/Makefile.am: Likewise. * tests/mkdir/Makefile.am: Likewise. * tests/mv/Makefile.am: Likewise. * tests/readlink/Makefile.am: Likewise. * tests/rm/Makefile.am: Likewise. * tests/rmdir/Makefile.am: Likewise. * tests/tail-2/Makefile.am: Likewise. * tests/touch/Makefile.am: Likewise. * tests/check.mk (TESTS_ENVIRONMENT) [EXEEXT, EGREP, MAKE, PERL]: [CONFIG_HEADER, build_programs, host_os, host_triplet, PATH]: [REPLACE_GETCWD, CU_TEST_NAME]: Add definitions here. * tests/misc/pwd-long: Use $abs_top_builddir/src, not $BUILD_SRC_DIR. * tests/dd/skip-seek: Don't use $ENV{PROG}. * tests/rm/empty-name: Likewise. * tests/rm/unreadable: Likewise. * tests/mv/i-1: Likewise.
2007-10-05Make a failing cross-partition mv give a sensible diagnostic.Jim Meyering
A cross-partition move of a file in a sticky tmpdir and owned by another user would evoke an invalid diagnostic after copying it: mv: cannot remove `x': Operation not permitted Either of the following (mv.c, remove.c) changes would fix the bug by itself. I think it's slightly better to use both; the added cost is minimal: mv: an extra lstat-per-mv-cmdline-arg-that-goes-cross-partition, rm: an extra lstat-per-unlink-that-fails-w/EPERM. * src/remove.c (remove_entry): Also lstat the file upon EPERM. * src/mv.c (rm_option_init): Initialize root_dev_ino just as is done in rm, so that a cross-partition invoked remove.c:rm call works the same way as one invoked from the command-line use of "rm". That setting of root_dev_ino makes rm() do the equivalent of an additional lstat for each argument, which in turn gives rm enough information to issue the right diagnostic. * tests/mv/sticky-to-xpart (version): New file. Test for the above. * tests/mv/Makefile.am (TESTS): Add sticky-to-xpart. Arrange for "make check-root" to run the new root-only test. * tests/Makefile.am (tb): New target, to run the new root-only test. (all_t): Add tb. * src/c99-to-c89.diff: Adjust offsets.
2007-09-15More misc, test-related changes. (some to allow running tests as root)Jim Meyering
2007-09-15Convert tests/mv, too.Jim Meyering
* 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-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-02-24Remove the "gnits" option; it prohibits my using "+" as a versionJim Meyering
string suffix, and all it does (beyond the default "gnu" option) is to _require_ the THANKS file. * configure.ac (AM_INIT_AUTOMAKE): Remove it. Remove all AUTOMAKE_OPTIONS settings in Makefile.am files. * tests/chgrp/Makefile.am, tests/chmod/Makefile.am: * tests/chown/Makefile.am, tests/cp/Makefile.am: * tests/du/Makefile.am, tests/expr/Makefile.am: * tests/factor/Makefile.am, tests/general/Makefile.am: * tests/install/Makefile.am, tests/ln/Makefile.am: * tests/ls/Makefile.am, tests/mkdir/Makefile.am: * tests/mv/Makefile.am, tests/readlink/Makefile.am: * tests/rm/Makefile.am, tests/rmdir/Makefile.am: * tests/seq/Makefile.am, tests/stty/Makefile.am: * tests/tee/Makefile.am, tests/touch/Makefile.am:
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"'
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-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-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-09-24* tests/mv/hard-verbose: New file. Test for the above fix.Jim Meyering
* tests/mv/Makefile.am (TESTS): Add hard-verbose.
2006-09-20* NEWS: Document fix for cp -i and mv -i.Paul Eggert
* src/copy.c (copy_internal): With -i, prompt even if the source is a directory and the destination is not. This is required by POSIX and gives the user a chance to bail out before failing. * tests/cp/Makefile.am (TESTS): Add cp-i. * tests/cp/cp-i: New file. * tests/mv/Makefile.am (TESTS): Add i-5. * tests/mv/i-5: New file.
2006-08-26* tests/mv/Makefile.am (TESTS): Add backup-dir.Jim Meyering
2006-08-17Add/fix copyright notices and adjust to latest GNU FDL.Paul Eggert
2006-07-09(TESTS): Add dir2dir.Jim Meyering
2006-07-03* tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):Jim Meyering
Add $VG_PATH_PREFIX as a prefix to $PATH
2006-05-11(TESTS): Add no-target-dir.Jim Meyering
2006-05-11(TESTS): Add atomic.Jim Meyering
2005-11-17(XFAIL_TESTS): Add acl.Jim Meyering
2005-11-17(TESTS): Add acl.Jim Meyering
2005-05-10(TESTS): Add reply-no.Jim Meyering
2004-10-21(TESTS): Add leak-fd.Jim Meyering
2004-03-12(TESTS): Add part-hardlink.Jim Meyering
2003-09-07(EXTRA_DIST): Add vfat.Jim Meyering
2003-04-05*** empty log message ***Jim Meyering
2003-04-04(TESTS): Add hard-4.Jim Meyering
2003-03-02(TESTS): Add hard-3.Jim Meyering
2003-02-28(TESTS): Add hard-2.Jim Meyering
2003-02-02*** empty log message ***Jim Meyering
2002-06-15(TESTS): Add perm-1.Jim Meyering
2002-03-29(TESTS): Add i-link-no.Jim Meyering
2002-03-17(TESTS): Add part-fail.Jim Meyering
2001-11-22(TESTS): Add dup-source.Jim Meyering
2001-10-21(TESTS): Remove i-3. It's not portable.Jim Meyering
2001-09-23(TESTS): Add childproof.Jim Meyering
2001-09-08(TESTS): Add i-4.Jim Meyering
2001-08-07(TESTS): Add update.Jim Meyering
2001-08-05(TESTS): Add i-3.Jim Meyering
2001-01-14(TESTS): Add trailing-slash.Jim Meyering
2001-01-13(TESTS): Add into-self-4.Jim Meyering
2000-09-22(TESTS): Add part-rename.Jim Meyering
2000-09-02*** empty log message ***Jim Meyering
2000-06-12(TESTS): Add diag.Jim Meyering
2000-05-20(TESTS): Add i-2.Jim Meyering
2000-02-03*** empty log message ***Jim Meyering
2000-02-03(TESTS): Add dir-file.Jim Meyering
1999-12-04(TESTS): Add to-symlink.Jim Meyering