diff options
Diffstat (limited to 'tests/touch')
-rwxr-xr-x | tests/touch/60-seconds.sh | 2 | ||||
-rwxr-xr-x | tests/touch/dangling-symlink.sh | 2 | ||||
-rwxr-xr-x | tests/touch/empty-file.sh | 2 | ||||
-rwxr-xr-x | tests/touch/fail-diag.sh | 2 | ||||
-rwxr-xr-x | tests/touch/fifo.sh | 2 | ||||
-rwxr-xr-x | tests/touch/no-create-missing.sh | 2 | ||||
-rwxr-xr-x | tests/touch/no-dereference.sh | 8 | ||||
-rwxr-xr-x | tests/touch/no-rights.sh | 2 | ||||
-rwxr-xr-x | tests/touch/not-owner.sh | 2 | ||||
-rwxr-xr-x | tests/touch/now-owned-by-other.sh | 4 | ||||
-rwxr-xr-x | tests/touch/obsolescent.sh | 2 | ||||
-rwxr-xr-x | tests/touch/read-only.sh | 2 | ||||
-rwxr-xr-x | tests/touch/relative.sh | 2 | ||||
-rwxr-xr-x | tests/touch/trailing-slash.sh | 22 |
14 files changed, 28 insertions, 28 deletions
diff --git a/tests/touch/60-seconds.sh b/tests/touch/60-seconds.sh index f0d5b89e..c8b798ea 100755 --- a/tests/touch/60-seconds.sh +++ b/tests/touch/60-seconds.sh @@ -1,7 +1,7 @@ #!/bin/sh # touch -t would mistakenly reject a time specifying "60" seconds -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/dangling-symlink.sh b/tests/touch/dangling-symlink.sh index 9adfd4bd..52845006 100755 --- a/tests/touch/dangling-symlink.sh +++ b/tests/touch/dangling-symlink.sh @@ -2,7 +2,7 @@ # Make sure touch can create a file through a dangling symlink. # This was broken in the 4.0[e-i] test releases. -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/empty-file.sh b/tests/touch/empty-file.sh index e6d1b334..17432aba 100755 --- a/tests/touch/empty-file.sh +++ b/tests/touch/empty-file.sh @@ -1,7 +1,7 @@ #!/bin/sh # Make sure touch can set the mtime on an empty file. -# Copyright (C) 1998-2014 Free Software Foundation, Inc. +# Copyright (C) 1998-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/fail-diag.sh b/tests/touch/fail-diag.sh index 191ec30c..86215c68 100755 --- a/tests/touch/fail-diag.sh +++ b/tests/touch/fail-diag.sh @@ -1,7 +1,7 @@ #!/bin/sh # make sure touch gives reasonable diagnostics -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/fifo.sh b/tests/touch/fifo.sh index 71ae7791..f8c6d885 100755 --- a/tests/touch/fifo.sh +++ b/tests/touch/fifo.sh @@ -1,7 +1,7 @@ #!/bin/sh # Make sure touch works on fifos without hanging. -# Copyright (C) 2000-2014 Free Software Foundation, Inc. +# Copyright (C) 2000-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/no-create-missing.sh b/tests/touch/no-create-missing.sh index 7ce63b1b..7ad1a3a9 100755 --- a/tests/touch/no-create-missing.sh +++ b/tests/touch/no-create-missing.sh @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that touch -c no-such-file no longer fails (it did in 4.1.8). -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/no-dereference.sh b/tests/touch/no-dereference.sh index 0f4fdca9..fc0c7237 100755 --- a/tests/touch/no-dereference.sh +++ b/tests/touch/no-dereference.sh @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that touch -h works. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,8 +26,8 @@ ln -s file link || framework_failure_ # These first tests should work on every platform. # -h does not create files, but it warns. Use -c to silence warning. -touch -h no-file 2> err && fail=1 -test -s err || fail=1 +returns_ 1 touch -h no-file 2> err || fail=1 +compare /dev/null err && fail=1 touch -h -c no-file 2> err || fail=1 compare /dev/null err || fail=1 @@ -75,7 +75,7 @@ touch -h - > file || fail=1 # If stdout is open, it is not a symlink. if env test -w /dev/stdout >/dev/null && env test ! -w /dev/stdout >&-; then - touch -h - >&- && fail=1 + returns_ 1 touch -h - >&- || fail=1 touch -h -c - >&- || fail=1 fi diff --git a/tests/touch/no-rights.sh b/tests/touch/no-rights.sh index 085c8307..baf39d40 100755 --- a/tests/touch/no-rights.sh +++ b/tests/touch/no-rights.sh @@ -2,7 +2,7 @@ # Make sure touch can update the times on a file that is neither # readable nor writable. -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/not-owner.sh b/tests/touch/not-owner.sh index c822f0b5..987b85d2 100755 --- a/tests/touch/not-owner.sh +++ b/tests/touch/not-owner.sh @@ -2,7 +2,7 @@ # Make sure that touch gives reasonable diagnostics when applied # to an unwritable directory owned by some other user. -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/now-owned-by-other.sh b/tests/touch/now-owned-by-other.sh index d01097ed..67789e79 100755 --- a/tests/touch/now-owned-by-other.sh +++ b/tests/touch/now-owned-by-other.sh @@ -1,7 +1,7 @@ #!/bin/sh # Demonstrate that "touch -d now writable-but-owned-by-other" works. -# Copyright (C) 2008-2014 Free Software Foundation, Inc. +# Copyright (C) 2008-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ chmod g+w root-owned # Ensure that the current directory is searchable by $NON_ROOT_USERNAME. chmod g+x . -chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ +chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ touch -d now root-owned || fail=1 Exit $fail diff --git a/tests/touch/obsolescent.sh b/tests/touch/obsolescent.sh index 7dd1418b..3c4dc734 100755 --- a/tests/touch/obsolescent.sh +++ b/tests/touch/obsolescent.sh @@ -1,7 +1,7 @@ #!/bin/sh # Test touch with obsolescent 8- or 10-digit time stamps. -# Copyright (C) 2000-2014 Free Software Foundation, Inc. +# Copyright (C) 2000-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/read-only.sh b/tests/touch/read-only.sh index d2397385..9cce6478 100755 --- a/tests/touch/read-only.sh +++ b/tests/touch/read-only.sh @@ -1,7 +1,7 @@ #!/bin/sh # ensure that touch can operate on read-only files -# Copyright (C) 2005-2014 Free Software Foundation, Inc. +# Copyright (C) 2005-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/relative.sh b/tests/touch/relative.sh index 396c2f11..acfb03bf 100755 --- a/tests/touch/relative.sh +++ b/tests/touch/relative.sh @@ -2,7 +2,7 @@ # Demonstrate using a combination of --reference and --date to # set the time of a file back by an arbitrary amount. -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/touch/trailing-slash.sh b/tests/touch/trailing-slash.sh index 7e6eb908..2d57007b 100755 --- a/tests/touch/trailing-slash.sh +++ b/tests/touch/trailing-slash.sh @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that touch honors trailing slash. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,22 +29,22 @@ ln -s dir link2 || framework_failure_ # Trailing slash can only appear on directory or symlink-to-directory. # Up through coreutils 8.0, Solaris 9 failed these tests. -touch no-file/ && fail=1 -touch file/ && fail=1 -touch dangling/ && fail=1 -touch loop/ && fail=1 -touch link1/ && fail=1 +returns_ 1 touch no-file/ || fail=1 +returns_ 1 touch file/ || fail=1 +returns_ 1 touch dangling/ || fail=1 +returns_ 1 touch loop/ || fail=1 +returns_ 1 touch link1/ || fail=1 touch dir/ || fail=1 # -c silences ENOENT, but not ENOTDIR or ELOOP touch -c no-file/ || fail=1 -touch -c file/ && fail=1 +returns_ 1 touch -c file/ || fail=1 touch -c dangling/ || fail=1 -touch -c loop/ && fail=1 -touch -c link1/ && fail=1 +returns_ 1 touch -c loop/ || fail=1 +returns_ 1 touch -c link1/ || fail=1 touch -c dir/ || fail=1 -test -f no-file && fail=1 -test -f nowhere && fail=1 +returns_ 1 test -f no-file || fail=1 +returns_ 1 test -f nowhere || fail=1 # Trailing slash dereferences a symlink, even with -h. # mtime is sufficient to show pass (besides, lstat changes atime of |