Module Name: src
Committed By: kre
Date: Thu Feb 23 02:28:10 UTC 2017
Modified Files:
src/tests/usr.bin/mixerctl: t_mixerctl.sh
Log Message:
Limit previous to the i386 qemu kernels, the tests work on amd64 and sparc
(which have some audio configured.)
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/mixerctl/t_mixerctl.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/mixerctl/t_mixerctl.sh
diff -u src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.2 src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.3
--- src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.2 Thu Feb 23 02:09:24 2017
+++ src/tests/usr.bin/mixerctl/t_mixerctl.sh Thu Feb 23 02:28:10 2017
@@ -1,15 +1,16 @@
-# $NetBSD: t_mixerctl.sh,v 1.2 2017/02/23 02:09:24 kre Exp $
+# $NetBSD: t_mixerctl.sh,v 1.3 2017/02/23 02:28:10 kre Exp $
atf_test_case noargs_usage
noargs_usage_head() {
atf_set "descr" "Ensure mixerctl(1) with no args prints a usage message"
}
noargs_usage_body() {
- if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1
+ if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 &&
+ test $(uname -m) = i386
then
# better would be for mixerctl to not open the device...
# but for now, it does.
- atf_skip "ATF qemu kernel has no audio"
+ atf_skip "i386 ATF qemu kernel has no audio"
fi
atf_check -s exit:0 -o not-empty -e ignore \
mixerctl
@@ -20,9 +21,10 @@ showvalue_head() {
atf_set "descr" "Ensure mixerctl(1) can print the value for all variables"
}
showvalue_body() {
- if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1
+ if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 &&
+ test $(uname -m) = i386
then
- atf_skip "ATF qemu kernel has no audio"
+ atf_skip "i386 ATF qemu kernel has no audio"
fi
for var in $(mixerctl -a | awk -F= '{print $1}'); do
atf_check -s exit:0 -e ignore -o match:"^${var}=" \
@@ -35,9 +37,10 @@ nflag_head() {
atf_set "descr" "Ensure 'mixerctl -n' actually suppresses some output"
}
nflag_body() {
- if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1
+ if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 &&
+ test $(uname -m) = i386
then
- atf_skip "ATF qemu kernel has no audio"
+ atf_skip "i386 ATF qemu kernel has no audio"
fi
varname="$(mixerctl -a | sed -e 's/=.*//' -e q)"