avoid failure of new test on kernel without SELinux support
authorJim Meyering <meyering@redhat.com>
Sat, 29 Mar 2008 18:02:18 +0000 (19:02 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 29 Mar 2008 21:43:46 +0000 (22:43 +0100)
* tests/mkdir/selinux: Also accept ENOENT.
Reported by Sven Joachim.

Signed-off-by: Jim Meyering <meyering@redhat.com>
tests/mkdir/selinux

index c0fc201af5d114ea7ddeda68cf3755f6a54a88c4..f8aeace26ca3c8c4bb9924f7802dd0ff542740d9 100755 (executable)
@@ -37,8 +37,11 @@ for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do
   set $cmd_w_arg; cmd=$1
   echo "$cmd: $msg" > exp || fail=1
 
-  # Some systems fail with ENOTSUP, some with EINVAL.
-  sed 's/ Invalid argument$//;s/ Operation not supported$//' out > k || fail=1
+  # Some systems fail with ENOTSUP, or EINVAL, or even ENOENT.
+  sed                                  \
+    -e 's/ Invalid argument$//'                \
+    -e 's/ Operation not supported$//' \
+    -e 's/ No such file or directory$//' out > k || fail=1
   mv k out || fail=1
   compare out exp || fail=1
 done