diff options
author | Jim Meyering <meyering@redhat.com> | 2008-04-16 15:28:33 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-04-16 15:28:33 +0200 |
commit | 57ae7da07593ab0134e120ea79819fdd069563a1 (patch) | |
tree | 2a5c09ece8fe8c50f9fbf3de2cf8d102afd726a1 /tests | |
parent | 9bb5e5e9afcdf23f5e9d60a005f9b572f7f953ea (diff) | |
download | coreutils-57ae7da07593ab0134e120ea79819fdd069563a1.tar.xz |
tests: accommodate built-in mknod more cleanly
* tests/mkdir/selinux: Undo most of previous change,
bc22dbbf844f31ddaf2e68b167d0128a985d73ab, and instead
invoke the command via "nice". Using "exec" should be
enough, but isn't with OpenBSD's PD KSH v5.2.14 99/07/13.2.
Eric Blake suggested using nice.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/mkdir/selinux | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux index 4363275f7..45c23998d 100755 --- a/tests/mkdir/selinux +++ b/tests/mkdir/selinux @@ -34,16 +34,12 @@ 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" 'mkfifo f'; do - $cmd_w_arg -Z $c 2> out && fail=1 +for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do + # In OpenBSD's /bin/sh, mknod is a shell built-in. + # Running via "nice" ensures we run our program and not the built-in. + nice -- $cmd_w_arg -Z $c 2> out && fail=1 set $cmd_w_arg; cmd=$1 echo "$cmd: $msg" > exp || fail=1 |