linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC
@ 2016-05-19  3:42 Boqun Feng
  2016-05-19  3:42 ` [PATCH 1/4] rcutorture/doc: Add a new way to create initrd using dracut Boqun Feng
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Boqun Feng @ 2016-05-19  3:42 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev
  Cc: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Boqun Feng

I spend some time to make tools/testing/selftest/rcutorture run on PPC,
here are some documention and fixes made while I was trying.

The scripts are able to run and get results on PPC, however please
note there are some stalls even build errors that could be found
by the tests currently.

As I'm certainly not an expert of qemu or bash programming, there
may be something I am missing in those patches. So tests and comments
are welcome ;-)

Regards,
Boqun

Boqun Feng (4):
  rcutorture/doc: Add a new way to create initrd using dracut
  rcutorture: Use vmlinux as the fallback kernel image
  rcutorture: Make -soundhw a x86 specific option
  rcutorture: Don't specify the cpu type of QEMU on PPC

 .../testing/selftests/rcutorture/bin/functions.sh  | 13 ++++++-------
 .../selftests/rcutorture/bin/kvm-test-1-run.sh     | 13 +++++++------
 tools/testing/selftests/rcutorture/doc/initrd.txt  | 22 ++++++++++++++++++++++
 3 files changed, 35 insertions(+), 13 deletions(-)

-- 
2.8.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/4] rcutorture/doc: Add a new way to create initrd using dracut
  2016-05-19  3:42 [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC Boqun Feng
@ 2016-05-19  3:42 ` Boqun Feng
  2016-05-19  3:42 ` [PATCH 2/4] rcutorture: Use vmlinux as the fallback kernel image Boqun Feng
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Boqun Feng @ 2016-05-19  3:42 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev
  Cc: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Boqun Feng

Using dracut is another way to get an initramfs for kvm based rcu
torture tests, which is more flexible than using the host's initramfs
image, because modules and binaries may be added or removed via dracut
command options. So add an example in the document, in case that there
are some situations where host's initramfs couldn't be used.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
---
 tools/testing/selftests/rcutorture/doc/initrd.txt | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/doc/initrd.txt b/tools/testing/selftests/rcutorture/doc/initrd.txt
index 4170e714f044..833f826d6ec2 100644
--- a/tools/testing/selftests/rcutorture/doc/initrd.txt
+++ b/tools/testing/selftests/rcutorture/doc/initrd.txt
@@ -13,6 +13,22 @@ cd initrd
 cpio -id < /tmp/initrd.img.zcat
 ------------------------------------------------------------------------
 
+Another way to create an initramfs image is using "dracut"[1], which is
+available on many distros, however the initramfs dracut generates is a cpio
+archive with another cpio archive in it, so an extra step is needed to create
+the initrd directory hierarchy.
+
+Here are the commands to create a initrd directory for rcutorture using
+dracut:
+
+------------------------------------------------------------------------
+dracut --no-hostonly --no-hostonly-cmdline --module "base bash shutdown" /tmp/initramfs.img
+cd tools/testing/selftests/rcutorture
+mkdir initrd
+cd initrd
+/usr/lib/dracut/skipcpio /tmp/initramfs.img | zcat | cpio -id < /tmp/initramfs.img
+------------------------------------------------------------------------
+
 Interestingly enough, if you are running rcutorture, you don't really
 need userspace in many cases.  Running without userspace has the
 advantage of allowing you to test your kernel independently of the
@@ -89,3 +105,9 @@ while :
 do
 	sleep 10
 done
+------------------------------------------------------------------------
+
+References:
+[1]: https://dracut.wiki.kernel.org/index.php/Main_Page
+[2]: http://blog.elastocloud.org/2015/06/rapid-linux-kernel-devtest-with-qemu.html
+[3]: https://www.centos.org/forums/viewtopic.php?t=51621
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/4] rcutorture: Use vmlinux as the fallback kernel image
  2016-05-19  3:42 [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC Boqun Feng
  2016-05-19  3:42 ` [PATCH 1/4] rcutorture/doc: Add a new way to create initrd using dracut Boqun Feng
@ 2016-05-19  3:42 ` Boqun Feng
  2016-05-19  3:42 ` [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option Boqun Feng
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Boqun Feng @ 2016-05-19  3:42 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev
  Cc: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Boqun Feng

vmlinux is available for all the architectures, and suitable for running
a KVM guest by QEMU, besides, we used to copy the vmlinux to $resdir
anyway. Therefore it makes sense to use it as the fallback kernel image
for rcutorture KVM tests.

This patch makes identify_boot_image() return vmlinux if
${TORTURE_BOOT_IMAGE} is not set on non-x86 architectures, also fixes
several places that hard-code "bzImage" as $KERNEL.

This also fixes a problem that PPC doesn't have a bzImage file as build
results.

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

diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index b325470c01b3..616180153208 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -99,8 +99,9 @@ configfrag_hotplug_cpu () {
 # identify_boot_image qemu-cmd
 #
 # Returns the relative path to the kernel build image.  This will be
-# arch/<arch>/boot/bzImage unless overridden with the TORTURE_BOOT_IMAGE
-# environment variable.
+# arch/<arch>/boot/bzImage or vmlinux if bzImage is not a target for the
+# architecture, unless overridden with the TORTURE_BOOT_IMAGE environment
+# variable.
 identify_boot_image () {
 	if test -n "$TORTURE_BOOT_IMAGE"
 	then
@@ -110,11 +111,8 @@ identify_boot_image () {
 		qemu-system-x86_64|qemu-system-i386)
 			echo arch/x86/boot/bzImage
 			;;
-		qemu-system-ppc64)
-			echo arch/powerpc/boot/bzImage
-			;;
 		*)
-			echo ""
+			echo vmlinux
 			;;
 		esac
 	fi
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 4109f306d855..46cb6bc098bd 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -96,7 +96,8 @@ if test "$base_resdir" != "$resdir" -a -f $base_resdir/bzImage -a -f $base_resdi
 then
 	# Rerunning previous test, so use that test's kernel.
 	QEMU="`identify_qemu $base_resdir/vmlinux`"
-	KERNEL=$base_resdir/bzImage
+	BOOT_IMAGE="`identify_boot_image $QEMU`"
+	KERNEL=$base_resdir/${BOOT_IMAGE##*/} # use the last component of ${BOOT_IMAGE}
 	ln -s $base_resdir/Make*.out $resdir  # for kvm-recheck.sh
 	ln -s $base_resdir/.config $resdir  # for kvm-recheck.sh
 elif kvm-build.sh $config_template $builddir $T
@@ -110,7 +111,7 @@ then
 	if test -n "$BOOT_IMAGE"
 	then
 		cp $builddir/$BOOT_IMAGE $resdir
-		KERNEL=$resdir/bzImage
+		KERNEL=$resdir/${BOOT_IMAGE##*/}
 	else
 		echo No identifiable boot image, not running KVM, see $resdir.
 		echo Do the torture scripts know about your architecture?
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option
  2016-05-19  3:42 [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC Boqun Feng
  2016-05-19  3:42 ` [PATCH 1/4] rcutorture/doc: Add a new way to create initrd using dracut Boqun Feng
  2016-05-19  3:42 ` [PATCH 2/4] rcutorture: Use vmlinux as the fallback kernel image Boqun Feng
@ 2016-05-19  3:42 ` Boqun Feng
  2016-05-19  4:23   ` Josh Triplett
  2016-05-19  3:42 ` [PATCH 4/4] rcutorture: Don't specify the cpu type of QEMU on PPC Boqun Feng
  2016-05-19  4:25 ` [PATCH 0/4] rcutorture: Several fixes to run selftest scripts " Josh Triplett
  4 siblings, 1 reply; 14+ messages in thread
From: Boqun Feng @ 2016-05-19  3:42 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev
  Cc: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Boqun Feng

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(-)

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`
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/4] rcutorture: Don't specify the cpu type of QEMU on PPC
  2016-05-19  3:42 [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC Boqun Feng
                   ` (2 preceding siblings ...)
  2016-05-19  3:42 ` [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option Boqun Feng
@ 2016-05-19  3:42 ` Boqun Feng
  2016-05-19  4:25 ` [PATCH 0/4] rcutorture: Several fixes to run selftest scripts " Josh Triplett
  4 siblings, 0 replies; 14+ messages in thread
From: Boqun Feng @ 2016-05-19  3:42 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev
  Cc: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Boqun Feng

Do not restrict the cpu type to POWER7 for QEMU as we have POWER8 now.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index 77fdb46cc65a..56ac202859eb 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -174,7 +174,7 @@ identify_qemu_args () {
 		echo -soundhw pcspk
 		;;
 	qemu-system-ppc64)
-		echo -enable-kvm -M pseries -cpu POWER7 -nodefaults
+		echo -enable-kvm -M pseries -nodefaults
 		echo -device spapr-vscsi
 		if test -n "$TORTURE_QEMU_INTERACTIVE" -a -n "$TORTURE_QEMU_MAC"
 		then
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option
  2016-05-19  3:42 ` [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option Boqun Feng
@ 2016-05-19  4:23   ` Josh Triplett
  2016-05-19 14:10     ` Paul E. McKenney
  0 siblings, 1 reply; 14+ messages in thread
From: Josh Triplett @ 2016-05-19  4:23 UTC (permalink / raw)
  To: Boqun Feng
  Cc: linux-kernel, linuxppc-dev, Paul E. McKenney, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC
  2016-05-19  3:42 [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC Boqun Feng
                   ` (3 preceding siblings ...)
  2016-05-19  3:42 ` [PATCH 4/4] rcutorture: Don't specify the cpu type of QEMU on PPC Boqun Feng
@ 2016-05-19  4:25 ` Josh Triplett
  2016-05-19 14:14   ` Paul E. McKenney
  4 siblings, 1 reply; 14+ messages in thread
From: Josh Triplett @ 2016-05-19  4:25 UTC (permalink / raw)
  To: Boqun Feng
  Cc: linux-kernel, linuxppc-dev, Paul E. McKenney, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

On Thu, May 19, 2016 at 11:42:20AM +0800, Boqun Feng wrote:
> I spend some time to make tools/testing/selftest/rcutorture run on PPC,
> here are some documention and fixes made while I was trying.
> 
> The scripts are able to run and get results on PPC, however please
> note there are some stalls even build errors that could be found
> by the tests currently.
> 
> As I'm certainly not an expert of qemu or bash programming, there
> may be something I am missing in those patches. So tests and comments
> are welcome ;-)
> 
> Regards,
> Boqun
> 
> Boqun Feng (4):
>   rcutorture/doc: Add a new way to create initrd using dracut
>   rcutorture: Use vmlinux as the fallback kernel image
>   rcutorture: Make -soundhw a x86 specific option
>   rcutorture: Don't specify the cpu type of QEMU on PPC

All four of these seem reasonable to me:
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

I responded to the -soundhw patch, trying to track down why that option
was needed in the first place, and seeking a solution that doesn't
require adding to the set of target-specific options.  But I don't think
that investigation should block your fix.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option
  2016-05-19  4:23   ` Josh Triplett
@ 2016-05-19 14:10     ` Paul E. McKenney
  2016-05-19 15:40       ` Josh Triplett
  0 siblings, 1 reply; 14+ messages in thread
From: Paul E. McKenney @ 2016-05-19 14:10 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Boqun Feng, linux-kernel, linuxppc-dev, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC
  2016-05-19  4:25 ` [PATCH 0/4] rcutorture: Several fixes to run selftest scripts " Josh Triplett
@ 2016-05-19 14:14   ` Paul E. McKenney
  0 siblings, 0 replies; 14+ messages in thread
From: Paul E. McKenney @ 2016-05-19 14:14 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Boqun Feng, linux-kernel, linuxppc-dev, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

On Wed, May 18, 2016 at 09:25:17PM -0700, Josh Triplett wrote:
> On Thu, May 19, 2016 at 11:42:20AM +0800, Boqun Feng wrote:
> > I spend some time to make tools/testing/selftest/rcutorture run on PPC,
> > here are some documention and fixes made while I was trying.
> > 
> > The scripts are able to run and get results on PPC, however please
> > note there are some stalls even build errors that could be found
> > by the tests currently.
> > 
> > As I'm certainly not an expert of qemu or bash programming, there
> > may be something I am missing in those patches. So tests and comments
> > are welcome ;-)
> > 
> > Regards,
> > Boqun
> > 
> > Boqun Feng (4):
> >   rcutorture/doc: Add a new way to create initrd using dracut
> >   rcutorture: Use vmlinux as the fallback kernel image
> >   rcutorture: Make -soundhw a x86 specific option
> >   rcutorture: Don't specify the cpu type of QEMU on PPC
> 
> All four of these seem reasonable to me:
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Thank you both!  I have queued all four for further review and for
testing.

> I responded to the -soundhw patch, trying to track down why that option
> was needed in the first place, and seeking a solution that doesn't
> require adding to the set of target-specific options.  But I don't think
> that investigation should block your fix.

Agreed, it should work better now than it did before!

							Thanx, Paul

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option
  2016-05-19 14:10     ` Paul E. McKenney
@ 2016-05-19 15:40       ` Josh Triplett
  2016-05-19 16:23         ` Paul E. McKenney
  0 siblings, 1 reply; 14+ messages in thread
From: Josh Triplett @ 2016-05-19 15:40 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Boqun Feng, linux-kernel, linuxppc-dev, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option
  2016-05-19 15:40       ` Josh Triplett
@ 2016-05-19 16:23         ` Paul E. McKenney
  2016-05-19 19:38           ` Paul E. McKenney
  0 siblings, 1 reply; 14+ messages in thread
From: Paul E. McKenney @ 2016-05-19 16:23 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Boqun Feng, linux-kernel, linuxppc-dev, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option
  2016-05-19 16:23         ` Paul E. McKenney
@ 2016-05-19 19:38           ` Paul E. McKenney
  2016-05-19 20:24             ` Josh Triplett
  0 siblings, 1 reply; 14+ messages in thread
From: Paul E. McKenney @ 2016-05-19 19:38 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Boqun Feng, linux-kernel, linuxppc-dev, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option
  2016-05-19 19:38           ` Paul E. McKenney
@ 2016-05-19 20:24             ` Josh Triplett
  2016-05-23 21:21               ` Paul E. McKenney
  0 siblings, 1 reply; 14+ messages in thread
From: Josh Triplett @ 2016-05-19 20:24 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Boqun Feng, linux-kernel, linuxppc-dev, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option
  2016-05-19 20:24             ` Josh Triplett
@ 2016-05-23 21:21               ` Paul E. McKenney
  0 siblings, 0 replies; 14+ messages in thread
From: Paul E. McKenney @ 2016-05-23 21:21 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Boqun Feng, linux-kernel, linuxppc-dev, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan

On Thu, May 19, 2016 at 01:24:12PM -0700, Josh Triplett wrote:
> 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"?

Fair point!  I queued the patch below, and am now testing it.

							Thanx, Paul

------------------------------------------------------------------------

commit d6126c701fe19c965cbb54cd5221da0db3287135
Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Date:   Mon May 23 14:18:48 2016 -0700

    rcutorture: Drop "-soundhw pcspkr" from x86 boot arguments
    
    Because recent testing shows that "-soundhw pcspkr" is no longer required
    in the kernel boot arguments, this commit drops this qemu argument.
    
    Reported-by: Josh Triplett <josh@joshtriplett.org>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index 56ac202859eb..1426a9b97494 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -171,7 +171,6 @@ 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 -nodefaults

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-05-23 21:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-19  3:42 [PATCH 0/4] rcutorture: Several fixes to run selftest scripts on PPC Boqun Feng
2016-05-19  3:42 ` [PATCH 1/4] rcutorture/doc: Add a new way to create initrd using dracut Boqun Feng
2016-05-19  3:42 ` [PATCH 2/4] rcutorture: Use vmlinux as the fallback kernel image Boqun Feng
2016-05-19  3:42 ` [PATCH 3/4] rcutorture: Make -soundhw a x86 specific option Boqun Feng
2016-05-19  4:23   ` Josh Triplett
2016-05-19 14:10     ` Paul E. McKenney
2016-05-19 15:40       ` Josh Triplett
2016-05-19 16:23         ` Paul E. McKenney
2016-05-19 19:38           ` Paul E. McKenney
2016-05-19 20:24             ` Josh Triplett
2016-05-23 21:21               ` Paul E. McKenney
2016-05-19  3:42 ` [PATCH 4/4] rcutorture: Don't specify the cpu type of QEMU on PPC Boqun Feng
2016-05-19  4:25 ` [PATCH 0/4] rcutorture: Several fixes to run selftest scripts " Josh Triplett
2016-05-19 14:14   ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).