diff options
author | Jim Meyering <meyering@redhat.com> | 2008-04-16 10:29:10 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-04-16 10:29:10 +0200 |
commit | bc22dbbf844f31ddaf2e68b167d0128a985d73ab (patch) | |
tree | 5e060d16329b8302cb7b230e21f88764fde5b06e /tests/mkdir | |
parent | 7cb24684cc4ef96bb25dfc1c819acfc3b98d9442 (diff) | |
download | coreutils-bc22dbbf844f31ddaf2e68b167d0128a985d73ab.tar.xz |
tests: avoid mkdir/selinux failure when mknod is a shell built-in
* tests/mkdir/selinux: Skip the mknod test if it's a built-in.
Diffstat (limited to 'tests/mkdir')
-rwxr-xr-x | tests/mkdir/selinux | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux index fcd45a835..adbaa6acd 100755 --- a/tests/mkdir/selinux +++ b/tests/mkdir/selinux @@ -30,9 +30,15 @@ fi c=invalid-selinux-context msg="failed to set default file creation context to \`$c':" +# In OpenBSD's /bin/sh, mknod is a shell built-in. +# In that case, just skip the mknod test. +( mknod --version 2>&1 ) | grep 'GNU coreutils' \ + && mknod='mknod b p' \ + || mknod='mkdir dir' + # Test each of mkdir, mknod, mkfifo with "-Z invalid-context". -for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do +for cmd_w_arg in 'mkdir dir' "$mknod" 'mkfifo f'; do $cmd_w_arg -Z $c 2> out && fail=1 set $cmd_w_arg; cmd=$1 echo "$cmd: $msg" > exp || fail=1 |