Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/mixerctl Do the previous test a better way - f...
details: https://anonhg.NetBSD.org/src/rev/fabbe26ee265
branches: trunk
changeset: 355324:fabbe26ee265
user: kre <kre%NetBSD.org@localhost>
date: Tue Jul 25 22:28:22 2017 +0000
description:
Do the previous test a better way - for a file, test is generally
adequate, but for a device, we really need to actually try opening
it to determine that it is possible - so do the test that way, then
if the open succeeds once, assume it will the second time (which then
holds it open.)
diffstat:
tests/usr.bin/mixerctl/t_mixerctl.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r c76812efd355 -r fabbe26ee265 tests/usr.bin/mixerctl/t_mixerctl.sh
--- a/tests/usr.bin/mixerctl/t_mixerctl.sh Tue Jul 25 21:26:56 2017 +0000
+++ b/tests/usr.bin/mixerctl/t_mixerctl.sh Tue Jul 25 22:28:22 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_mixerctl.sh,v 1.9 2017/07/25 21:25:03 kre Exp $
+# $NetBSD: t_mixerctl.sh,v 1.10 2017/07/25 22:28:22 kre Exp $
audio_setup() {
# Open /dev/pad0 so we have a configured audio device.
@@ -21,7 +21,7 @@
# variables, we would need to put $padpid in a file.)
unset padpid
- test -r /dev/pad0 &&
+ ( true </dev/pad0 ) >/dev/null 2>&1 &&
{ { cat >/dev/null & } < /dev/pad0 ; } 2>/dev/null && padpid=$!
(</dev/mixer) >/dev/null 2>&1 ||
Home |
Main Index |
Thread Index |
Old Index