summaryrefslogtreecommitdiff
path: root/tests/du
diff options
context:
space:
mode:
Diffstat (limited to 'tests/du')
-rwxr-xr-xtests/du/2g17
-rwxr-xr-xtests/du/8gb17
-rw-r--r--tests/du/Makefile.am21
-rwxr-xr-xtests/du/basic17
-rwxr-xr-xtests/du/deref17
-rwxr-xr-xtests/du/deref-args17
-rwxr-xr-xtests/du/exclude17
-rwxr-xr-xtests/du/fd-leak17
-rwxr-xr-xtests/du/files0-from17
-rwxr-xr-xtests/du/hard-link17
-rwxr-xr-xtests/du/inaccessible-cwd18
-rwxr-xr-xtests/du/long-from-unreadable19
-rwxr-xr-xtests/du/long-sloop17
-rwxr-xr-xtests/du/no-deref19
-rwxr-xr-xtests/du/no-x17
-rwxr-xr-xtests/du/restore-wd17
-rwxr-xr-xtests/du/slash17
-rwxr-xr-xtests/du/slink17
-rwxr-xr-xtests/du/trailing-slash18
-rwxr-xr-xtests/du/two-args17
20 files changed, 348 insertions, 2 deletions
diff --git a/tests/du/2g b/tests/du/2g
index 4d3d8fdbd..4f0006df7 100755
--- a/tests/du/2g
+++ b/tests/du/2g
@@ -3,6 +3,23 @@
# Before coreutils-5.93, on systems with a signed, 32-bit stat.st_blocks
# one of du's computations would overflow.
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/8gb b/tests/du/8gb
index c777d6663..036cb8699 100755
--- a/tests/du/8gb
+++ b/tests/du/8gb
@@ -2,6 +2,23 @@
# Ensure that du does not rely on narrow types like size_t for
# file sizes or sums.
+# Copyright (C) 2003, 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/Makefile.am b/tests/du/Makefile.am
index 2cfe5ff19..e24b85c5b 100644
--- a/tests/du/Makefile.am
+++ b/tests/du/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "du". -*-Makefile-*-
+
+# Copyright (C) 2000, 2002, 2003, 2004, 2005, 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = \
diff --git a/tests/du/basic b/tests/du/basic
index 0af453356..0427068f5 100755
--- a/tests/du/basic
+++ b/tests/du/basic
@@ -1,6 +1,23 @@
#!/bin/sh
# Compare actual numbers from du, assuming block size matches mine.
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/deref b/tests/du/deref
index 0ff12ea93..8a3db87fe 100755
--- a/tests/du/deref
+++ b/tests/du/deref
@@ -2,6 +2,23 @@
# 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 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/deref-args b/tests/du/deref-args
index 05a1448c6..91ce99ff1 100755
--- a/tests/du/deref-args
+++ b/tests/du/deref-args
@@ -2,6 +2,23 @@
# Ensure that --dereference-args (-D) gives reasonable names.
# This test would fail for coreutils-5.0.91.
+# Copyright (C) 2003, 2004, 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/exclude b/tests/du/exclude
index de24ba19b..bf36c4bc3 100755
--- a/tests/du/exclude
+++ b/tests/du/exclude
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure du's --exclude option works
+# Copyright (C) 2003, 2004, 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/fd-leak b/tests/du/fd-leak
index 2336ed891..af4482cb4 100755
--- a/tests/du/fd-leak
+++ b/tests/du/fd-leak
@@ -1,6 +1,23 @@
#!/bin/sh
# check for file descriptor leak
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/files0-from b/tests/du/files0-from
index efe62f632..fdcb59575 100755
--- a/tests/du/files0-from
+++ b/tests/du/files0-from
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise du's --files0-from option.
+# Copyright (C) 2004, 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/du/hard-link b/tests/du/hard-link
index 3702e8d54..920ae52f1 100755
--- a/tests/du/hard-link
+++ b/tests/du/hard-link
@@ -3,6 +3,23 @@
# Likewise for excluded directories.
# Ensure that hard links _are_ listed twice when using --count-links.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd
index c344d6d3e..e50534cc7 100755
--- a/tests/du/inaccessible-cwd
+++ b/tests/du/inaccessible-cwd
@@ -1,6 +1,24 @@
#!/bin/sh
# Ensure that even when run from an inaccessible directory, du can still
# operate on accessible directories elsewhere.
+
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Before the switch to an fts-based implementation in coreutils 5.0.92,
# this test would fail.
diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable
index 2ae7ed1d9..5a84c2e34 100755
--- a/tests/du/long-from-unreadable
+++ b/tests/du/long-from-unreadable
@@ -1,4 +1,23 @@
#!/bin/sh
+# Show fts fails on old-fashioned systems.
+
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Show that fts (hence du, chmod, chgrp, chown) fails when all of the
# following are true:
# - `.' is not readable
diff --git a/tests/du/long-sloop b/tests/du/long-sloop
index 2dee47be9..69ce0e0c6 100755
--- a/tests/du/long-sloop
+++ b/tests/du/long-sloop
@@ -3,6 +3,23 @@
# Show that du fails with ELOOP (Too many levels of symbolic links)
# when it encounters that condition.
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/no-deref b/tests/du/no-deref
index c8ef95ba1..db0f30c32 100755
--- a/tests/du/no-deref
+++ b/tests/du/no-deref
@@ -1,5 +1,22 @@
#!/bin/sh
-# Ensure that by defualt, du doesn't dereference symlinks given on command line.
+# Ensure that by default, du doesn't dereference command-line symlinks.
+
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/du/no-x b/tests/du/no-x
index 7cd2f182b..75b4e4f63 100755
--- a/tests/du/no-x
+++ b/tests/du/no-x
@@ -2,6 +2,23 @@
# Make sure du gives the right diagnostic for a readable,
# but inaccessible directory.
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/restore-wd b/tests/du/restore-wd
index 927265af5..c7b623306 100755
--- a/tests/du/restore-wd
+++ b/tests/du/restore-wd
@@ -2,6 +2,23 @@
# 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 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/slash b/tests/du/slash
index 423fb3899..636e961c6 100755
--- a/tests/du/slash
+++ b/tests/du/slash
@@ -1,6 +1,23 @@
#!/bin/sh
# `du /' would omit the `/' on the last line.
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/slink b/tests/du/slink
index 4625aa053..74f8abf9e 100755
--- a/tests/du/slink
+++ b/tests/du/slink
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that the size of a long-named-symlink is > 0.
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash
index 41a9b53c0..a9785c7db 100755
--- a/tests/du/trailing-slash
+++ b/tests/du/trailing-slash
@@ -1,6 +1,24 @@
#!/bin/sh
# 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, 2003, 2004 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Before coreutils-4.5.3, it would remove a single trailing slash.
if test "$VERBOSE" = yes; then
diff --git a/tests/du/two-args b/tests/du/two-args
index 5e9649933..45f911c4c 100755
--- a/tests/du/two-args
+++ b/tests/du/two-args
@@ -2,6 +2,23 @@
# Make sure `du d/1 d/2' works.
# That command failed with du from fileutils-4.0q.
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version