]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: do not fail on read-only root file system
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 22 Nov 2009 15:37:34 +0000 (18:37 +0300)
committerJim Meyering <meyering@redhat.com>
Sun, 22 Nov 2009 15:40:18 +0000 (16:40 +0100)
* tests/touch/not-owner: Handle the case when the root file system is
mounted read-only.
Reported by Solar Designer.

tests/touch/not-owner

index 3dd8a80867432cc486091886d4cbdd13290f9ed0..9cfa026bbf44c2b8f0a091f52f2fb9ab5afee71f 100755 (executable)
@@ -42,7 +42,10 @@ touch / > out 2>&1 && fail=1
 
 # On SunOS4, EPERM is `Not owner'.
 # On some *BSD systems it's `Operation not permitted'.
-for msg in 'Not owner' 'Operation not permitted' 'Permission denied'; do
+# On a system where root file system is mounted read-only
+# it's `Read-only file system'.
+for msg in 'Not owner' 'Operation not permitted' 'Permission denied' \
+           'Read-only file system'; do
   cat > exp <<EOF
 touch: setting times of \`/': $msg
 EOF