summaryrefslogtreecommitdiff
path: root/tests/rm
AgeCommit message (Collapse)Author
2009-11-03tests: rm: add test for today's change in behaviorJim Meyering
* tests/Makefile.am (root_tests): Add rm/read-only to the list. * tests/rm/read-only: New file.
2009-10-30tests: factor 350 fail=0 initializations into test-lib.shJim Meyering
Run this command to remove the factored-out "fail=0" lines. perl -ni -e '/^fail=0$/ or print' $(g grep -l '^fail=0$') * tests/test-lib.sh: Initialize fail=0 here, not in 300+ scripts. * tests/...: nearly all bourne shell scripts Suggested by Eric Blake.
2009-10-27tests: fix PATH problems on cygwinEric Blake
* tests/misc/sort-compress: Remove non-portable over-restriction of PATH; besides, commit 3ea177e changed sort to no longer default to gzip. * tests/rm/fail-eperm: Untaint, rather than clear, PATH. * tests/misc/pwd-long: Likewise. Also skip test if long path cannot be created. (normalize_to_cwd_relative): Use eq rather than ==, since cygwin perl doesn't properly handle 64-bit ino_t numerically.
2009-10-26tests: rm/one-file-system: work around umount failureJim Meyering
* tests/rm/one-file-system (cleanup_): Unmount a/b, rather than "$other_partition_tmpdir", to accommodate those who link /etc/mtab to /proc/mounts. Reported by Gilles Espinasse in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18508
2009-09-11rm: rewrite to use ftsJim Meyering
* remove.c: Don't include "unlinkdir.h"; no longer used. Do not include <setjmp.h> or "cycle-check.h". Likewise. Include "xfts.h". (dir_name, dir_len): Remove definitions. (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Likewise. (INODE_SORT_DIR_ENTRIES_THRESHOLD, NEED_REWIND, D_TYPE): Likewise. (struct dirstack_state, Dirstack_state): Likewise. (g_buf, g_n_allocated): Remove declarations. (hash_freer, hash_compare_strings, rm_malloc): Remove functions. (rm_free, push_dir, top_dir, pop_dir, right_justify): Likewise. (full_filename0, xfull_filename, full_filename_): Likewise. (AD_stack_height, AD_stack_top, AD_stack_pop, AD_stack_clear): Likewise. (obstack_init_minimal, ds_init, ds_clear, ds_free): Likewise. (AD_pop_and_chdir, AD_ensure_initialized, AD_mark_helper): Likewise. (AD_mark_as_unremovable, AD_mark_current_as_unremovable): Likewise. (AD_push_initial, AD_push, AD_push, AD_is_removable): Likewise. (write_protected_non_symlink): Change 3rd parameter from dirstack_state "ds" to full_name. (prompt): Adjust parameters. Now, state comes from FTS/FTSENT pair. Those replace fd_cwd and "ds". Remove "filename". Remove pdirent_type in favor of new "is_dir" parameter. Rename is_empty to is_empty_p. (DO_RMDIR, DO_UNLINK): Remove definitions. (remove_entry, fd_to_subdirp, compare_ino): Remove functions. (dirent_count, dirent_inode_sort_may_be_useful): Likewise. (preprocess_dir): Likewise. (fts_skip_tree, mark_ancestor_dirs, excise, rm_fts): New functions. (remove_cwd_entries, remove_dir, rm_1): Remove functions. (rm): Rewrite as a simple loop calling fts_read and dispatching each entry via rm_fts. * src/rm.c (main): Adapt to new signature of rm(). * bootstrap.conf (gnulib_modules): Remove unlinkdir, no longer used. * src/Makefile.am (sc_tight_scope): Also recognize an extern "enum" declaration. * tests/rm/empty-name: Adjust expected output to match new diagnostic. * NEWS (Improvements): Mention it.
2009-08-25global: convert indentation-TABs to spacesJim Meyering
Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
2009-07-30tests: new function: require_openat_support_Jim Meyering
* tests/rm/inaccessible: Factor out openat-support-detection code... * tests/test-lib.sh (require_openat_support_): ...into this new function.
2009-06-23maint: update all Copyright year lists to include 2009Jim Meyering
2009-05-05tests: rm/one-file-system: umount more reliablyJim Meyering
* tests/rm/one-file-system: Run umount via trap, so it runs also upon irregular termination.
2009-03-26tests: mark the rm/ext3-perf test as "very" expensiveJim Meyering
* tests/rm/ext3-perf: Relegate this test to the very_expensive category, since it is failing too often for me, when run in parallel (-j4) with other disk-hammering tests. This test fails when it takes too long, so the fact that it fails under pressure is an inconvenience more than a real problem.
2009-03-06tests: fix just-introduced typo in rm/ext3-perfJim Meyering
* tests/rm/ext3-perf: Fix typo in commit 2b1e6636bea, 2009-02-27 "tests: rm/ext3-perf: relax this test".
2009-03-02tests: rm/ext3-perf: relax this testJim Meyering
* tests/rm/ext3-perf: If set-up takes too long, use the set-up time as the removal time limit. Otherwise, a parallel "make check" would usually fail when run with RUN_VERY_EXPENSIVE_TESTS=yes.
2008-10-01tests: use our new timeout programJim Meyering
* tests/rm/ext3-perf: Also, record set-up duration and FS type.
2008-09-27rm -r: avoid O(n^2) performance for a directory with very many entriesJim Meyering
This enhancement works around a problem that is specific to at least ext3 and ext4 file systems. With them, it would take hours to remove a two-million-entry directory. RAM-backed file systems (tmpfs) are not affected, since there is no seek penalty. * remove.c (rm_malloc, rm_free, compare_ino): New functions. (dirent_count, preprocess_dir): New function. [struct readdir_data]: New struct. (remove_cwd_entries): Call preprocess_dir. * tests/rm/ext3-perf: New file. Test for the performance fix. * NEWS: mention the new feature
2008-09-10tests: use "Exit $fail", not (exit $fail); exit $failJim Meyering
* tests/test-lib.sh (Exit): New function by Ralf Wildenhues in automake http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=20594c08f63 * tests/**: Convert all uses: This restrictive change converted the vast majority: git grep -l '^(exit \$fail); exit \$fail$' \ | xargs perl -pi -e 's/'^\(exit \$fail\); exit \$fail$/Exit \$fail/' And this did the rest, plus a few undesirable ones, so I manually backed out the changes to ChangeLog-* and build-aux/check.mk: git grep -l -E '\(exit [^)]+\); exit ' \ | xargs perl -pi -e 's/\(exit (.+?)\); exit \1/Exit $1/'
2008-06-13skip (don't fail) root-only tests for common set-up failuresJim Meyering
Address 2 of 4 failures reported by Jarod Wilson in http://bugzilla.redhat.com/442352. More details here: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13803 * tests/cp/cp-a-selinux: Skip the test if "mkfs -t ext2" fails. * tests/rm/fail-2eperm: Skip the test if "rm" is not accessible.
2008-05-27in 280+ tests/* files, use $srcdir, not $top_srcdir/testsJim Meyering
2008-05-27prefer abs_srcdir over abs_top_srcdir, ...Jim Meyering
so that e.g., tests/* may refer to absolute names without hard-coding the name of the containing directory (tests/, here). * tests/check.mk (TESTS_ENVIRONMENT): Define abs_srcdir. * tests/pr/pr-tests: Use $abs_srcdir/pr not $abs_top_srcdir/tests/pr. * tests/chmod/c-option: Use $abs_srcdir, not $abs_top_srcdir/tests. * tests/cp/cp-parents: Likewise. * tests/mkdir/parents: Likewise. * tests/mkdir/perm: Likewise. * tests/mv/acl: Likewise. * tests/mv/backup-is-src: Likewise. * tests/mv/hard-link-1: Likewise. * tests/mv/into-self-2: 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/sticky-to-xpart: Likewise. * tests/mv/to-symlink: Likewise. * tests/rm/one-file-system: Likewise. * tests/sample-test: Likewise.
2008-05-17tests: remove ugly /bin/sh wrapper around each perl-based test scriptJim Meyering
* tests/check.mk (TESTS_ENVIRONMENT): Save and restore TMPDIR around envvar-check, so that the few scripts that require $TMPDIR don't fail. This is also good to let a user's default TMPDIR setting be used e.g., in the search for an 'other-partition'. FIXME: this is pretty ugly. maybe undo it and find a better way. (TESTS_ENVIRONMENT): Invoke perl scripts with $(PERL), and use -T if the script requires that. Otherwise, use $(SHELL). * tests/misc/md5sum-newline: Create a file whose name contains a newline in Perl (resort to using "system", since open refuses). Fix old brokenness exposed by this change: * tests/du/files0-from: Correct test not to rely on stdin being attached to a non-tty. * tests/misc/sort (3g, 3h, 3i): Likewise: add explicit empty input file. Avoid warnings about using qw()-around-commas. * tests/rm/fail-eperm: Now that this test is run from a temporary subdirectory, adjust the full name of the "rm" program we're going to run. Change #!/bin/sh to #!/usr/bin/perl, and factor out the few lines of boilerplate code to invoke perl. Do not "require 5.00x"; a configure-time Perl test handles that * tests/dd/skip-seek: * tests/misc/base64: * tests/misc/basename: * tests/misc/cut: * tests/misc/date: * tests/misc/dircolors: * tests/misc/dirname: * tests/misc/expand: * tests/misc/expr: * tests/misc/factor: * tests/misc/fmt: * tests/misc/fold: * tests/misc/head: * tests/misc/head-elide-tail: * tests/misc/join: * tests/misc/ls-misc: * tests/misc/md5sum: * tests/misc/md5sum-newline: * tests/misc/mktemp: * tests/misc/od: * tests/misc/paste: * tests/misc/pr: * tests/misc/printf-cov: * tests/misc/seq: * tests/misc/sha1sum: * tests/misc/sha1sum-vec: * tests/misc/sha224sum: * tests/misc/sha256sum: * tests/misc/sha384sum: * tests/misc/sha512sum: * tests/misc/sort-merge: * tests/misc/stat-printf: * tests/misc/sum: * tests/misc/tac: * tests/misc/tail: * tests/misc/test: * tests/misc/test-diag: * tests/misc/tr: * tests/misc/tsort: * tests/misc/tty-eof: * tests/misc/unexpand: * tests/misc/uniq: * tests/misc/wc: * tests/misc/wc-files0-from: * tests/misc/xstrtol: * tests/mv/i-1: * tests/pr/pr-tests: * tests/rm/empty-name: * tests/rm/fail-eperm: * tests/rm/unreadable:
2008-05-06tests: hoist the sourcing of "lang-default"Jim Meyering
* tests/check.mk (TESTS_ENVIRONMENT): Source lang-default here, ... ... rather than in each of 100+ test scripts. * tests/chgrp/basic: * tests/chgrp/no-x: * tests/chmod/c-option: * tests/chmod/no-x: * tests/chmod/setgid: * tests/chmod/thru-dangling: * tests/chmod/umask-x: * tests/chmod/usage: * tests/chown/basic: * tests/chown/deref: * tests/chown/preserve-root: * tests/cp/abuse: * tests/cp/acl: * tests/cp/backup-is-src: * tests/cp/cp-a-selinux: * tests/cp/cp-i: * tests/cp/cp-mv-backup: * tests/cp/deref-slink: * tests/cp/fail-perm: * tests/cp/into-self: * tests/cp/link-preserve: * tests/cp/preserve-gid: * tests/cp/same-file: * tests/cp/slink-2-slink: * tests/cp/special-f: * tests/cp/symlink-slash: * tests/cp/thru-dangling: * tests/du/basic: * tests/du/hard-link: * tests/du/inacc-dest: * tests/du/long-sloop: * tests/du/no-x: * tests/install/basic-1: * tests/ln/hard-backup: * tests/ln/sf-1: * tests/ls/file-type: * tests/ls/infloop: * tests/ls/nameless-uid: * tests/ls/rt-1: * tests/ls/stat-failed: * tests/ls/symlink-slash: * tests/ls/x-option: * tests/misc/chcon: * tests/misc/chcon-fail: * tests/misc/csplit: * tests/misc/df-P: * tests/misc/groups-dash: * tests/misc/groups-version: * tests/misc/nohup: * tests/misc/printf-surprise: * tests/misc/runcon-no-reorder: * tests/misc/selinux: * tests/misc/split-a: * tests/misc/split-fail: * tests/misc/tac-continue: * tests/misc/wc-files0: * tests/mkdir/p-v: * tests/mkdir/selinux: * tests/mv/acl: * tests/mv/backup-dir: * tests/mv/backup-is-src: * tests/mv/childproof: * tests/mv/diag: * tests/mv/dir2dir: * tests/mv/dup-source: * tests/mv/force: * tests/mv/hard-link-1: * tests/mv/hard-verbose: * tests/mv/i-2: * tests/mv/i-3: * tests/mv/i-4: * tests/mv/i-5: * tests/mv/i-link-no: * tests/mv/into-self: * tests/mv/into-self-2: * tests/mv/into-self-3: * tests/mv/mv-special-1: * tests/mv/part-fail: * tests/mv/part-symlink: * tests/mv/partition-perm: * tests/mv/perm-1: * tests/mv/reply-no: * tests/mv/sticky-to-xpart: * tests/mv/update: * tests/rm/cycle: * tests/rm/dir-no-w: * tests/rm/dir-nonrecur: * tests/rm/fail-2eperm: * tests/rm/fail-eacces: * tests/rm/inaccessible: * tests/rm/interactive-always: * tests/rm/interactive-once: * tests/rm/isatty: * tests/rm/one-file-system: * tests/rm/r-1: * tests/rm/r-2: * tests/rm/rm1: * tests/rm/rm2: * tests/rm/rm3: * tests/rm/rm4: * tests/rm/rm5: * tests/rm/unread2: * tests/rm/v-slash: * tests/touch/fail-diag: * tests/touch/not-owner:
2008-05-06fix typo in comments: s/ouput/output/Jim Meyering
adjust spelling in that same comment: s/localisation/localization/
2008-04-27tests: move another file (expensive) into test-lib.shJim Meyering
* tests/expensive: Remove file. Move contents into ... * tests/test-lib.sh (expensive_): ...here. New function. * tests/du/fd-leak: Update caller to use the new function. * tests/mv/leak-fd: Likewise. * tests/rm/hash: Likewise. * tests/tail-2/big-4gb: Likewise. * tests/Makefile.am (EXTRA_DIST): Remove its name.
2008-04-21tests: skip (don't fail) rm/one-file-system when mount --bind failsJim Meyering
* tests/rm/one-file-system: Reported by Allen Hewes.
2008-04-21tests: adjust perl -I to use $top_srcdir/tests, not $srcdir/..Jim Meyering
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-31"rm -r DIR" would mistakenly prompt about very long namesJim Meyering
* src/remove.c (write_protected_non_symlink): Return 0(-1) when euidaccess_stat pronounces a writable(not-writable) file, not -1(0). * tests/rm/deep-2: New file. Test for the above-fixed bug. * tests/rm/Makefile.am (TESTS): Add deep-2. Discovered while reviewing this change: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13071
2008-02-25Fix test failure where rm would appear to succeed incorrectly.Bob Proulx
* tests/rm/fail-eperm: Ignore files that were opportunistically chosen to test permission failures but disappear before we can finish the test.
2008-02-11* tests/rm/inaccessible: Source test-lib.sh *before* using skip_test_.Jim Meyering
Reported by Peter Fales. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-09tests: rm/fail-eperm: require-non-root in perl, not shJim Meyering
Since it creates no temporaries and since it requires non-root, do the require-non-root bit in perl, rather than using test-lib.sh.
2008-02-09tests: Remove priv-check. Use new require_root_ function instead.Jim Meyering
* tests/priv-check: Remove file. * tests/Makefile.am (EXTRA_DIST): Remove priv-check. * tests/test-lib.sh (require_root_): New function. Use this function rather than sourcing the priv-check file. * tests/sample-test: Use require_root_ rather than priv-check. * tests/chown/basic: Likewise. * tests/cp/cp-a-selinux: Likewise. * tests/cp/preserve-gid: Likewise. * tests/cp/special-bits: Likewise. * tests/ls/nameless-uid: Likewise. * tests/misc/chcon: Likewise. * tests/mkdir/writable-under-readonly: Likewise. * tests/mv/sticky-to-xpart: Likewise. * tests/rm/fail-2eperm: Likewise. * tests/rm/no-give-up: Likewise. * tests/rm/one-file-system: Likewise. * tests/tail-2/append-only: Likewise. * tests/touch/now-owned-by-other: Likewise. * tests/rm/fail-eperm: Use skip_if_root_ rather than priv-check. * Makefile.maint (sc_root_tests): Reflect this change: search for the new function name.
2008-02-09tests: factor out the perl-requiring code in many test scriptsJim Meyering
* tests/require-perl: New file. * tests/Makefile.am (EXTRA_DIST): Add require-perl. * tests/dd/skip-seek: Use it, and remove manual tests. * tests/du/files0-from: Likewise. * tests/ls/nameless-uid: Likewise. * tests/misc/base64: Likewise. * tests/misc/basename: Likewise. * tests/misc/cut: Likewise. * tests/misc/date: Likewise. * tests/misc/dircolors: Likewise. * tests/misc/dirname: Likewise. * tests/misc/expand: Likewise. * tests/misc/expr: Likewise. * tests/misc/factor: Likewise. * tests/misc/fmt: Likewise. * tests/misc/fold: Likewise. * tests/misc/head-elide-tail: Likewise. * tests/misc/ls-misc: Likewise. * tests/misc/md5sum: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/mktemp: Likewise. * tests/misc/od: Likewise. * tests/misc/paste-no-nl: Likewise. * tests/misc/pr: Likewise. * tests/misc/pwd-long: Likewise. * tests/misc/seq: Likewise. * tests/misc/sha1sum: Likewise. * tests/misc/sha1sum-vec: Likewise. * tests/misc/sha224sum: Likewise. * tests/misc/sha256sum: Likewise. * tests/misc/sha384sum: Likewise. * tests/misc/sha512sum: Likewise. * tests/misc/sort-merge: Likewise. * tests/misc/stat-printf: Likewise. * tests/misc/sum: Likewise. * tests/misc/sum-sysv: Likewise. * tests/misc/test-diag: Likewise. * tests/misc/tsort: Likewise. * tests/misc/tty-eof: Likewise. * tests/misc/unexpand: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * tests/mv/i-1: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/fail-eperm: Likewise. * tests/rm/unreadable: Likewise. (EXTRA_DIST): *do* require require-perl as a stand-alone, 'source'able script.
2008-02-09tests: call skip_test_ in place of echo+exit 77Jim Meyering
* tests/mv/no-target-dir: Likewise. * tests/other-fs-tmpdir: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/fail-eperm: Likewise. * tests/rm/inaccessible: Likewise. * tests/rm/isatty: Likewise. * tests/rm/unreadable: Likewise. * tests/setgid-check: Likewise. * tests/sparse-file: Likewise. * tests/strace: Likewise. * tests/tail-2/append-only: Likewise. * tests/tail-2/big-4gb: Likewise. * tests/tail-2/tail-n0f: Likewise. * tests/touch/dangling-symlink: Likewise. * tests/touch/fifo: Likewise. * tests/touch/not-owner: Likewise. * tests/mv/i-3: Likewise. * tests/umask-check: Likewise. * tests/mv/acl: Likewise. * tests/cp/acl: Likewise. * tests/chgrp/deref: Likewise. * tests/chmod/setgid: Likewise. * tests/cp/existing-perm-race: Likewise. * tests/cp/file-perm-race: Likewise. * tests/cp/parent-perm-race: Likewise. * tests/du/2g: Likewise. * tests/du/8gb: Likewise. * tests/du/long-from-unreadable: Likewise. * tests/du/long-sloop: Likewise. * tests/du/slink: Likewise. * tests/ls/nameless-uid: Likewise. * tests/ls/stat-dtype: Likewise. * tests/misc/cat-proc: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/nice: Likewise. * tests/misc/od-x8: Likewise. * tests/misc/pwd-unreadable-parent: Likewise. * tests/misc/selinux: Likewise. * tests/misc/stty-row-col: Likewise. * tests/misc/tac-continue: Likewise. * tests/misc/arch: Likewise, and source $srcdir/../test-lib.sh *before* the use of skip_test_.
2007-11-16Port to Solaris 8 perl, which does not support "use warnings;".Paul Eggert
* tests/dd/skip-seek: Skip test if "use warnings;" fails. * tests/du/files0-from: Likewise. * tests/misc/base64: Likewise. * tests/misc/basename: Likewise. * tests/misc/cut: Likewise. * tests/misc/date: Likewise. * tests/misc/dircolors: Likewise. * tests/misc/dirname: Likewise. * tests/misc/expand: Likewise. * tests/misc/expr: Likewise. * tests/misc/factor: Likewise. * tests/misc/fmt: Likewise. * tests/misc/fold: Likewise. * tests/misc/head-elide-tail: Likewise. * tests/misc/ls-misc: Likewise. * tests/misc/md5sum: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/mktemp: Likewise. * tests/misc/od: Likewise. * tests/misc/paste-no-nl: Likewise. * tests/misc/pr: Likewise. * tests/misc/seq: Likewise. * tests/misc/sha1sum: Likewise. * tests/misc/sha1sum-vec: Likewise. * tests/misc/sha224sum: Likewise. * tests/misc/sha256sum: Likewise. * tests/misc/sha384sum: Likewise. * tests/misc/sha512sum: Likewise. * tests/misc/sort-merge: Likewise. * tests/misc/stat-printf: Likewise. * tests/misc/sum: Likewise. * tests/misc/test-diag: Likewise. * tests/misc/tsort: Likewise. * tests/misc/unexpand: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * tests/mv/i-1: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/unreadable: Likewise.
2007-10-24Don't fail part 2 of tests/rm/unreadable when run as root.Jim Meyering
* tests/rm/unreadable: With UID == 0, expect different results. Reported by Mike Frysinger.
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-05Add PACKAGE_VERSION to TESTS_ENVIRONMENT via check.mk.Jim Meyering
* tests/check.mk (TESTS_ENVIRONMENT): Add PACKAGE_VERSION here, rather than in every Makefile.am that needs it. * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Remove PACKAGE_VERSION. * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
2007-09-22rm: give a sensible diagnostic when failing to remove a symlinkJim Meyering
On some systems (those with openat et al), when rm would fail to remove a symlink, it would fail with the misleading diagnostic, "Too many levels of symbolic links". * NEWS: Mention the bug fix. * src/remove.c (is_nondir_lstat): New function. (remove_entry): Use it to catch failed-to-remove symlink (and any other non-dir) here so that we don't fall through and try to treat it as directory, which -- with a symlink -- would provoke the bogus ELOOP failure. * tests/rm/fail-eacces: Add a test for the above. * src/c99-to-c89.diff: Adjust offsets.
2007-09-16* tests/rm/v-slash: Avoid test failure with non-C locale.Jim Meyering
Reported by Michael Stone.
2007-09-15Enable some previously omitted test scripts. Add a test cross-check.Jim Meyering
* tests/rm/Makefile.am (TESTS): Add empty-name and unreadable. * tests/rm/empty-name: Likewise. * tests/rm/unreadable: Reenable this test. Adjust for new rm. * tests/mkdir/Makefile.am: Add writable-under-readonly. * tests/mkdir/writable-under-readonly: Add some comments. This test is always skipped, for now. * tests/Makefile.am (ta): Hook up the new root-only script. * tests/tail-2/infloop-1: Make this test pass. * tests/tail-2/Makefile.am (TESTS): Add infloop-1. * tests/tail-2/fflush: Remove unused file. * tests/check.mk (vc_executable_is_in_TESTS): More portable. * tests/check.mk (check): Depend on the above. * build-aux/check.mk: Remove comment mentioning AUTHORS file.
2007-09-15Factor out definitions in TESTS_ENVIRONMENT of srcdir, top_srcdir, etc.Jim Meyering
tests/check.mk (top_srcdir): Define. tests/*/Makefile.am: Remove definitions of $(srcdir), $(top_srcdir), $(abs_top_srcdir), and $(abs_top_builddir), since they're defined via the included tests/check.mk.
2007-09-15More misc, test-related changes. (some to allow running tests as root)Jim Meyering
2007-08-25Remove all .cvsignore files from version control.Jim Meyering
2007-08-22Change "rm --verbose -r a//" not to print extra slashes in a///bJim Meyering
* src/remove.c (push_dir): Don't copy trailing slashes onto the stack. Reported by François Pinard. * tests/rm/v-slash: New file. Test for the above change. * tests/rm/Makefile.am (TESTS): Add v-slash.
2007-08-18Run each Coreutils.pm-based test in its own subdirectory.Jim Meyering
* tests/CuTmpdir.pm: New file. * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm. * tests/misc/od, tests/misc/base64, tests/misc/basename: * tests/misc/cut, tests/misc/date, tests/misc/dirname: * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail: * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum: * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum: * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag: * tests/misc/wc-files0-from, tests/misc/xstrtol: * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from: * tests/expr/basic, tests/factor/basic, tests/fmt/basic: * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1: * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec: * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1: * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it. * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test", not "../../src/test", so it works when run from a subdirectory. * tests/ls-2/tests: Create temp files and dirs from within the perl script, so that they're removed, when run from a subdirectory.
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-05-04Avoid failure of root-only test when run with a restrictive umask.Jim Meyering
* tests/rm/no-give-up: Ensure that non-root can access "d/" through root-owned ".". Reported by AIDA Shinra.
2007-05-03Avoid test failure when run with a permissive umask.Jim Meyering
* tests/rm/no-give-up: Set permissions of test directory properly, i.e., not depending on umask prohibiting go=w. Reported by AIDA Shinra.
2007-05-02Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.Jim Meyering
* tests/rm/fail-2eperm: Patch from AIDA Shinra. Reported by Peter Dyballa. * THANKS: Add AIDA Shinra and Peter Dyballa.
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: