Skip to contentSkip to conversation

powerpc/run: if qemu-system-ppc64 not available try for qemu-kvm

PATCH In review Balamuruhan S 2 participants 2 messages Apr 19, 2017 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/run: if qemu-system-ppc64 not available try for qemu-kvm

In RHEV 4.1 with RHEL7.3 qemu-system-ppc64 is not available and the tests skips with "qemu-system-ppc64 not found." instead qemu-kvm is available in /usr/libexec and can be used to proceed the test.

---
 powerpc/run | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
powerpc/run +10 -2
index d92608e..ea79d35 100755
@@ -32,8 +32,16 @@ qemu="${QEMU:-qemu-system-$ARCH_NAME}"
 qpath=$(which $qemu 2>/dev/null)
 
 if [ -z "$qpath" ]; then
-	echo $qemu not found.
-	exit 2
+    # In RHEV 4.1 with RHEL7.3 qemu-system-ppc64 is not available
+    # instead qemu-kvm is available in /usr/libexec
+    echo $qemu not found trying for qemu-kvm
+    PATH=$PATH:/usr/libexec
+    qemu="${QEMU:-qemu-kvm}"
+    qpath=$(which $qemu 2>/dev/null)
+    if [ -z "$qpath" ]; then
+        echo $qemu not found.
+        exit 2
+    fi
 fi
 
 if ! $qemu -machine '?' 2>&1 | grep 'pseries' > /dev/null; then
Signature · 1 line
2.7.4
#1 lore raw
Quoted 35 lines · Balamuruhan S

In RHEV 4.1 with RHEL7.3 qemu-system-ppc64 is not available and the tests skips with "qemu-system-ppc64 not found." instead qemu-kvm is available in /usr/libexec and can be used to proceed the test.

---
 powerpc/run | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
powerpc/run +10 -2
index d92608e..ea79d35 100755
@@ -32,8 +32,16 @@ qemu="${QEMU:-qemu-system-$ARCH_NAME}"
 qpath=$(which $qemu 2>/dev/null)
 
 if [ -z "$qpath" ]; then
-	echo $qemu not found.
-	exit 2
+    # In RHEV 4.1 with RHEL7.3 qemu-system-ppc64 is not available
+    # instead qemu-kvm is available in /usr/libexec
+    echo $qemu not found trying for qemu-kvm
+    PATH=$PATH:/usr/libexec
+    qemu="${QEMU:-qemu-kvm}"
+    qpath=$(which $qemu 2>/dev/null)
+    if [ -z "$qpath" ]; then
+        echo $qemu not found.
+        exit 2
+    fi
 fi
 
 if ! $qemu -machine '?' 2>&1 | grep 'pseries' > /dev/null; then
Signature · 1 line
2.7.4

Maybe we should generalize/simply the QEMU search that x86/run does, and put it in scripts/arch-run.bash. That way we can add all alternative paths in one place and use the same search function for all arches.

Thanks,
drew