diff mbox

[3/4] rcutorture: Make -soundhw a x86 specific option

Message ID 1463629344-20471-4-git-send-email-boqun.feng@gmail.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Boqun Feng May 19, 2016, 3:42 a.m. UTC
The option "-soundhw pcspk" gives me a error on PPC as follow:

qemu-system-ppc64: ISA bus not available for pcspk

, which means this option doesn't work on ppc by default. So simply make
this an x86-specific option via identify_qemu_args().

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/functions.sh      | 1 +
 tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

Comments

Josh Triplett May 19, 2016, 4:23 a.m. UTC | #1
On Thu, May 19, 2016 at 11:42:23AM +0800, Boqun Feng wrote:
> The option "-soundhw pcspk" gives me a error on PPC as follow:
> 
> qemu-system-ppc64: ISA bus not available for pcspk
> 
> , which means this option doesn't work on ppc by default. So simply make
> this an x86-specific option via identify_qemu_args().
> 
> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>

The emulated system for RCU testing does not need sound hardware at all.
Paul added this option in commit
16c77ea7d0f4a74e49009aa2d26c275f7f93de7c to disable the default sound
hardware, saying that '"-soundhw pcspk" makes the script a bit less
dependent on odd audio libraries being installed'.  Unfortunately, it
looks like there isn't a "-soundhw none".  As far as I can tell,
currently the only way to completely eliminate sound hardware is to pass
"-nodefaults" and then explicitly specify each desired device; while
that would solve the issue, it would likely introduce *more*
hardware-specific command-line options...

I've filed two feature requests on upstream qemu to make this simpler:
https://bugs.launchpad.net/qemu/+bug/1583420 and
https://bugs.launchpad.net/qemu/+bug/1583421 .

Paul, what did you mean by "dependent on odd audio libraries"?  Did you
mean in the guest or the host?  And either way, is this something that
could potentially be solved another way?

- Josh Triplett
Paul E. McKenney May 19, 2016, 2:10 p.m. UTC | #2
On Wed, May 18, 2016 at 09:23:10PM -0700, Josh Triplett wrote:
> On Thu, May 19, 2016 at 11:42:23AM +0800, Boqun Feng wrote:
> > The option "-soundhw pcspk" gives me a error on PPC as follow:
> > 
> > qemu-system-ppc64: ISA bus not available for pcspk
> > 
> > , which means this option doesn't work on ppc by default. So simply make
> > this an x86-specific option via identify_qemu_args().
> > 
> > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> 
> The emulated system for RCU testing does not need sound hardware at all.
> Paul added this option in commit
> 16c77ea7d0f4a74e49009aa2d26c275f7f93de7c to disable the default sound
> hardware, saying that '"-soundhw pcspk" makes the script a bit less
> dependent on odd audio libraries being installed'.  Unfortunately, it
> looks like there isn't a "-soundhw none".  As far as I can tell,
> currently the only way to completely eliminate sound hardware is to pass
> "-nodefaults" and then explicitly specify each desired device; while
> that would solve the issue, it would likely introduce *more*
> hardware-specific command-line options...
> 
> I've filed two feature requests on upstream qemu to make this simpler:
> https://bugs.launchpad.net/qemu/+bug/1583420 and
> https://bugs.launchpad.net/qemu/+bug/1583421 .
> 
> Paul, what did you mean by "dependent on odd audio libraries"?  Did you
> mean in the guest or the host?  And either way, is this something that
> could potentially be solved another way?

If I remember correctly, Ubuntu 14.04 qemu refused to run the guest
without this option, but I don't recall the exact error message.
I chalked it up to my ignorance of qemu, but I would very much welcome
some way to not have to specify irrelevant hardware.  So thank you very
much for filing the bugs!

								Thanx, Paul
Josh Triplett May 19, 2016, 3:40 p.m. UTC | #3
On Thu, May 19, 2016 at 07:10:13AM -0700, Paul E. McKenney wrote:
> On Wed, May 18, 2016 at 09:23:10PM -0700, Josh Triplett wrote:
> > On Thu, May 19, 2016 at 11:42:23AM +0800, Boqun Feng wrote:
> > > The option "-soundhw pcspk" gives me a error on PPC as follow:
> > > 
> > > qemu-system-ppc64: ISA bus not available for pcspk
> > > 
> > > , which means this option doesn't work on ppc by default. So simply make
> > > this an x86-specific option via identify_qemu_args().
> > > 
> > > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > 
> > The emulated system for RCU testing does not need sound hardware at all.
> > Paul added this option in commit
> > 16c77ea7d0f4a74e49009aa2d26c275f7f93de7c to disable the default sound
> > hardware, saying that '"-soundhw pcspk" makes the script a bit less
> > dependent on odd audio libraries being installed'.  Unfortunately, it
> > looks like there isn't a "-soundhw none".  As far as I can tell,
> > currently the only way to completely eliminate sound hardware is to pass
> > "-nodefaults" and then explicitly specify each desired device; while
> > that would solve the issue, it would likely introduce *more*
> > hardware-specific command-line options...
> > 
> > I've filed two feature requests on upstream qemu to make this simpler:
> > https://bugs.launchpad.net/qemu/+bug/1583420 and
> > https://bugs.launchpad.net/qemu/+bug/1583421 .
> > 
> > Paul, what did you mean by "dependent on odd audio libraries"?  Did you
> > mean in the guest or the host?  And either way, is this something that
> > could potentially be solved another way?
> 
> If I remember correctly, Ubuntu 14.04 qemu refused to run the guest
> without this option, but I don't recall the exact error message.
> I chalked it up to my ignorance of qemu, but I would very much welcome
> some way to not have to specify irrelevant hardware.  So thank you very
> much for filing the bugs!

According to qemu upstream, qemu doesn't enable any sound hardware by
default, so I can't think of any obvious reason why adding "-soundhw
pcspkr" would make the rcutorture VM boot.  Did qemu refuse to run at
all, or did the VM start but fail during the boot process?

Could you check if you can currently run without this option?  If so,
perhaps we should just drop it for now.

- Josh Triplett
Paul E. McKenney May 19, 2016, 4:23 p.m. UTC | #4
On Thu, May 19, 2016 at 08:40:42AM -0700, Josh Triplett wrote:
> On Thu, May 19, 2016 at 07:10:13AM -0700, Paul E. McKenney wrote:
> > On Wed, May 18, 2016 at 09:23:10PM -0700, Josh Triplett wrote:
> > > On Thu, May 19, 2016 at 11:42:23AM +0800, Boqun Feng wrote:
> > > > The option "-soundhw pcspk" gives me a error on PPC as follow:
> > > > 
> > > > qemu-system-ppc64: ISA bus not available for pcspk
> > > > 
> > > > , which means this option doesn't work on ppc by default. So simply make
> > > > this an x86-specific option via identify_qemu_args().
> > > > 
> > > > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > > 
> > > The emulated system for RCU testing does not need sound hardware at all.
> > > Paul added this option in commit
> > > 16c77ea7d0f4a74e49009aa2d26c275f7f93de7c to disable the default sound
> > > hardware, saying that '"-soundhw pcspk" makes the script a bit less
> > > dependent on odd audio libraries being installed'.  Unfortunately, it
> > > looks like there isn't a "-soundhw none".  As far as I can tell,
> > > currently the only way to completely eliminate sound hardware is to pass
> > > "-nodefaults" and then explicitly specify each desired device; while
> > > that would solve the issue, it would likely introduce *more*
> > > hardware-specific command-line options...
> > > 
> > > I've filed two feature requests on upstream qemu to make this simpler:
> > > https://bugs.launchpad.net/qemu/+bug/1583420 and
> > > https://bugs.launchpad.net/qemu/+bug/1583421 .
> > > 
> > > Paul, what did you mean by "dependent on odd audio libraries"?  Did you
> > > mean in the guest or the host?  And either way, is this something that
> > > could potentially be solved another way?
> > 
> > If I remember correctly, Ubuntu 14.04 qemu refused to run the guest
> > without this option, but I don't recall the exact error message.
> > I chalked it up to my ignorance of qemu, but I would very much welcome
> > some way to not have to specify irrelevant hardware.  So thank you very
> > much for filing the bugs!
> 
> According to qemu upstream, qemu doesn't enable any sound hardware by
> default, so I can't think of any obvious reason why adding "-soundhw
> pcspkr" would make the rcutorture VM boot.  Did qemu refuse to run at
> all, or did the VM start but fail during the boot process?
> 
> Could you check if you can currently run without this option?  If so,
> perhaps we should just drop it for now.

Will do!  As soon as the current test completes.

BTW, am I the only one getting "interesting" failures in the merge
window?

							Thanx, Paul
Paul E. McKenney May 19, 2016, 7:38 p.m. UTC | #5
On Thu, May 19, 2016 at 09:23:39AM -0700, Paul E. McKenney wrote:
> On Thu, May 19, 2016 at 08:40:42AM -0700, Josh Triplett wrote:
> > On Thu, May 19, 2016 at 07:10:13AM -0700, Paul E. McKenney wrote:
> > > On Wed, May 18, 2016 at 09:23:10PM -0700, Josh Triplett wrote:
> > > > On Thu, May 19, 2016 at 11:42:23AM +0800, Boqun Feng wrote:
> > > > > The option "-soundhw pcspk" gives me a error on PPC as follow:
> > > > > 
> > > > > qemu-system-ppc64: ISA bus not available for pcspk
> > > > > 
> > > > > , which means this option doesn't work on ppc by default. So simply make
> > > > > this an x86-specific option via identify_qemu_args().
> > > > > 
> > > > > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > > > 
> > > > The emulated system for RCU testing does not need sound hardware at all.
> > > > Paul added this option in commit
> > > > 16c77ea7d0f4a74e49009aa2d26c275f7f93de7c to disable the default sound
> > > > hardware, saying that '"-soundhw pcspk" makes the script a bit less
> > > > dependent on odd audio libraries being installed'.  Unfortunately, it
> > > > looks like there isn't a "-soundhw none".  As far as I can tell,
> > > > currently the only way to completely eliminate sound hardware is to pass
> > > > "-nodefaults" and then explicitly specify each desired device; while
> > > > that would solve the issue, it would likely introduce *more*
> > > > hardware-specific command-line options...
> > > > 
> > > > I've filed two feature requests on upstream qemu to make this simpler:
> > > > https://bugs.launchpad.net/qemu/+bug/1583420 and
> > > > https://bugs.launchpad.net/qemu/+bug/1583421 .
> > > > 
> > > > Paul, what did you mean by "dependent on odd audio libraries"?  Did you
> > > > mean in the guest or the host?  And either way, is this something that
> > > > could potentially be solved another way?
> > > 
> > > If I remember correctly, Ubuntu 14.04 qemu refused to run the guest
> > > without this option, but I don't recall the exact error message.
> > > I chalked it up to my ignorance of qemu, but I would very much welcome
> > > some way to not have to specify irrelevant hardware.  So thank you very
> > > much for filing the bugs!
> > 
> > According to qemu upstream, qemu doesn't enable any sound hardware by
> > default, so I can't think of any obvious reason why adding "-soundhw
> > pcspkr" would make the rcutorture VM boot.  Did qemu refuse to run at
> > all, or did the VM start but fail during the boot process?
> > 
> > Could you check if you can currently run without this option?  If so,
> > perhaps we should just drop it for now.
> 
> Will do!  As soon as the current test completes.

And it now works just fine without the "-soundhw pcspkr".  Search me!

> BTW, am I the only one getting "interesting" failures in the merge
> window?

I will be chasing these down, but am likely to be off the grid until
Monday morning, Pacific time.  Looks like the same failure to awaken
as before, but much higher probability.

							Thanx, Paul
Josh Triplett May 19, 2016, 8:24 p.m. UTC | #6
On Thu, May 19, 2016 at 12:38:47PM -0700, Paul E. McKenney wrote:
> On Thu, May 19, 2016 at 09:23:39AM -0700, Paul E. McKenney wrote:
> > On Thu, May 19, 2016 at 08:40:42AM -0700, Josh Triplett wrote:
> > > On Thu, May 19, 2016 at 07:10:13AM -0700, Paul E. McKenney wrote:
> > > > On Wed, May 18, 2016 at 09:23:10PM -0700, Josh Triplett wrote:
> > > > > On Thu, May 19, 2016 at 11:42:23AM +0800, Boqun Feng wrote:
> > > > > > The option "-soundhw pcspk" gives me a error on PPC as follow:
> > > > > > 
> > > > > > qemu-system-ppc64: ISA bus not available for pcspk
> > > > > > 
> > > > > > , which means this option doesn't work on ppc by default. So simply make
> > > > > > this an x86-specific option via identify_qemu_args().
> > > > > > 
> > > > > > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > > > > 
> > > > > The emulated system for RCU testing does not need sound hardware at all.
> > > > > Paul added this option in commit
> > > > > 16c77ea7d0f4a74e49009aa2d26c275f7f93de7c to disable the default sound
> > > > > hardware, saying that '"-soundhw pcspk" makes the script a bit less
> > > > > dependent on odd audio libraries being installed'.  Unfortunately, it
> > > > > looks like there isn't a "-soundhw none".  As far as I can tell,
> > > > > currently the only way to completely eliminate sound hardware is to pass
> > > > > "-nodefaults" and then explicitly specify each desired device; while
> > > > > that would solve the issue, it would likely introduce *more*
> > > > > hardware-specific command-line options...
> > > > > 
> > > > > I've filed two feature requests on upstream qemu to make this simpler:
> > > > > https://bugs.launchpad.net/qemu/+bug/1583420 and
> > > > > https://bugs.launchpad.net/qemu/+bug/1583421 .
> > > > > 
> > > > > Paul, what did you mean by "dependent on odd audio libraries"?  Did you
> > > > > mean in the guest or the host?  And either way, is this something that
> > > > > could potentially be solved another way?
> > > > 
> > > > If I remember correctly, Ubuntu 14.04 qemu refused to run the guest
> > > > without this option, but I don't recall the exact error message.
> > > > I chalked it up to my ignorance of qemu, but I would very much welcome
> > > > some way to not have to specify irrelevant hardware.  So thank you very
> > > > much for filing the bugs!
> > > 
> > > According to qemu upstream, qemu doesn't enable any sound hardware by
> > > default, so I can't think of any obvious reason why adding "-soundhw
> > > pcspkr" would make the rcutorture VM boot.  Did qemu refuse to run at
> > > all, or did the VM start but fail during the boot process?
> > > 
> > > Could you check if you can currently run without this option?  If so,
> > > perhaps we should just drop it for now.
> > 
> > Will do!  As soon as the current test completes.
> 
> And it now works just fine without the "-soundhw pcspkr".  Search me!

In that case, can you replace the patch in this series making "-soundhw
pcspkr" target-specific with one removing "-soundhw pcspkr"?

- Josh Triplett
diff mbox

Patch

diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index 616180153208..77fdb46cc65a 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -171,6 +171,7 @@  identify_qemu_append () {
 identify_qemu_args () {
 	case "$1" in
 	qemu-system-x86_64|qemu-system-i386)
+		echo -soundhw pcspk
 		;;
 	qemu-system-ppc64)
 		echo -enable-kvm -M pseries -cpu POWER7 -nodefaults
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index 46cb6bc098bd..d7a3de26dd11 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -8,9 +8,9 @@ 
 #
 # Usage: kvm-test-1-run.sh config builddir resdir seconds qemu-args boot_args
 #
-# qemu-args defaults to "-enable-kvm -soundhw pcspk -nographic", along with
-#			arguments specifying the number of CPUs and other
-#			options generated from the underlying CPU architecture.
+# qemu-args defaults to "-enable-kvm -nographic", along with arguments
+#			specifying the number of CPUs and other options
+#			generated from the underlying CPU architecture.
 # boot_args defaults to value returned by the per_version_boot_params
 #			shell function.
 #
@@ -148,7 +148,7 @@  then
 fi
 
 # Generate -smp qemu argument.
-qemu_args="-enable-kvm -soundhw pcspk -nographic $qemu_args"
+qemu_args="-enable-kvm -nographic $qemu_args"
 cpu_count=`configNR_CPUS.sh $config_template`
 cpu_count=`configfrag_boot_cpus "$boot_args" "$config_template" "$cpu_count"`
 vcpus=`identify_qemu_vcpus`