diff options
Diffstat (limited to 'tests/du')
-rwxr-xr-x | tests/du/2g | 4 | ||||
-rwxr-xr-x | tests/du/8gb | 6 | ||||
-rw-r--r-- | tests/du/Makefile.am | 34 | ||||
-rwxr-xr-x | tests/du/basic | 6 | ||||
-rwxr-xr-x | tests/du/deref | 4 | ||||
-rwxr-xr-x | tests/du/deref-args | 4 | ||||
-rwxr-xr-x | tests/du/exclude | 4 | ||||
-rwxr-xr-x | tests/du/fd-leak | 6 | ||||
-rwxr-xr-x | tests/du/files0-from | 4 | ||||
-rwxr-xr-x | tests/du/hard-link | 6 | ||||
-rwxr-xr-x | tests/du/inacc-dest | 6 | ||||
-rwxr-xr-x | tests/du/inacc-dir | 4 | ||||
-rwxr-xr-x | tests/du/inaccessible-cwd | 4 | ||||
-rwxr-xr-x | tests/du/long-from-unreadable | 4 | ||||
-rwxr-xr-x | tests/du/long-sloop | 6 | ||||
-rwxr-xr-x | tests/du/no-deref | 4 | ||||
-rwxr-xr-x | tests/du/no-x | 6 | ||||
-rwxr-xr-x | tests/du/one-file-system | 4 | ||||
-rwxr-xr-x | tests/du/restore-wd | 4 | ||||
-rwxr-xr-x | tests/du/slash | 2 | ||||
-rwxr-xr-x | tests/du/slink | 4 | ||||
-rwxr-xr-x | tests/du/trailing-slash | 4 | ||||
-rwxr-xr-x | tests/du/two-args | 4 |
23 files changed, 50 insertions, 84 deletions
diff --git a/tests/du/2g b/tests/du/2g index fa20ce983..8479524c0 100755 --- a/tests/du/2g +++ b/tests/du/2g @@ -3,7 +3,7 @@ # 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 @@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then du --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh # Creating a 2GB file counts as `very expensive'. very_expensive_ diff --git a/tests/du/8gb b/tests/du/8gb index ab6dedde4..b0a42c4ad 100755 --- a/tests/du/8gb +++ b/tests/du/8gb @@ -2,7 +2,7 @@ # 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 @@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then 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 diff --git a/tests/du/Makefile.am b/tests/du/Makefile.am deleted file mode 100644 index 9fd6f9df7..000000000 --- a/tests/du/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# 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 diff --git a/tests/du/basic b/tests/du/basic index b7bfa3a58..f2eeccf5b 100755 --- a/tests/du/basic +++ b/tests/du/basic @@ -1,7 +1,7 @@ #!/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 @@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then 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 diff --git a/tests/du/deref b/tests/du/deref index 63cd606b2..47f444921 100755 --- a/tests/du/deref +++ b/tests/du/deref @@ -2,7 +2,7 @@ # 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 @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then 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 diff --git a/tests/du/deref-args b/tests/du/deref-args index 441b21dd7..c0281d5a5 100755 --- a/tests/du/deref-args +++ b/tests/du/deref-args @@ -2,7 +2,7 @@ # 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 @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then 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 diff --git a/tests/du/exclude b/tests/du/exclude index 7e4805157..73a0c5bde 100755 --- a/tests/du/exclude +++ b/tests/du/exclude @@ -1,7 +1,7 @@ #!/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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then 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 diff --git a/tests/du/fd-leak b/tests/du/fd-leak index bc2ea81bf..c4080ffaf 100755 --- a/tests/du/fd-leak +++ b/tests/du/fd-leak @@ -1,7 +1,7 @@ #!/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 @@ -23,8 +23,8 @@ fi # 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. diff --git a/tests/du/files0-from b/tests/du/files0-from index 4d9b37cb3..583311685 100755 --- a/tests/du/files0-from +++ b/tests/du/files0-from @@ -2,7 +2,7 @@ # -*- 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 @@ -18,7 +18,7 @@ # 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 diff --git a/tests/du/hard-link b/tests/du/hard-link index 139bae2ec..94fe9c48c 100755 --- a/tests/du/hard-link +++ b/tests/du/hard-link @@ -3,7 +3,7 @@ # 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 @@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then 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; } ) diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest index c2bab2cf9..ba5aed0ad 100755 --- a/tests/du/inacc-dest +++ b/tests/du/inacc-dest @@ -2,7 +2,7 @@ # 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 @@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then 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 \ diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir index f7d553aca..919406a07 100755 --- a/tests/du/inacc-dir +++ b/tests/du/inacc-dir @@ -1,6 +1,6 @@ #!/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 @@ -20,7 +20,7 @@ if test "$VERBOSE" = yes; then du --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh skip_if_root_ mkdir -p a/sub || framework_failure diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd index 8eb6693e7..f6af78600 100755 --- a/tests/du/inaccessible-cwd +++ b/tests/du/inaccessible-cwd @@ -2,7 +2,7 @@ # 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 @@ -25,7 +25,7 @@ if test "$VERBOSE" = yes; then du --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh skip_if_root_ cwd=`pwd` diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable index cdc81dc3f..1e20bb324 100755 --- a/tests/du/long-from-unreadable +++ b/tests/du/long-from-unreadable @@ -1,7 +1,7 @@ #!/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 @@ -33,7 +33,7 @@ if test "$VERBOSE" = yes; then du --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh proc_file=/proc/self/fd if test ! -d $proc_file; then diff --git a/tests/du/long-sloop b/tests/du/long-sloop index 603f1f07f..a9692241c 100755 --- a/tests/du/long-sloop +++ b/tests/du/long-sloop @@ -3,7 +3,7 @@ # 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 @@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then 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. diff --git a/tests/du/no-deref b/tests/du/no-deref index cd76b557f..e1b714036 100755 --- a/tests/du/no-deref +++ b/tests/du/no-deref @@ -1,7 +1,7 @@ #!/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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then 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 diff --git a/tests/du/no-x b/tests/du/no-x index 5f888ed51..9cff767b0 100755 --- a/tests/du/no-x +++ b/tests/du/no-x @@ -2,7 +2,7 @@ # 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 @@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then 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 diff --git a/tests/du/one-file-system b/tests/du/one-file-system index 244887152..fd2695631 100755 --- a/tests/du/one-file-system +++ b/tests/du/one-file-system @@ -2,7 +2,7 @@ # 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 @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then du --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir -p b/c y/z || framework_failure diff --git a/tests/du/restore-wd b/tests/du/restore-wd index e868bf85c..62409db57 100755 --- a/tests/du/restore-wd +++ b/tests/du/restore-wd @@ -2,7 +2,7 @@ # 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 @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then du --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir a b || framework_failure diff --git a/tests/du/slash b/tests/du/slash index 7f218c928..a939b91b6 100755 --- a/tests/du/slash +++ b/tests/du/slash @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then du --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh require_readable_root_ fail=0 diff --git a/tests/du/slink b/tests/du/slink index be5a63df5..082efddf7 100755 --- a/tests/du/slink +++ b/tests/du/slink @@ -1,7 +1,7 @@ #!/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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then 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, diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash index 80ce5ba8d..a3f853682 100755 --- a/tests/du/trailing-slash +++ b/tests/du/trailing-slash @@ -2,7 +2,7 @@ # 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 @@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then 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 diff --git a/tests/du/two-args b/tests/du/two-args index 9d9330e95..5cb875ff0 100755 --- a/tests/du/two-args +++ b/tests/du/two-args @@ -2,7 +2,7 @@ # 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 @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then 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 |