From 700ea9d2671a21a3e2f0bcc0b35a2b7607a3b907 Mon Sep 17 00:00:00 2001 From: kre Date: Thu, 23 Feb 2017 02:28:10 +0000 Subject: [PATCH] Limit previous to the i386 qemu kernels, the tests work on amd64 and sparc (which have some audio configured.) --- tests/usr.bin/mixerctl/t_mixerctl.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/usr.bin/mixerctl/t_mixerctl.sh b/tests/usr.bin/mixerctl/t_mixerctl.sh index 44350583c8bc..9a282f611ba9 100644 --- a/tests/usr.bin/mixerctl/t_mixerctl.sh +++ b/tests/usr.bin/mixerctl/t_mixerctl.sh @@ -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)"