Skip to contentSkip to conversation

qemu-iotests: look for qemu-iotests-$ARCH

PATCH In review Christoph Hellwig 2 participants 5 messages Jul 7, 2009 – Jul 8, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-iotests: look for qemu-iotests-$ARCH

Look for the binary as installed by qemu make install instead of requiring the qemu symlink. Note that we need a couple of regular expressions to munge the uname output into the architecture name qemu expects.

common.config +11 -1
index a594632..0a8d5b4 100644
@@ -39,6 +39,16 @@ PATH=".:$PATH"
 
 HOST=`hostname -s`
 HOSTOS=`uname -s`
+ARCH=`uname -m | \
+	sed -e s/i.86/x86_64/ \
+	    -e s/sun4u/sparc/ \
+	    -e s/arm.*/arm/ \
+	    -e s/sa110/arm/ \
+	    -e s/s390x/s390/ \
+	    -e s/parisc.*/hppa/ \
+	    -e s/ppc.*/powerpc/ \
+	    -e s/mips.*/mips/ \
+	    -e s/sh[234].*/sh/`
 
 EMAIL=root@localhost    # where auto-qa will send its status messages
 export HOST_OPTIONS=${HOST_OPTIONS:=local.config}
@@ -88,7 +98,7 @@ export BC_PROG="`set_prog_path bc`"
 
 export PS_ALL_FLAGS="-ef"
 
-export QEMU_PROG="`set_prog_path qemu`"
+export QEMU_PROG="`set_prog_path qemu-system-$ARCH`"
 [ "$QEMU_PROG" = "" ] && _fatal "qemu not found"
 
 export QEMU_IMG_PROG="`set_prog_path qemu-img`"
#1 lore raw
Quoted 4 lines · Christoph Hellwig

Look for the binary as installed by qemu make install instead of requiring the qemu symlink. Note that we need a couple of regular expressions to munge the uname output into the architecture name qemu expects.

I don't completely understand your goal here. Why would you want to use the host architecture for the guest, too? If anything this makes tests behave differently on different hosts. If, say, qemu-system-x86_64 is available depends on the configure options rather than on the host. And qemu isn't a symlink AFAIK, but the traditional name of qemu-system-i386 (or has this changed recently?).

Kevin

#2 lore raw
Quoted 6 lines · Kevin Wolf
Quoted 4 lines · Christoph Hellwig

Look for the binary as installed by qemu make install instead of requiring the qemu symlink. Note that we need a couple of regular expressions to munge the uname output into the architecture name qemu expects.

Quoted 6 lines

I don't completely understand your goal here. Why would you want to use the host architecture for the guest, too? If anything this makes tests behave differently on different hosts. If, say, qemu-system-x86_64 is available depends on the configure options rather than on the host. And qemu isn't a symlink AFAIK, but the traditional name of qemu-system-i386 (or has this changed recently?).

I did this from the kvm point of view where normally host equals guest (modulo differences like i386 vs x86_64). In my installation qemu was a symlink, not sure if this was the original or if I did it manually at some point.

So what method of finding a suitable qemu binary do you suggest instead? I'm pretty open for doing anything that works.

#3 lore raw
Quoted 13 lines · Christoph Hellwig
Quoted 11 lines · Kevin Wolf
Quoted 4 lines · Christoph Hellwig

Look for the binary as installed by qemu make install instead of requiring the qemu symlink. Note that we need a couple of regular expressions to munge the uname output into the architecture name qemu expects.

I don't completely understand your goal here. Why would you want to use the host architecture for the guest, too? If anything this makes tests behave differently on different hosts. If, say, qemu-system-x86_64 is available depends on the configure options rather than on the host. And qemu isn't a symlink AFAIK, but the traditional name of qemu-system-i386 (or has this changed recently?).

Quoted 4 lines

I did this from the kvm point of view where normally host equals guest (modulo differences like i386 vs x86_64). In my installation qemu was a symlink, not sure if this was the original or if I did it manually at some point.

I'm not sure that the KVM point of view really matters here. I can see two possible use cases for qemu: Either we just start it up without a guest OS to do things like a simple savevm, then TCG is just as good. Or we boot up a guest OS, then we obviously need the architecture matching the guest, not the host.

Quoted 2 lines

So what method of finding a suitable qemu binary do you suggest instead? I'm pretty open for doing anything that works.

Maybe something like trying qemu-system-x86_64, then qemu-kvm, then qemu? We could use i386 guests on every host then. If it's accelerated with KVM, kqemu or not at all doesn't really matter.

Kevin

#4 lore raw
Quoted 5 lines · Kevin Wolf

I'm not sure that the KVM point of view really matters here. I can see two possible use cases for qemu: Either we just start it up without a guest OS to do things like a simple savevm, then TCG is just as good. Or we boot up a guest OS, then we obviously need the architecture matching the guest, not the host.

Right now we don't use any guest so that it doesn't really matter. If we actually end up running a guest we should agree on an architecture, and also boundle the require guest (which would have to be a really minimal one) in the qemu-iotests repository. But for now I'd just avoid requiring any guests.

Quoted 3 lines

Maybe something like trying qemu-system-x86_64, then qemu-kvm, then qemu? We could use i386 guests on every host then. If it's accelerated with KVM, kqemu or not at all doesn't really matter.

Ok, fine with me. I'll respin the patch.