summaryrefslogtreecommitdiff
path: root/tests/tail-2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tail-2')
-rwxr-xr-xtests/tail-2/F-vs-missing.sh (renamed from tests/tail-2/F-vs-missing)4
-rwxr-xr-xtests/tail-2/F-vs-rename.sh (renamed from tests/tail-2/F-vs-rename)4
-rwxr-xr-xtests/tail-2/append-only.sh (renamed from tests/tail-2/append-only)4
-rwxr-xr-xtests/tail-2/assert-2.sh (renamed from tests/tail-2/assert-2)4
-rwxr-xr-xtests/tail-2/assert.sh (renamed from tests/tail-2/assert)4
-rwxr-xr-xtests/tail-2/big-4gb.sh (renamed from tests/tail-2/big-4gb)4
-rwxr-xr-xtests/tail-2/flush-initial.sh (renamed from tests/tail-2/flush-initial)4
-rwxr-xr-xtests/tail-2/follow-name.sh (renamed from tests/tail-2/follow-name)4
-rwxr-xr-xtests/tail-2/follow-stdin.sh (renamed from tests/tail-2/follow-stdin)4
-rwxr-xr-xtests/tail-2/infloop-1.sh (renamed from tests/tail-2/infloop-1)4
-rwxr-xr-xtests/tail-2/inotify-hash-abuse.sh (renamed from tests/tail-2/inotify-hash-abuse)4
-rwxr-xr-xtests/tail-2/inotify-hash-abuse2.sh (renamed from tests/tail-2/inotify-hash-abuse2)4
-rwxr-xr-xtests/tail-2/inotify-race.sh (renamed from tests/tail-2/inotify-race)4
-rwxr-xr-xtests/tail-2/inotify-rotate.sh (renamed from tests/tail-2/inotify-rotate)8
-rwxr-xr-xtests/tail-2/pid.sh (renamed from tests/tail-2/pid)4
-rwxr-xr-xtests/tail-2/pipe-f.sh (renamed from tests/tail-2/pipe-f)4
-rwxr-xr-xtests/tail-2/pipe-f2.sh (renamed from tests/tail-2/pipe-f2)4
-rwxr-xr-xtests/tail-2/proc-ksyms.sh (renamed from tests/tail-2/proc-ksyms)4
-rwxr-xr-xtests/tail-2/start-middle.sh (renamed from tests/tail-2/start-middle)4
-rwxr-xr-xtests/tail-2/tail-n0f.sh (renamed from tests/tail-2/tail-n0f)4
-rwxr-xr-xtests/tail-2/wait.sh (renamed from tests/tail-2/wait)4
21 files changed, 45 insertions, 43 deletions
diff --git a/tests/tail-2/F-vs-missing b/tests/tail-2/F-vs-missing.sh
index fbdb5331..0f744042 100755
--- a/tests/tail-2/F-vs-missing
+++ b/tests/tail-2/F-vs-missing.sh
@@ -3,7 +3,7 @@
# Before coreutils-8.6, tail -F missing/file would not
# notice any subsequent availability of the missing/file.
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2013 Free Software Foundation, Inc.
# This 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 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
debug='---disable-inotify'
diff --git a/tests/tail-2/F-vs-rename b/tests/tail-2/F-vs-rename.sh
index 53bc00dd..4f3ad5eb 100755
--- a/tests/tail-2/F-vs-rename
+++ b/tests/tail-2/F-vs-rename.sh
@@ -3,7 +3,7 @@
# Before coreutils-8.3, tail -F a b would stop tracking additions to b
# after "mv a b".
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This 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 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
touch a b || framework_failure_
diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only.sh
index c79bb7b2..93d0b323 100755
--- a/tests/tail-2/append-only
+++ b/tests/tail-2/append-only.sh
@@ -2,7 +2,7 @@
# 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
require_root_
diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2.sh
index d94d3d8e..13cb3e02 100755
--- a/tests/tail-2/assert-2
+++ b/tests/tail-2/assert-2.sh
@@ -3,7 +3,7 @@
# Due to a race condition in the test, the 'assert' script would get
# the UMR on Solaris only some of the time, and not at all on Linux/GNU.
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2013 Free Software Foundation, Inc.
# This 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 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
# Not "expensive" per se, but sleeping for so long is annoying.
diff --git a/tests/tail-2/assert b/tests/tail-2/assert.sh
index 043e2593..ee7cec8c 100755
--- a/tests/tail-2/assert
+++ b/tests/tail-2/assert.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test for assertion failure in "test".
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# This 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 @@
# Aborted
# due to a race condition in which a dev/inode pair is reused.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
# Not "expensive" per se, but sleeping for so long is annoying.
diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb.sh
index 8ace3183..4e7463c6 100755
--- a/tests/tail-2/big-4gb
+++ b/tests/tail-2/big-4gb.sh
@@ -2,7 +2,7 @@
# Demonstrate a bug in 'tail -cN' when operating on files of size 4G and larger
# Fixed in coreutils-4.5.2.
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
expensive_
diff --git a/tests/tail-2/flush-initial b/tests/tail-2/flush-initial.sh
index bf68ce76..c9f7f4e7 100755
--- a/tests/tail-2/flush-initial
+++ b/tests/tail-2/flush-initial.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# inotify-based tail -f didn't flush its initial output before blocking
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
echo line > in || fail=1
diff --git a/tests/tail-2/follow-name b/tests/tail-2/follow-name.sh
index 2ab1c011..ba480fee 100755
--- a/tests/tail-2/follow-name
+++ b/tests/tail-2/follow-name.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that --follow=name does not imply --retry
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
cat <<\EOF > exp || framework_failure_
diff --git a/tests/tail-2/follow-stdin b/tests/tail-2/follow-stdin.sh
index ee0d1ae8..b2ccba35 100755
--- a/tests/tail-2/follow-stdin
+++ b/tests/tail-2/follow-stdin.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# tail -f - would fail with the initial inotify implementation
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
echo line > exp || framework_failure_
diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1.sh
index 3f45f774..a4afb675 100755
--- a/tests/tail-2/infloop-1
+++ b/tests/tail-2/infloop-1.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# This test would fail with tail from pre-1.22i textutils.
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
yes > t &
diff --git a/tests/tail-2/inotify-hash-abuse b/tests/tail-2/inotify-hash-abuse.sh
index deec76d1..b9c7f108 100755
--- a/tests/tail-2/inotify-hash-abuse
+++ b/tests/tail-2/inotify-hash-abuse.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise an abort-inducing flaw in inotify-enabled tail -F.
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
# 9 is a magic number, related to internal details of tail.c and hash.c
diff --git a/tests/tail-2/inotify-hash-abuse2 b/tests/tail-2/inotify-hash-abuse2.sh
index eb192a65..7dbefdd3 100755
--- a/tests/tail-2/inotify-hash-abuse2
+++ b/tests/tail-2/inotify-hash-abuse2.sh
@@ -2,7 +2,7 @@
# Exercise an abort-inducing flaw in inotify-enabled tail -F.
# Like inotify-hash-abuse, but without a hard-coded "9".
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
touch f || framework_failure_
diff --git a/tests/tail-2/inotify-race b/tests/tail-2/inotify-race.sh
index ab25f67d..cc0f61b3 100755
--- a/tests/tail-2/inotify-race
+++ b/tests/tail-2/inotify-race.sh
@@ -5,7 +5,7 @@
# indefinitely if no *other* data is appended, but it would be printed as
# soon as any additional appended data is detected.
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This 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 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
# Don't run this test by default because sometimes it's skipped as noted below.
diff --git a/tests/tail-2/inotify-rotate b/tests/tail-2/inotify-rotate.sh
index 311633a8..4a16202d 100755
--- a/tests/tail-2/inotify-rotate
+++ b/tests/tail-2/inotify-rotate.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that tail -F handles rotation
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This 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
tail --version
fi
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
expensive_
# Wait several seconds for grep REGEXP FILE to succeed.
@@ -47,7 +47,8 @@ for i in $(seq 50); do
# Normally less than a second is required here, but with heavy load
# and a lot of disk activity, even 20 seconds is insufficient, which
# leads to this timeout killing tail before the "ok" is written below.
- :>k && :>x && timeout 40 tail -F k > out 2>&1 &
+ :>k && :>x || framework_failure_ failed to initialize files
+ timeout 40 tail -F k > out 2>&1 &
pid=$!
sleep .1
echo b > k;
@@ -65,4 +66,5 @@ for i in $(seq 50); do
test $found = 0 && { cat out; fail_ failed to detect echoed '"ok"'; }
done
+wait
Exit $fail
diff --git a/tests/tail-2/pid b/tests/tail-2/pid.sh
index 0a26f8d3..19e6a18b 100755
--- a/tests/tail-2/pid
+++ b/tests/tail-2/pid.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test the --pid option of tail.
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
getlimits_
diff --git a/tests/tail-2/pipe-f b/tests/tail-2/pipe-f.sh
index e3d8a70b..e0cf3c6d 100755
--- a/tests/tail-2/pipe-f
+++ b/tests/tail-2/pipe-f.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that :|tail -f doesn't hang, per POSIX
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
echo foo | timeout 10 tail -f -c3 > out || fail=1
diff --git a/tests/tail-2/pipe-f2 b/tests/tail-2/pipe-f2.sh
index fffd43a1..63091e39 100755
--- a/tests/tail-2/pipe-f2
+++ b/tests/tail-2/pipe-f2.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that "tail -f fifo" tails indefinitely.
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
mkfifo_or_skip_ fifo
diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms.sh
index ad446d35..243bb9b9 100755
--- a/tests/tail-2/proc-ksyms
+++ b/tests/tail-2/proc-ksyms.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Prior to textutils-2.0.17, 'tail /proc/ksyms' would segfault on Linux.
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle.sh
index 5b40de45..67d5b1a9 100755
--- a/tests/tail-2/start-middle
+++ b/tests/tail-2/start-middle.sh
@@ -2,7 +2,7 @@
# 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
(echo 1; echo 2) > k || framework_failure_
diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f.sh
index 2b2147a7..a8d37597 100755
--- a/tests/tail-2/tail-n0f
+++ b/tests/tail-2/tail-n0f.sh
@@ -2,7 +2,7 @@
# Make sure that 'tail -n0 -f' and 'tail -c0 -f' sleep
# rather than doing what amounted to a busy-wait.
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
# This 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 @@
# It skips the test if your system lacks a /proc/$pid/status
# file, or if its contents don't look right.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
require_proc_pid_status_
diff --git a/tests/tail-2/wait b/tests/tail-2/wait.sh
index 587b4495..529b9459 100755
--- a/tests/tail-2/wait
+++ b/tests/tail-2/wait.sh
@@ -2,7 +2,7 @@
# Make sure that 'tail -f' returns immediately if a file doesn't exist
# while 'tail -F' waits for it to appear.
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail
touch here || framework_failure_