src/Makefile
tests/Makefile
gnulib-tests/Makefile
- tests/chgrp/Makefile
- tests/chmod/Makefile
- tests/chown/Makefile
- tests/cp/Makefile
tests/cut/Makefile
- tests/dd/Makefile
- tests/du/Makefile
tests/head/Makefile
- tests/install/Makefile
tests/join/Makefile
- tests/ln/Makefile
- tests/ls/Makefile
- tests/misc/Makefile
- tests/mkdir/Makefile
- tests/mv/Makefile
tests/pr/Makefile
- tests/readlink/Makefile
- tests/rm/Makefile
- tests/rmdir/Makefile
tests/sort/Makefile
tests/tac/Makefile
- tests/tail-2/Makefile
tests/tail/Makefile
tests/test/Makefile
- tests/touch/Makefile
tests/tr/Makefile
tests/uniq/Makefile
tests/wc/Makefile
mk-script \
other-fs-tmpdir \
require-perl \
- rwx-to-mode \
sample-test \
setgid-check \
sparse-file \
test-lib.sh \
umask-check
-# Regarding ordering in SUBDIRS, place early in the list the tools that
-# are most commonly used in test scripts. Every test script uses rm
-# and chmod, so they have to be very early.
-# Ordering within misc/ should handle the rest.
-
## N O T E :: Please do not add new tests/ directories.
## There are too many already. Put new tests in misc/.
-SUBDIRS = \
- rm \
- chmod \
- misc \
- chgrp chown cp cut dd du head \
- install join ln ls mkdir mv pr readlink rmdir \
- sort tac tail tail-2 test touch tr \
- uniq wc
+SUBDIRS = cut head join pr sort tac tail test tr uniq wc
## N O T E :: Please do not add new directories.
all_t = t1 t2 t3 t4 t5 t6 t7 t8 t9 ta tb tc td
check-root: $(all_t)
t1:
- cd chown && $(MAKE) check TESTS=basic
+ $(MAKE) check TESTS=chown/basic
t2:
- cd cp && $(MAKE) check TESTS=special-bits
+ $(MAKE) check TESTS=cp/special-bits
t3:
- cd rm && $(MAKE) check TESTS=no-give-up
+ $(MAKE) check TESTS=rm/no-give-up
t4:
- cd rm && $(MAKE) check TESTS=fail-2eperm
+ $(MAKE) check TESTS=rm/fail-2eperm
t5:
- cd tail-2 && $(MAKE) check TESTS=append-only
+ $(MAKE) check TESTS=tail-2/append-only
t6:
- cd rm && $(MAKE) check TESTS=one-file-system
+ $(MAKE) check TESTS=rm/one-file-system
t7:
- cd ls && $(MAKE) check TESTS=nameless-uid
+ $(MAKE) check TESTS=ls/nameless-uid
t8:
- cd misc && $(MAKE) check TESTS=chcon
+ $(MAKE) check TESTS=misc/chcon
t9:
- cd cp && $(MAKE) check TESTS=cp-a-selinux
+ $(MAKE) check TESTS=cp/cp-a-selinux
ta:
- cd mkdir && $(MAKE) check TESTS=writable-under-readonly
+ $(MAKE) check TESTS=mkdir/writable-under-readonly
tb:
- cd mv && $(MAKE) check TESTS=sticky-to-xpart
+ $(MAKE) check TESTS=mv/sticky-to-xpart
tc:
- cd cp && $(MAKE) check TESTS=preserve-gid
+ $(MAKE) check TESTS=cp/preserve-gid
td:
- cd touch && $(MAKE) check TESTS=now-owned-by-other
+ $(MAKE) check TESTS=touch/now-owned-by-other
check-recursive: root-hint
@echo "NOTICE: Some tests may be run only as root."
@echo " Do \`make check-root' as \`root' to run these tests."
@echo '***********************************************************'
+
+EXTRA_DIST += $(TESTS)
+
+# Do not choose a name that is a shell keyword like 'if', or a
+# commonly-used utility like 'cat' or 'test', as the name of a test.
+# Otherwise, VPATH builds will fail on hosts like Solaris, since they
+# will expand 'if test ...' to 'if .../test ...', and the '.../test'
+# will execute the test script rather than the standard utility.
+
+# Regarding ordering in SUBDIRS, place early in the list the tools that
+# are most commonly used in test scripts. Every test script uses rm
+# and chmod, so they have to be very early.
+# Ordering within misc/ should handle the rest.
+
+# Ordering:
+# help-version comes early because it's a basic sanity test.
+# Put seq early, since lots of other tests use it.
+# Put head-elide-tail early, because it's long-running.
+
+TESTS = \
+ misc/help-version \
+ chgrp/basic \
+ rm/cycle \
+ rm/dangling-symlink \
+ rm/deep-1 \
+ rm/deep-2 \
+ rm/dir-no-w \
+ rm/dir-nonrecur \
+ rm/dot-rel \
+ rm/empty-inacc \
+ rm/empty-name \
+ rm/f-1 \
+ rm/fail-2eperm \
+ rm/fail-eacces \
+ rm/fail-eperm \
+ rm/hash \
+ rm/i-1 \
+ rm/i-never \
+ rm/i-no-r \
+ rm/ignorable \
+ rm/inaccessible \
+ rm/interactive-always \
+ rm/interactive-once \
+ rm/ir-1 \
+ rm/isatty \
+ rm/no-give-up \
+ rm/one-file-system \
+ rm/r-1 \
+ rm/r-2 \
+ rm/r-3 \
+ rm/r-4 \
+ rm/readdir-bug \
+ rm/rm1 \
+ rm/rm2 \
+ rm/rm3 \
+ rm/rm4 \
+ rm/rm5 \
+ rm/sunos-1 \
+ rm/unread2 \
+ rm/unread3 \
+ rm/unreadable \
+ rm/v-slash \
+ chgrp/default-no-deref \
+ chgrp/deref \
+ chgrp/no-x \
+ chgrp/posix-H \
+ chgrp/recurse \
+ misc/seq \
+ misc/head-elide-tail \
+ misc/ls-time \
+ misc/ls-misc \
+ misc/date \
+ misc/ptx-overrun \
+ misc/xstrtol \
+ misc/od \
+ misc/mktemp \
+ misc/arch \
+ misc/pr \
+ misc/df-P \
+ misc/pwd-unreadable-parent \
+ misc/chcon \
+ misc/chcon-fail \
+ misc/selinux \
+ misc/cut \
+ misc/wc-files0-from \
+ misc/wc-files0 \
+ misc/cat-proc \
+ misc/base64 \
+ misc/basename \
+ misc/close-stdout \
+ misc/csplit \
+ misc/date-sec \
+ misc/dircolors \
+ misc/df \
+ misc/dirname \
+ misc/expand \
+ misc/expr \
+ misc/factor \
+ misc/false-status \
+ misc/fmt \
+ misc/fmt-long-line \
+ misc/fold \
+ misc/groups-dash \
+ misc/groups-version \
+ misc/head-c \
+ misc/head-pos \
+ misc/md5sum \
+ misc/md5sum-newline \
+ misc/mknod \
+ misc/nice \
+ misc/nl \
+ misc/nohup \
+ misc/od-N \
+ misc/od-x8 \
+ misc/paste \
+ misc/pathchk1 \
+ misc/printf \
+ misc/printf-hex \
+ misc/printf-surprise \
+ misc/pwd-long \
+ misc/readlink-fp-loop \
+ misc/runcon-no-reorder \
+ misc/sha1sum \
+ misc/sha1sum-vec \
+ misc/sha224sum \
+ misc/sha256sum \
+ misc/sha384sum \
+ misc/sha512sum \
+ misc/shred-exact \
+ misc/shred-remove \
+ misc/shuf \
+ misc/sort-compress \
+ misc/sort-merge \
+ misc/sort-rand \
+ misc/split-a \
+ misc/split-fail \
+ misc/split-l \
+ misc/stat-fmt \
+ misc/stat-printf \
+ misc/stty \
+ misc/stty-invalid \
+ misc/stty-row-col \
+ misc/sum \
+ misc/sum-sysv \
+ misc/tac-continue \
+ misc/tee \
+ misc/tee-dash \
+ misc/test-diag \
+ misc/tsort \
+ misc/tty-eof \
+ misc/unexpand \
+ chmod/c-option \
+ chmod/equal-x \
+ chmod/equals \
+ chmod/inaccessible \
+ chmod/no-x \
+ chmod/octal \
+ chmod/setgid \
+ chmod/thru-dangling \
+ chmod/umask-x \
+ chmod/usage \
+ chown/basic \
+ chown/deref \
+ chown/preserve-root \
+ chown/separator \
+ cp/abuse \
+ cp/acl \
+ cp/backup-1 \
+ cp/backup-dir \
+ cp/backup-is-src \
+ cp/cp-HL \
+ cp/cp-a-selinux \
+ cp/cp-deref \
+ cp/cp-i \
+ cp/cp-mv-backup \
+ cp/cp-parents \
+ cp/deref-slink \
+ cp/dir-rm-dest \
+ cp/dir-slash \
+ cp/dir-vs-file \
+ cp/existing-perm-race \
+ cp/fail-perm \
+ cp/file-perm-race \
+ cp/into-self \
+ cp/link \
+ cp/link-no-deref \
+ cp/link-preserve \
+ cp/no-deref-link1 \
+ cp/no-deref-link2 \
+ cp/no-deref-link3 \
+ cp/parent-perm \
+ cp/parent-perm-race \
+ cp/perm \
+ cp/preserve-2 \
+ cp/preserve-gid \
+ cp/proc-zero-len \
+ cp/r-vs-symlink \
+ cp/same-file \
+ cp/slink-2-slink \
+ cp/sparse \
+ cp/special-bits \
+ cp/special-f \
+ cp/src-base-dot \
+ cp/symlink-slash \
+ cp/thru-dangling \
+ dd/misc \
+ dd/not-rewound \
+ dd/skip-seek \
+ dd/skip-seek2 \
+ dd/unblock-sync \
+ du/2g \
+ du/8gb \
+ du/basic \
+ du/deref \
+ du/deref-args \
+ du/exclude \
+ du/fd-leak \
+ du/files0-from \
+ du/hard-link \
+ du/inacc-dest \
+ du/inacc-dir \
+ du/inaccessible-cwd \
+ du/long-from-unreadable \
+ du/long-sloop \
+ du/no-deref \
+ du/no-x \
+ du/one-file-system \
+ du/restore-wd \
+ du/slash \
+ du/slink \
+ du/trailing-slash \
+ du/two-args \
+ install/basic-1 \
+ install/create-leading \
+ install/d-slashdot \
+ install/trap \
+ ln/backup-1 \
+ ln/hard-backup \
+ ln/misc \
+ ln/sf-1 \
+ ln/target-1 \
+ ls/color-dtype-dir \
+ ls/dangle \
+ ls/dired \
+ ls/file-type \
+ ls/follow-slink \
+ ls/infloop \
+ ls/inode \
+ ls/m-option \
+ ls/nameless-uid \
+ ls/no-arg \
+ ls/proc-selinux-segfault \
+ ls/recursive \
+ ls/rt-1 \
+ ls/stat-dtype \
+ ls/stat-failed \
+ ls/stat-free-symlinks \
+ ls/stat-vs-dirent \
+ ls/symlink-slash \
+ ls/x-option \
+ mkdir/p-1 \
+ mkdir/p-2 \
+ mkdir/p-3 \
+ mkdir/p-slashdot \
+ mkdir/p-thru-slink \
+ mkdir/p-v \
+ mkdir/parents \
+ mkdir/perm \
+ mkdir/selinux \
+ mkdir/special-1 \
+ mkdir/t-slash \
+ mkdir/writable-under-readonly \
+ mv/acl \
+ mv/atomic \
+ mv/atomic2 \
+ mv/backup-dir \
+ mv/backup-is-src \
+ mv/childproof \
+ mv/diag \
+ mv/dir-file \
+ mv/dir2dir \
+ mv/dup-source \
+ mv/force \
+ mv/hard-2 \
+ mv/hard-3 \
+ mv/hard-4 \
+ mv/hard-link-1 \
+ mv/hard-verbose \
+ mv/i-1 \
+ mv/i-2 \
+ mv/i-3 \
+ mv/i-4 \
+ mv/i-5 \
+ mv/i-link-no \
+ mv/into-self \
+ mv/into-self-2 \
+ mv/into-self-3 \
+ mv/into-self-4 \
+ mv/leak-fd \
+ mv/mv-special-1 \
+ mv/no-target-dir \
+ mv/part-fail \
+ mv/part-hardlink \
+ mv/part-rename \
+ mv/part-symlink \
+ mv/partition-perm \
+ mv/perm-1 \
+ mv/reply-no \
+ mv/sticky-to-xpart \
+ mv/to-symlink \
+ mv/trailing-slash \
+ mv/update \
+ readlink/can-e \
+ readlink/can-f \
+ readlink/can-m \
+ readlink/rl-1 \
+ rmdir/fail-perm \
+ rmdir/ignore \
+ rmdir/t-slash \
+ tail-2/append-only \
+ tail-2/assert \
+ tail-2/assert-2 \
+ tail-2/big-4gb \
+ tail-2/infloop-1 \
+ tail-2/proc-ksyms \
+ tail-2/start-middle \
+ tail-2/tail-n0f \
+ touch/dangling-symlink \
+ touch/dir-1 \
+ touch/empty-file \
+ touch/fail-diag \
+ touch/fifo \
+ touch/no-create-missing \
+ touch/no-rights \
+ touch/not-owner \
+ touch/now-owned-by-other \
+ touch/obsolescent \
+ touch/read-only \
+ touch/relative
+
+include $(top_srcdir)/tests/check.mk
vc_exe_in_TESTS: Makefile
@rm -f t1 t2
@if test -d $(top_srcdir)/.git && test $(srcdir) = .; then \
- sed -n '/^$(_v) = \\$$/,/[^\]$$/p' $(srcdir)/Makefile.am \
+ sed -n '/^$(_v) =[ ]*\\$$/,/[^\]$$/p' \
+ $(srcdir)/Makefile.am \
| sed 's/^ *//;/^\$$.*/d;/^$(_v) =/d' \
| tr -s '\012\\' ' ' | fmt -1 | sort -u > t1 && \
for f in `cd $(top_srcdir) && build-aux/vc-list-files $(subdir)`; do \
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- default-no-deref \
- basic \
- deref \
- no-x \
- posix-H \
- recurse
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
#!/bin/sh
# make sure chgrp is reasonable
-# Copyright (C) 2000-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chgrp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Ensure that chgrp -R does not dereference symlinks.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g2=$2
#!/bin/sh
# see if chgrp can change the group of a symlink
-# Copyright (C) 2000, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
# Make sure chgrp gives the right diagnostic for a readable,
# but inaccessible directory.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chgrp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
set _ $groups; shift
#!/bin/sh
# Test POSIX-mandated -H option.
-# Copyright (C) 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
#!/bin/sh
# ad-hoc tests of chgrp with -R and -H or -L and symlinks
-# Copyright (C) 2000, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- thru-dangling \
- inaccessible \
- c-option \
- equal-x \
- equals \
- no-x \
- octal \
- setgid \
- umask-x \
- usage
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
#!/bin/sh
# Verify that chmod's --changes (-c) option works.
-# Copyright (C) 2000, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
umask 0
file=f
#!/bin/sh
# Test "chmod =x" and the like.
-# Copyright (C) 1999, 2000, 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
file=f
touch $file || framework_failure
# Before fileutils-4.1.2, some of them didn't.
# Also, before coreutils-5.3.1, =[ugo] sometimes didn't work.
-# Copyright (C) 2001, 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
#!/bin/sh
# Test for the bug fixed on 2006-09-20.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p d/e || framework_failure
chmod 0 d/e d || framework_failure
# Make sure chmod gives the right diagnostic for a readable,
# but inaccessible directory.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p d/no-x/y a/b || framework_failure
#!/bin/sh
# ensure that chmod diagnoses a certain type of invalid mode string
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
umask 0
mkdir d || framework_failure
#!/bin/sh
# Test for proper error and exit code of chmod on a dangling symlink.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s non-existent dangle || framework_failure
#!/bin/sh
# Test that chmod -x file reports an error if the result is executable.
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
touch file
#!/bin/sh
# Verify that chmod works correctly with odd option combinations.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- preserve-root \
- basic \
- deref \
- separator
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
#!/bin/sh
# make sure chown --from=... works
-# Copyright (C) 2001, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chgrp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
touch f || framework_failure
# For coreutils-5.2.1 and earlier, chown --dereference would skip
# symlinks having owner/group matching the specified owner/group.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chown --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
ln -s no-such dangle || framework_failure
#!/bin/sh
# Verify that --preserve-root works.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chown --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir d && ln -s / d/slink-to-root
#!/bin/sh
# Make sure "chown USER:GROUP FILE" works, and similar tests with separators.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chown --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
id_u=`id -u` || framework_failure
test -n "$id_u" || framework_failure
+++ /dev/null
-# Make coreutils tests for cp. -*-Makefile-*-
-
-# Copyright (C) 1997-2001, 2003, 2005-2008 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-TESTS = \
- special-f \
- parent-perm \
- abuse \
- proc-zero-len \
- thru-dangling \
- cp-a-selinux \
- file-perm-race parent-perm-race \
- existing-perm-race \
- backup-dir \
- src-base-dot \
- sparse \
- link-no-deref \
- cp-deref \
- acl \
- preserve-2 r-vs-symlink link-preserve preserve-gid \
- backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \
- same-file cp-mv-backup symlink-slash slink-2-slink fail-perm dir-slash \
- perm cp-HL cp-i special-bits link dir-rm-dest cp-parents deref-slink \
- dir-vs-file into-self
-EXTRA_DIST = $(TESTS) trailing-slash
-
-include $(top_srcdir)/tests/check.mk
#!/bin/sh
# ensure that cp does not write through a just-copied symlink
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a b c || framework_failure
ln -s ../t a/1 || framework_failure
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure we get English translations.
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
if test "$VERBOSE" = yes; then
set -x
setfacl --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_acl_
# Skip this test if cp was built without ACL support:
#!/bin/sh
# Test cp backup.
-# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
suffix=.b
file=b1.$$
#!/bin/sh
# Ensure that cp -b doesn't back up directories.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir x y || framework_failure
#!/bin/sh
# Test cp backup to source file.
-# Copyright (C) 1998-2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo a > a || framework_failure
echo a-tilde > a~ || framework_failure
#!/bin/sh
# test cp's -H and -L options
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir src-dir dest-dir || framework_failure
echo f > f || framework_failure
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
require_selinux_
# cp -RL dir1 dir2' must handle the case in which each of dir1 and dir2
# contain a symlink pointing to some third directory.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir a b c d || framework_failure
ln -s ../c a || framework_failure
#!/bin/sh
# Test whether cp -i prompts in the right place.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p a b/a/c || framework_failure
touch a/c || framework_failure
#!/bin/sh
# Test basic --backup functionality for both cp and mv.
-# Copyright (C) 1999, 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fi
# Ensure that ls sorts the same way for everyone.
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
umask 022
# cp -R --parents dir-specified-with-trailing-slash/ other-dir
# would get a failed assertion.
-# Copyright (C) 2000, 2002, 2004, 2005, 2006-2007 Free Software
+# Copyright (C) 2000, 2002, 2004, 2005, 2006-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
mv --version
fi
-. $srcdir/../umask-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/umask-check
+. $top_srcdir/tests/test-lib.sh
# Run the setgid check from the just-created directory.
. "$abs_top_srcdir/tests/setgid-check"
# Demonstrate bug when using -d with an existing destination file
# that is a symlink.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch f slink-target || framework_failure
ln -s slink-target slink || framework_failure
#!/bin/sh
# verify that cp's --remove-destination option works with -R
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir d e || framework_failure
# Make sure that cp -R DIR1 DIR2 does the right thing
# when DIR1 is written with a trailing slash.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir1 dir2 || framework_failure
touch dir1/file || framework_failure
#!/bin/sh
# A directory may not replace an existing file.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
touch file || framework_failure
#!/bin/sh
# Make sure cp -p isn't too generous with existing file permissions.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
#!/bin/sh
-# Copyright (C) 2000, 2002-2007 Free Software
+# Copyright (C) 2000, 2002-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
chmod g-s . || framework_failure
#!/bin/sh
# Make sure cp -p isn't too generous with file permissions.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
umask 022
mkfifo fifo ||
#!/bin/sh
# Confirm that copying a directory into itself gets a proper diagnostic.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
# Make sure cp --link -f works when the target exists.
# This failed for 4.0z (due to a bug introduced in that test release).
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch src || framework_failure
touch dest || framework_failure
#!/bin/sh
# Ensure that cp --link --no-dereference works properly
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s no-such-file dangling-slink || framework_failure
# ensure that `cp -d' preserves hard-links between command line arguments
# ensure that --preserve=links works with -RH and -RL
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch a || framework_failure
ln a b || framework_failure
#!/bin/sh
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir a b
msg=bar
#!/bin/sh
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir b
msg=bar
#!/bin/sh
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
msg=bar
echo $msg > a
cp --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/test-lib.sh
. $abs_srcdir/../umask-check
#!/bin/sh
# Make sure cp -pR --parents isn't too generous with parent permissions.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
umask 002
mkdir mode ownership d || framework_failure
#!/bin/sh
# Make sure the permission-preserving code in copy.c (mv, cp, install) works.
-# Copyright (C) 2000, 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
very_expensive_
umask 037
#!/bin/sh
# ensure that cp's --preserve=X,Y option is parsed properly
-# Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
#!/bin/sh
# Verify that cp -p preserves GID when it is possible.
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "$srcdir/../lang-default"
-. "$srcdir/../test-lib.sh"
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
create() {
#!/bin/sh
# Ensure that cp copies contents of non-empty "regular" file with st_size==0
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch empty || framework_failure
#!/bin/sh
# cp -r should not create symlinks. Fixed in fileutils-4.1.5.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
echo abc > foo || framework_failure
ln -s foo slink || framework_failure
# Test some of cp's options and how cp handles situations in
# which a naive implementation might overwrite the source file.
-# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006-2007 Free Software
+# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# Unset CDPATH. Otherwise, output from the `cd dir' command
# can make this test fail.
# `test cp --update A B' where A and B are both symlinks that point
# to the same file
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch file || framework_failure
ln -s file a || framework_failure
#!/bin/sh
# Test cp --sparse=always
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../sparse-file
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/sparse-file
+. $top_srcdir/tests/test-lib.sh
# Create a sparse file.
# It has to be at least 128K in order to be sparse on some systems.
# make sure `cp -p' preserves special bits
# This works only when run as root.
-# Copyright (C) 2000-2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_root_
touch a b c || framework_failure
cp --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkfifo fifo ||
skip_test_ "fifos not supported"
#!/bin/sh
# Ensure that "mkdir x y; cd y; cp -ab ../x/. ." is a successful, silent, no-op.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir x y || framework_failure
# Make sure that cp -dR dereferences a symlink arg if its name is
# written with a trailing slash.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
ln -s dir symlink || framework_failure
#!/bin/sh
# Ensure that cp works as documented, when the destination is a dangling symlink
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s no-such dangle || framework_failure
echo hi > f || framework_failure
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-
-EXTRA_DIST = $(TESTS)
-
-TESTS = \
- misc not-rewound skip-seek skip-seek2 unblock-sync
-
-include $(top_srcdir)/tests/check.mk
dd --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
tmp_in=dd-in.$$
tmp_in2=dd-in2.$$
# Make sure dd does the right thing when the input file descriptor
# is not rewound.
-# Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
dd --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
SCRIPT_NAME=$0
export SCRIPT_NAME
# show how to skip an amount that is smaller than the nominal block size.
# There's a more realistic example in the documentation.
-# Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
dd --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Ensure that dd conv=unblock,sync works.
-# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
dd --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
printf 000100020003xx > in || framework_failure
# Before coreutils-5.93, on systems with a signed, 32-bit stat.st_blocks
# one of du's computations would overflow.
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Creating a 2GB file counts as `very expensive'.
very_expensive_
# Ensure that du does not rely on narrow types like size_t for
# file sizes or sums.
-# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../sparse-file
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/sparse-file
+. $top_srcdir/tests/test-lib.sh
dd bs=1 seek=8G of=big < /dev/null 2> /dev/null
if test $? != 0; then
+++ /dev/null
-# Make coreutils tests for "du". -*-Makefile-*-
-
-# Copyright (C) 2000, 2002-2007 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-TESTS = \
- 2g \
- inacc-dir \
- one-file-system \
- inacc-dest \
- long-from-unreadable \
- long-sloop \
- files0-from \
- inaccessible-cwd \
- deref-args \
- slash \
- fd-leak \
- hard-link 8gb basic restore-wd \
- exclude no-x no-deref trailing-slash deref two-args slink
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
#!/bin/sh
# Compare actual numbers from du, assuming block size matches mine.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fi
# DU_BLOCK_SIZE could cause problems
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/b d d/sub || framework_failure
# prior to coreutils-4.5.3, du -D didn't work in some cases
# Based on an example from Andreas Schwab and/or Michal Svec.
-# Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/sub || framework_failure
ln -s a/sub slink || framework_failure
# Ensure that --dereference-args (-D) gives reasonable names.
# This test would fail for coreutils-5.0.91.
-# Copyright (C) 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/a || framework_failure
ln -s dir slink || framework_failure
#!/bin/sh
# make sure du's --exclude option works
-# Copyright (C) 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/b/c a/x/y a/u/v || framework_failure
#!/bin/sh
# check for file descriptor leak
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Call this an expensive test. It's not that expensive, but command line
# limitations might induce failure on some losing systems.
-. $srcdir/../expensive
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/expensive
+. $top_srcdir/tests/test-lib.sh
# Create 1296 (36^2) files.
# Their names and separating spaces take up 3887 bytes.
# -*- perl -*-
# Exercise du's --files0-from option.
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
# Likewise for excluded directories.
# Ensure that hard links _are_ listed twice when using --count-links.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/sub
( cd dir && { echo non-empty > f1; ln f1 f2; echo non-empty > sub/F; } )
# Prior to coreutils-6.5, an inaccessible destination dir (chmod a-x)
# would cause du to exit prematurely on systems with native openat support.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir f && cd f && mkdir a b c d e && touch c/j && chmod a-x c \
#!/bin/sh
# Ensure that du counts the size of an inaccessible directory.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/sub || framework_failure
# Ensure that even when run from an inaccessible directory, du can still
# operate on accessible directories elsewhere.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
cwd=`pwd`
#!/bin/sh
# Show fts fails on old-fashioned systems.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
proc_file=/proc/self/fd
if test ! -d $proc_file; then
# Show that du fails with ELOOP (Too many levels of symbolic links)
# when it encounters that condition.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# Create lots of directories, each containing a single symlink
# pointing at the next directory in the list.
#!/bin/sh
# Ensure that by default, du doesn't dereference command-line symlinks.
-# Copyright (C) 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/a/b || framework_failure
ln -s dir slink || framework_failure
# Make sure du gives the right diagnostic for a readable,
# but inaccessible directory.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p d/no-x/y || framework_failure
# Test for a bug in fts's handling of FTS_XDEV, the flag behind
# du's --one-file-system (-x) option.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p b/c y/z || framework_failure
# due to a bug in glibc's ftw.c, in some cases, nftw w/FTW_CHDIR
# would not restore the working directory.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir a b || framework_failure
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_readable_root_
fail=0
#!/bin/sh
# Ensure that the size of a long-named-symlink is > 0.
-# Copyright (C) 2002-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Determine if `.' is on a local (would non-NFS be sufficient?) file system.
# On at least some NFS implementations, symlinks never take up space,
# Ensure that du works properly for an argument that refers to a
# symbolic link, and that is specified with a trailing slash.
-# Copyright (C) 2002-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/1/2 || framework_failure
ln -s dir slink || framework_failure
# Make sure `du d/1 d/2' works.
# That command failed with du from fileutils-4.0q.
-# Copyright (C) 2000, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Run this test from a sub-directory one level deeper than normal,
# so that the "du .." below doesn't traverse sibling directories
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- basic-1 \
- create-leading \
- d-slashdot \
- trap
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
#! /bin/sh
# Basic tests for "install".
-# Copyright (C) 1998, 2000-2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000-2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ginstall --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
dir=dir
ginstall --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Ensure that ginstall -d works with arguments specified with a trailing "/.".
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
install --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
# Ensure that `install -s' doesn't infloop when its parent
# process traps CHLD signal.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ginstall --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- hard-backup target-1 sf-1 misc backup-1
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
# Try to create a symlink with backup where the destination file exists
# and the backup file name is a hard link to the destination file.
-# Copyright (C) 1999, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ln --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch a b || framework_failure
#!/bin/sh
# Ensure that 'ln --backup F F' gives a proper diagnostic.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ln --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
#!/bin/sh
# Miscellaneous tests for "ln".
-# Copyright (C) 1998-2000, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2000, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ln --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
t=tln-symlink
d=tln-subdir
fi
# Make sure we get English translations.
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo foo > a || framework_failure
ln -s . b || framework_failure
#!/bin/sh
# Test "ln --target-dir" with one file.
-# Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ln --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir d || framework_failure
fail=0
+++ /dev/null
-# Make coreutils tests for "ls". -*-Makefile-*-
-
-# Copyright (C) 1997-2003, 2006-2008 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-TESTS = \
- proc-selinux-segfault \
- stat-free-symlinks \
- nameless-uid \
- color-dtype-dir \
- stat-failed \
- stat-dtype \
- inode dangle file-type recursive dired infloop \
- rt-1 symlink-slash follow-slink no-arg m-option \
- stat-vs-dirent x-option
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Don't let a different umask perturb the results.
umask 22
#!/bin/sh
# Make sure ls properly handles dangling symlinks vs. ls's -L, -H, options.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s no-such-file dangle || framework_failure
mkdir -p dir/sub || framework_failure
#!/bin/sh
# make sure --dired option works
-# Copyright (C) 2001-2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
#!/bin/sh
# contrast ls -F, ls -p, and ls --indicator-style=file-type
-# Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir sub
cd sub
#!/bin/sh
# make sure ls -L always follows symlinks
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Isolate output files from directory being listed
mkdir dir dir/sub dir1 || framework_failure
# show that the following no longer makes ls infloop
# mkdir loop; cd loop; ln -s ../loop sub; ls -RL
-# Copyright (C) 2001-2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir loop || framework_failure
ln -s ../loop loop/sub || framework_failure
#!/bin/sh
# Make sure that ls -i works properly on symlinks.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
ln -s f slink || framework_failure
#!/bin/sh
# exercise the -m option
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
seq 2000 > b || framework_failure
touch a || framework_failure
#!/bin/sh
# Ensure that ls -l works on files with nameless uid and/or gid
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fi
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
nameless_uid=`$PERL -e 'foreach my $i (1000..16*1024) { getpwuid $i or (print "$i\n"), exit }'`
#!/bin/sh
# make sure ls and `ls -R' do the right thing when invoked with no arguments.
-# Copyright (C) 2001, 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/subdir || framework_failure
touch dir/subdir/file2 || framework_failure
ls --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/test-lib.sh
f=/proc/sys
test -r $f || f=.
# 4.1.1 and 4.1.2 had a bug whereby some recursive listings
# didn't include a blank line between per-directory groups of files.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir x y a b c a/1 a/2 a/3 || framework_failure
touch f a/1/I a/1/II || framework_failure
#!/bin/sh
# Make sure name is used as secondary key when sorting on mtime or ctime.
-# Copyright (C) 1998, 2001-2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001-2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
if test "$VERBOSE" = yes; then
set -x
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
date=1998-01-15
# Also check for the dtype-related (and fs-type dependent) bug
# in coreutils-6.0 that made ls -CF columns misaligned.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Skip this test unless "." is on a file system with useful d_type info.
# FIXME: This uses "ls -p" to decide whether to test "ls" with other options,
# Verify that ls works properly when it fails to stat a file that is
# not mentioned on the command line.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir d || framework_failure
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_strace_ stat
touch x || framework_failure
#!/bin/sh
# Ensure that d_ino (from ls -di) and st_ino (from stat --format=%i) match.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
ln -s dir symlink || framework_failure
#!/bin/sh
# Exercise the -x option.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir subdir || framework_failure
touch subdir/b || framework_failure
#!/bin/sh
# Ensure that arch output is equal to uname -m
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# skip this test if arch isn't being built.
case " $built_programs " in
# -*- perl -*-
# Exercise base64.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# -*-perl-*-
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
# Ensure that cat -E produces same output as cat, module `$'s,
# even when applied to a file in /proc.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cat --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
f=/proc/cpuinfo
chcon --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
require_selinux_
chcon --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
# Ensure that several programs work fine, even with stdout initially closed.
# This is effectively a test of closeout.c's close_stdout function.
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
p="$abs_top_builddir"
#!/bin/sh
# various csplit tests
-# Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
csplit --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Test "cut". -*- perl -*-
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Test "date".
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
# `date --date="21:04 +0100" +%S' always prints `00'.
# Before coreutils-5.2.1, it would print the seconds from the current time.
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
date --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Ensure that "df ." outputs a header.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
df --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
case `df .` in
*'
#!/bin/sh
# Ensure that df -P is not affected by BLOCK_SIZE settings
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
df --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Simple dircolors tests.
-# Copyright (C) 1998, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
# -*-perl-*-
# Test "dirname".
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
# -*- perl -*-
# Exercise expand.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
# -*-perl-*-
# Basic tests for "expr".
-# Copyright (C) 2001, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
# -*-perl-*-
# Basic tests for "factor".
-# Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2007 Free Software
+# Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2007-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
#!/bin/sh
# ensure that false exits nonzero even with --help or --version
-# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
false --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
false --version > /dev/null && fail=1
# -*- perl -*-
# Basic tests for "fmt".
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2005-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# Export this to avoid hassles when run in a UTF-8 locale,
# since we use 8-bit characters below, and those values are
#!/bin/sh
# make sure fmt -s works even on long lines
-# Copyright (C) 2002, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fmt --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
(echo ' '; yes) | head -n1000 | tr '\n' ' ' > in || framework_failure
# -*- perl -*-
# Exercise fold.
-# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# Ensure that we don't run an older version of fold.
# Prior to 5.0.91, some of the tests below would cause fold to infloop,
#!/bin/sh
# ensure groups handles -- sanely
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
groups --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# Coreutils 6.9 and earlier failed to display information on first argument
# if later argument was --.
#!/bin/sh
# ensure groups --version output is similar to id --version
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
groups --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_built_ groups id
fail=0
#!/bin/sh
# exercise the fix of 2001-08-18, based on test case from Ian Bruce
-# Copyright (C) 2001, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
head --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
echo abc > in || framework_failure
# -*- perl -*-
# Exercise head's --bytes=-N option.
-# Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
# When reading a specified number of lines, ensure that the output
# file pointer is positioned just after those lines.
-# Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
head --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
(echo a; echo b) > in || framework_failure
test "x$SHELL" = x && SHELL=/bin/sh
export SHELL
-. $srcdir/../envvar-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/test-lib.sh
expected_failure_status_nohup=127
expected_failure_status_printenv=2
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Avoid any possible glitches due to daylight-saving changes near the
# time stamps used during the test.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Newline tests for "md5sum".
-# Copyright (C) 1999, 2000, 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# See if we can create a filename that contains a newline.
# Be careful to do it in a subshell so that we can redirect the
#!/bin/sh
# Ensure that mknod, mkfifo, mkdir -m MODE work with a restrictive umask
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mknod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Test "mktemp".
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 02110-1301, USA.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
nice --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
tests='
0 empty 10
#!/bin/sh
# exercise nl functionality
-# Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
nl --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# test nohup
-# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
nohup --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
# -*- perl -*-
# Exercise od
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
me=`echo $0|sed 's,.*/,,'`
#!/bin/sh
# Verify that `od -N N' reads no more than N bytes of input.
-# Copyright (C) 2001, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
od --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
echo abcdefg > in || framework_failure
# verify that od -t x8 works properly
# This would fail before coreutils-4.5.2.
-# Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
od --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
od -t x8 /dev/null >/dev/null ||
skip_test_ "od lacks support for 8-byte quantities"
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# pathchk tests
-# Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
pathchk --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch file || framework_failure
# -*- perl -*-
# Exercise a bug with pr -m -s
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# basic tests for printf
-# Copyright (C) 2002-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
"$prog" --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# make sure that only two hex. digits are consumed in a \xHHH sequence
-# Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
"$prog" --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Detect printf(3) failure even when it doesn't set stream error indicator
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
"$prog" --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_ulimit_
fail=0
ptx --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Using a long file name makes an abort more likely.
# Even with no file name, valgrind detects the buffer overrun.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_readable_root_
ARGV_0=$0
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
test $host_os != linux-gnu &&
skip_test_ 'vendor getcwd may be inadequate'
#!/bin/sh
# readlink from 6.9 would fail with a false-positive symlink loop error
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cwd=$("$abs_top_builddir/src/pwd")
# To trigger this bug, we have to construct a name/situation during
#!/bin/sh
# Ensure that runcon does not reorder its arguments.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
runcon --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cat <<\EOF > exp || framework_failure
runcon: runcon may be used only on a SELinux kernel
stat --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
require_selinux_
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Sample vectors for "sha1sum".
-# Copyright (C) 2000, 2001, 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Test "sha224sum".
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Test "sha256sum".
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Test "sha384sum".
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Test "sha512sum".
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# make sure that neither --exact nor --zero gobbles a command line argument
-# Copyright (C) 2000, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
shred --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
shred --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
# The length of the basename is what matters.
#!/bin/sh
# Ensure that shuf randomizes its input.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
shuf --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
seq 100 > in || framework_failure
#!/bin/sh
# Test use of compression by sort
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
sort --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
seq -w 2000 > exp || framework_failure
tac exp > in || framework_failure
#!/bin/sh
# Test "sort -m".
-# Copyright (C) 2002, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Ensure that sort --sort-random doesn't sort.
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
sort --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
seq 100 > in || framework_failure
split --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# split must fail when given length/count of zero.
-# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
split --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch in || framework_failure
#!/bin/sh
# show that `split --lines=2' works.
-# Copyright (C) 2002, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ln --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
printf '1\n2\n3\n4\n5\n' > in || framework_failure
#!/bin/sh
# ensure that stat properly handles a format string ending with %
-# Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003-2004, 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
stat --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Test "stat --printf".
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
fi
# Make sure there's a tty on stdin.
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
# The following list of reversible options was generated with
# grep -w REV stty.c|sed -n '/^ {"/{s//REV_/;s/".*/=1/;p;}'|fmt
#!/bin/sh
# Ensure that stty diagnoses invalid inputs, rather than silently misbehaving.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fi
# Make sure there's a tty on stdin.
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
fail=0
export LC_ALL
# Make sure there's a tty on stdin.
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
# Versions of GNU stty from shellutils-1.9.2c and earlier failed
# tests #2 and #4 when run on SunOS 4.1.3.
#!/bin/sh
# Test "sum".
-# Copyright (C) 2000, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# make sure `sum -s' works for input whose sum of bytes is larger than 2^32
-# Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fi
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# Avoid a problem when run in a UTF-8 locale.
# Otherwise, Perl would try to (and fail to) interpret
LC_ALL=C
export LC_ALL
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
# when it encounters an error with say the first one.
# With coreutils-5.2.1 and earlier, this test would fail.
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tac --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# See if the envvar is defined.
if test x = "x$FULL_PARTITION_TMPDIR"; then
#!/bin/sh
# test for basic tee functionality.
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tee --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
echo line >sample || framework_failure
nums=`seq 9` || framework_failure
#!/bin/sh
# test for "tee -".
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tee --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
tee - </dev/null || fail=1
#!/bin/sh
# Test the diagnostics of "test".
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
# -*- perl -*-
# Test "tsort".
-# Copyright (C) 1999, 2000, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# Ensure that $TMPDIR is valid.
TMPDIR=.; export TMPDIR
#!/bin/sh
# Test "unexpand".
-# Copyright (C) 2000, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# Show that wc's new --files0-from option works.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
wc --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo 2 > 2b || framework_failure
echo 2 words > 2w || framework_failure
# Exercise wc's --files0-from option.
# This file bears a striking resemblance to tests/du/files0-from.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
#!/bin/sh
# exercise xstrtol's diagnostics via pr
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fi
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- selinux \
- p-1 \
- p-2 \
- p-3 \
- p-slashdot \
- p-thru-slink \
- p-v \
- parents \
- perm \
- special-1 \
- t-slash \
- writable-under-readonly
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
mkdir --parents "`pwd`/t" || fail=1
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
mkdir --parents "`pwd`/t/u" || fail=1
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir no-access || framework_failure
#!/bin/sh
# Ensure that mkdir -p works with arguments specified with a trailing "/.".
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
#!/bin/sh
# Ensure that mkdir -p foo/bar works when foo is a symbolic link to a directory
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s . slink || framework_failure
mkdir --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
mkdir -pv foo/a/b/c/d >out || fail=1
#!/bin/sh
# make sure mkdir's -p options works properly
-# Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
. "$abs_top_srcdir/tests/setgid-check"
mkdir -m 700 e-dir || framework_failure
# Create an existing directory.
umask 077
mode_str=drwxr-x-wx
-mode_arg=`"$abs_top_srcdir/tests/rwx-to-mode" $mode_str`
+mode_arg=`rwx_to_mode_ $mode_str`
mkdir -m $mode_arg a || fail=1
# this `mkdir -p ...' shouldn't change perms of existing dir `a'.
d_mode_str=drwx-w--wx
-d_mode_arg=`"$abs_top_srcdir/tests/rwx-to-mode" $d_mode_str`
+d_mode_arg=`rwx_to_mode_ $d_mode_str`
mkdir -p -m $d_mode_arg a/b/c/d
# Make sure the permissions of `a' haven't been changed.
# Verify that mkdir's `-m MODE' option works properly
# with various umask settings.
-# Copyright (C) 2000, 2002-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
. "$abs_top_srcdir/tests/setgid-check"
. "$abs_top_srcdir/tests/umask-check"
# mcstrans-0.2.8-1.fc9, the following commands may mistakenly exit
# successfully, in spite of the invalid context string.
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
c=invalid-selinux-context
msg="failed to set default file creation context to \`$c':"
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
set_mode_string=u=rwx,g=rx,o=w,-s,+t
output_mode_string=drwxr-x-wT
# Ensure that mkdir works with arguments specified with and without
# a trailing slash.
-# Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_root_
# FIXME: for now, skip it unconditionally
+++ /dev/null
-# Make coreutils tests for "mv". -*-Makefile-*-
-
-# Copyright (C) 1998-2008 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-TESTS = \
- atomic2 \
- sticky-to-xpart \
- hard-verbose \
- backup-dir \
- dir2dir \
- no-target-dir \
- atomic \
- acl \
- reply-no \
- leak-fd \
- part-hardlink \
- hard-4 \
- hard-3 \
- hard-2 \
- perm-1 \
- i-link-no \
- part-fail \
- dup-source childproof update mv-special-1 \
- into-self \
- into-self-2 \
- into-self-3 \
- into-self-4 \
- i-1 \
- i-2 \
- i-3 \
- i-4 \
- i-5 \
- backup-is-src \
- hard-link-1 force partition-perm to-symlink dir-file diag \
- part-symlink part-rename trailing-slash
-
-EXTRA_DIST = $(TESTS) vfat
-
-include $(top_srcdir)/tests/check.mk
setfacl --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_acl_
# Skip this test if cp was built without ACL support:
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_strace_ unlink
# Before the fix, mv would unnecessarily unlink the destination symlink:
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_strace_ unlink
# Before the fix, mv would unnecessarily unlink the destination symlink:
#!/bin/sh
# Ensure "mv --verbose --backup" works the same for dirs and non-dirs.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir A B || framework_failure
touch X Y || framework_failure
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
# With fileutils-4.1 and earlier, this test would fail for cp and mv.
# With coreutils-6.9 and earlier, this test would fail for ln.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ln --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir a b c || framework_failure
fi
# Make sure we get English translations.
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch f1 || framework_failure
touch f2 || framework_failure
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/file || framework_failure
> file || framework_failure
# Ensure that mv prints the right diagnostic for a dir->dir move
# where the destination directory is not empty.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/t b/t || framework_failure
touch a/t/f || framework_failure
# made this fail: cp a a d/
# Ensure that mv fails with a similar command.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
fail=0
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
ff=mvforce
ff2=mvforce2
# Ensure that moving hard-linked arguments onto existing destinations works.
# Likewise when using cp --preserve=link.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir dst || framework_failure
# Ensure that using `cp --preserve=link' to copy hard-linked arguments
# onto existing destinations works, even when one of the link operations fails.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p x dst/x || framework_failure
#!/bin/sh
# ensure that mv removes a in this case: touch a; ln a b; mv a b
-# Copyright (C) 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch a || framework_failure
ln a b || framework_failure
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
#!/bin/sh
# ensure that mv's --verbose options works even in this unusual case
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch x || framework_failure
ln x y || framework_failure
#!/bin/sh
# Make sure a `n' reply to `mv -i...' aborts the move operation.
-# Copyright (C) 2001, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
# Make sure we get English translations.
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
for i in a b c d e f g h; do
# Make sure that `mv file unwritable-file' prompts the user
# and that `mv -f file unwritable-file' doesn't.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch f g h i || framework_failure
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
for i in a b; do
echo $i > $i || framework_failure
#!/bin/sh
# Make sure `mv -i dir file' prompts before failing.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a || framework_failure
touch b || framework_failure
#!/bin/sh
# Show that mv doesn't preserve links to files the user has declined to move.
-# Copyright (C) 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a b || framework_failure
echo foo > a/foo || framework_failure
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
dir=toself-dir
file=toself-file
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
dir1=is3-dir1
dir2=is3-dir2
# confirm that `mv symlink symlink' doesn't remove symlink
# Based on an example from David Luyer.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch file || framework_failure
ln -s file s || framework_failure
# Exercise mv's file-descriptor-leak bug, reported against coreutils-5.2.1
# and fixed (properly) on 2004-10-21.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# This test is relatively expensive, and might well evoke a
# framework-failure on systems with a smaller command-line length
-. $srcdir/../expensive
+. $top_srcdir/tests/expensive
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
#! /bin/sh
# Test "mv" with special files.
-# Copyright (C) 1998, 1999, 2000, 2002, 2004-2007 Free Software
+# Copyright (C) 1998, 1999, 2000, 2002, 2004-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
# ensure that --no-target-directory (-T) works when the destination is
# an empty directory.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p d/sub empty src d2/sub e2 || framework_failure
touch f || framework_failure
# This is a bit fragile since it relies on the string used
# for EPERM: `permission denied'.
-# Copyright (C) 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
# For additional constraints, see the comment in copy.c.
# Before coreutils-5.2.1, this test would fail.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
# another, and giving it a different name at the destination would cause mv
# to get a failed assertion.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
# make sure cp and mv can handle many combinations of local and
# other-partition regular/symlink'd files.
-# Copyright (C) 2000, 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
# ensure that mv gives one diagnostic, not two, when failing
# due to lack of permissions
-# Copyright (C) 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p no-write/dir || framework_failure
#!/bin/sh
# Ensure that `mv --reply=no f1 f2' works.
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch a b || framework_failure
# mv: cannot remove `x': Operation not permitted
# Affects coreutils-6.0-6.9.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
# Also, ensure that "mv dir non-exist-dir/" works.
# Also, ensure that "cp dir non-exist-dir/" works.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir foo || framework_failure
#!/bin/sh
# make sure --update works as advertised
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo old > old || framework_failure
touch -d yesterday old || framework_failure
# of the current directory. If one is found, create a temporary directory
# inside it.
-# Copyright (C) 1998, 1999, 2001, 2002, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- rl-1 can-e can-f can-m
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
#!/bin/sh
# tests for canonicalize-existing mode (readlink -e).
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
#!/bin/sh
# tests for canonicalize mode (readlink -f).
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
#!/bin/sh
# tests for canonicalize-missing mode (readlink -m).
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
#!/bin/sh
# test for readlink mode.
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir subdir || framework_failure
touch regfile || framework_failure
+++ /dev/null
-# Make coreutils tests for "rm". -*-Makefile-*-
-
-# Copyright (C) 1997-1998, 2000-2008 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-TESTS = \
- deep-2 \
- deep-1 \
- hash \
- dangling-symlink \
- v-slash \
- i-never \
- fail-eacces \
- one-file-system \
- ignorable \
- readdir-bug \
- empty-inacc \
- dir-nonrecur \
- dot-rel \
- inaccessible \
- unread3 \
- no-give-up \
- dir-no-w \
- empty-name \
- fail-2eperm \
- cycle i-no-r fail-eperm \
- rm1 rm2 rm3 rm4 rm5 \
- unread2 r-1 r-2 r-3 r-4 i-1 ir-1 f-1 sunos-1 \
- unreadable \
- interactive-always interactive-once \
- isatty
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
#!/bin/sh
# rm (coreutils-4.5.4) could be tricked into mistakenly reporting a cycle.
-# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/b
# But for fileutils-4.1.9, it would do the former and
# for fileutils-4.1.10 the latter.
-# Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s no-file dangle
ln -s / symlink
#!/bin/sh
# Test "rm" with a deep hierarchy.
-# Copyright (C) 1997, 2002-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
umask 022
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Root can run this test, but it always succeeds, since for root, all
# files are writable, and write_protected_non_symlink never reaches
# rm (without -r) must give a diagnostic for any directory.
# It must not prompt, even if that directory is unwritable.
-# Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir --mode=0500 unwritable-dir || framework_failure
# Ensure that `rm dir' (i.e., without --recursive) gives a reasonable
# diagnostic when failing.
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir d || framework_failure
# Use rm -r to remove two non-empty dot-relative directories.
# This would have failed between 2004-10-18 and 2004-10-21.
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir a b || framework_failure
touch a/f b/f || framework_failure
#!/bin/sh
# Ensure that rm -rf removes an empty-and-inaccessible directory.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -m0 inacc || framework_failure
#!/bin/sh
# Make sure that rm -r '' fails.
-# Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2003, 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# but relative to `/' rather than relative to the current directory.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
#!/bin/sh
# Test "rm -f" with a nonexistent file.
-# Copyright (C) 1997, 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p d || framework_failure
# Like fail-eperm, but the failure must be for a file encountered
# while trying to remove the containing directory with the sticky bit set.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
# The containing directory must be owned by the user who eventually runs rm.
# With the symlink, rm from coreutils-6.9 would fail with a misleading
# ELOOP diagnostic.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
ok=0
# Ensure that rm gives the expected diagnostic when failing to remove a file
# owned by some other user in a directory with the sticky bit set.
-# Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
$ENV{IFS} = '';
my @dir_list = qw(/tmp /var/tmp /usr/tmp);
-my $rm = '../../src/rm';
+my $rm = '../src/rm';
# Find a directory with the sticky bit set.
my $found_dir;
# Before then, rm would fail occasionally, sometimes via
# a failed assertion, others with a seg fault.
-# Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. $srcdir/../expensive
+. $top_srcdir/tests/expensive
if test "$VERBOSE" = yes; then
set -x
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Create a hierarchy with 3*26 leaf directories, each at depth 153.
echo "$0: creating 78 trees, each of depth 153; this will take a while..." >&2
#!/bin/sh
# Test "rm -i".
-# Copyright (C) 1997-1998, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-1998, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
t=t
mkdir -p $t || framework_failure
# Ensure that rm --interactive=never works does not prompt, even for
# an unwritable file.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch f || framework_failure
# recurse into directory DIR. rm -i (without -r) must fail in that case.
# Fixed in coreutils-4.5.2.
-# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
echo y > y || framework_failure
#!/bin/sh
# Ensure that rm -f existing-non-dir/anything exits successfully
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch existing-non-dir || framework_failure
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# Skip this test if your system has neither the openat-style functions
# nor /proc/self/fd support with which to emulate them.
#!/bin/sh
# Test the --interactive[=WHEN] changes added to coreutils 6.0
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch file1-1 file1-2 file2-1 file2-2 file3-1 file3-2 file4-1 file4-2 \
|| framework_failure
#!/bin/sh
# Test the -I option added to coreutils 6.0
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir1-1 dir2-1 dir2-2 || framework_failure
touch file1-1 file2-1 file2-2 file2-3 file3-1 file3-2 file3-3 file3-4 \
#!/bin/sh
# Test "rm -ir".
-# Copyright (C) 1997, 1998, 2002, 2004, 2006, 2007 Free Software Foundation,
+# Copyright (C) 1997, 1998, 2002, 2004, 2006-2008 Free Software Foundation,
# Inc.
# This program is free software: you can redistribute it and/or modify
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
t=t
mkdir -p $t $t/a $t/b $t/c || framework_failure
#!/bin/sh
# Make sure `chown 0 f; rm f' prompts before removing f.
-# Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
fail=0
# With rm from coreutils-5.2.1 and earlier, `rm -r' would mistakenly
# give up too early under some conditions.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_root_
mkdir d || framework_failure
#!/bin/sh
# Demonstrate rm's new --one-file-system option.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
# If used, these must *follow* test-lib.sh.
#!/bin/sh
# Test "rm -r --verbose".
-# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006, 2007 Free Software
+# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a a/a || framework_failure
> b || framework_failure
#!/bin/sh
# Test "rm -r --verbose".
-# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006, 2007 Free Software
+# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir t t/a t/a/b || framework_failure
> t/a/f || framework_failure
#!/bin/sh
# Create and remove a directory with more than 254 files.
-# Copyright (C) 1997, 2001-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir t || framework_failure
cd t || framework_failure
#!/bin/sh
# Try to remove '.' and '..' recursively.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir d || framework_failure
touch d/a || framework_failure
# Exercise the Darwin/MacOS bug worked around on 2006-09-29,
# whereby rm would fail to remove all entries in a directory.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Create a directory containing many files.
# What counts is a combination of the number of files and
#!/bin/sh
# exercise another small part of remove.c
-# Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p b/a/p b/c b/d || framework_failure
#!/bin/sh
# exercise another small part of remove.c
-# Copyright (C) 2002-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/0 || framework_failure
#!/bin/sh
# exercise another small part of remove.c
-# Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p z || framework_failure
#!/bin/sh
# ensure that `rm dir' fails without --recursive
-# Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir dir || framework_failure
#!/bin/sh
# a basic test of rm -ri
-# Copyright (C) 2002-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p d/e || framework_failure
#!/bin/sh
# Make sure that rm -r '' fails.
-# Copyright (C) 1997, 1998, 2002, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1997-1998, 2002, 2004, 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
rm -r '' > /dev/null 2>&1 && fail=1
#!/bin/sh
# exercise one small part of remove.c
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/b || framework_failure
#!/bin/sh
# Ensure that rm works even from an unreadable working directory.
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/1 b c d/2 e/3 || framework_failure
#!/bin/sh
# Test "rm" and unreadable directories.
-# Copyright (C) 1998, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
#!/bin/sh
# avoid extra slashes in --verbose output
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a || framework_failure
touch a/x || framework_failure
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- fail-perm ignore t-slash
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
# For unwritable directory `d', `rmdir -p d d/e/f' would emit
# diagnostics but would not fail. Fixed in 5.1.2.
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rmdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir d d/e d/e/f || framework_failure
chmod a-w d || framework_failure
rmdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cwd=`pwd`
mkdir -p "$cwd/a/b/c" "$cwd/a/x" || framework_failure
#!/bin/sh
# make sure rmdir -p works on a directory specified with a trailing slash
-# Copyright (C) 2002, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
rmdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
+++ /dev/null
-#!/bin/sh
-# Convert an ls-style permission string, like drwxr----x and -rw-r-x-wx
-# to the equivalent chmod --mode (-m) argument, (=,u=rwx,g=r,o=x and
-# =,u=rw,g=rx,o=wx). Ignore ACLs.
-
-# Copyright (C) 2000, 2005 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-case $# in
- 1) rwx=$1;;
- *) echo "$0: wrong number of arguments" 1>&2
- echo "Usage: $0 ls-style-mode-string" 1>&2
- exit 1;;
-esac
-
-case $rwx in
- [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]) ;;
- [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]+) ;;
- *) echo "$0: invalid mode string: $rwx" 1>&2; exit 1;;
-esac
-
-# Perform these conversions:
-# S s
-# s xs
-# T t
-# t xt
-# The `T' and `t' ones are only valid for `other'.
-s='s/S/@/;s/s/x@/;s/@/s/'
-t='s/T/@/;s/t/x@/;s/@/t/'
-
-u=`echo $rwx|sed 's/^.\(...\).*/,u=\1/;s/-//g;s/^,u=$//;'$s`
-g=`echo $rwx|sed 's/^....\(...\).*/,g=\1/;s/-//g;s/^,g=$//;'$s`
-o=`echo $rwx|sed 's/^.......\(...\).*/,o=\1/;s/-//g;s/^,o=$//;'$s';'$t`
-echo "=$u$g$o"
-exit 0
+++ /dev/null
-# Make coreutils tests for "tail". -*-Makefile-*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 Free Software
-# Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-EXTRA_DIST = $(TESTS)
-
-TESTS = \
- append-only \
- tail-n0f \
- infloop-1 \
- big-4gb proc-ksyms start-middle assert assert-2
-
-include $(top_srcdir)/tests/check.mk
# Ensure that tail -f works on an append-only file
# Requires root access to do chattr +a, as well as an ext[23] or xfs file system
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_root_
chattr_a_works=1
fi
# Not "expensive" per se, but sleeping for so long is annoying.
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
very_expensive_
ok='ok ok ok'
fi
# Not "expensive" per se, but sleeping for so long is annoying.
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
very_expensive_
ok='ok ok ok'
# Demonstrate a bug in `tail -cN' when operating on files of size 4G and larger
# Fixed in coreutils-4.5.2.
-# Copyright (C) 2002, 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tail --version
fi
-. $srcdir/../expensive
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/expensive
+. $top_srcdir/tests/test-lib.sh
# Create a file of size exactly 4GB (2^32) with 8 bytes
# at the beginning and another set of 8 bytes at the end.
#!/bin/sh
# This test would fail with tail from pre-1.22i textutils.
-# Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
yes > t &
yes_pid=$!
#!/bin/sh
# Prior to textutils-2.0.17, `tail /proc/ksyms' would segfault on Linux.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
# Verify that tail works even when it's reading from a file
# that is not at its beginning. Based on a report from John Roll.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
(echo 1; echo 2) > k || framework_failure
# Make sure that `tail -n0 -f' and `tail -c0 -f' sleep
# rather than doing what amounted to a busy-wait.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
sleep 2 &
pid=$!
esac
}
+# Convert an ls-style permission string, like drwxr----x and -rw-r-x-wx
+# to the equivalent chmod --mode (-m) argument, (=,u=rwx,g=r,o=x and
+# =,u=rw,g=rx,o=wx). Ignore ACLs.
+rwx_to_mode_()
+{
+ case $# in
+ 1) rwx=$1;;
+ *) echo "$0: wrong number of arguments" 1>&2
+ echo "Usage: $0 ls-style-mode-string" 1>&2
+ return;;
+ esac
+
+ case $rwx in
+ [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]) ;;
+ [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]+) ;;
+ *) echo "$0: invalid mode string: $rwx" 1>&2; return;;
+ esac
+
+ # Perform these conversions:
+ # S s
+ # s xs
+ # T t
+ # t xt
+ # The `T' and `t' ones are only valid for `other'.
+ s='s/S/@/;s/s/x@/;s/@/s/'
+ t='s/T/@/;s/t/x@/;s/@/t/'
+
+ u=`echo $rwx|sed 's/^.\(...\).*/,u=\1/;s/-//g;s/^,u=$//;'$s`
+ g=`echo $rwx|sed 's/^....\(...\).*/,g=\1/;s/-//g;s/^,g=$//;'$s`
+ o=`echo $rwx|sed 's/^.......\(...\).*/,o=\1/;s/-//g;s/^,o=$//;'$s';'$t`
+ echo "=$u$g$o"
+}
+
skip_if_()
{
case $1 in
this_test_() { echo "./$0" | sed 's,.*/,,'; }
this_test=$(this_test_)
-. $srcdir/../envvar-check
+. $top_srcdir/tests/envvar-check
# This is a stub function that is run upon trap (upon regular exit and
# interrupt). Override it with a per-test function, e.g., to unmount
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
rm -f touch-target t-symlink
ln -s touch-target t-symlink
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
touch . || fail=1
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
DEFAULT_SLEEP_SECONDS=2
SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS}
#!/bin/sh
# make sure touch gives reasonable diagnostics
-# Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
touch --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
d1=no-$$
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkfifo_or_skip_ fifo
#!/bin/sh
# Ensure that touch -c no-such-file no longer fails (it did in 4.1.8).
-# Copyright (C) 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Make sure t2 is newer than t1.
touch -d '2000-01-01 00:00' t1 || framework_failure
touch --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
if env -- test -w /; then
skip_test_ you have write access to /.
touch --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/test-lib.sh
require_root_
group_num=$(id -g $NON_ROOT_USERNAME)
#!/bin/sh
# Test touch with obsolescent 8- or 10-digit time stamps.
-# Copyright (C) 2000, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
_POSIX2_VERSION=199209; export _POSIX2_VERSION
POSIXLY_CORRECT=1; export POSIXLY_CORRECT
#!/bin/sh
# ensure that touch can operate on read-only files
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
: > read-only || framework_failure
# Demonstrate using a combination of --reference and --date to
# set the time of a file back by an arbitrary amount.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure