Print 'qemu' fact when running in qemu environment on POWER 9 (RHBZ#1455676).
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 29 Jun 2017 09:07:38 +0000 (10:07 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 29 Jun 2017 09:07:38 +0000 (10:07 +0100)
Thanks Nageswara R. Sastry

tests/test-ppc64-kvm.sh
virt-what.in

index c691c96..3a90429 100755 (executable)
@@ -18,7 +18,8 @@
 root=tests/ppc64-kvm
 
 output="$(./virt-what --test-root=$root 2>&1)"
-expected="ibm_power-kvm"
+expected="qemu
+ibm_power-kvm"
 
 if [ "$output" != "$expected" ]; then
     echo "$0: test failed because output did not match expected"
index 1a373ed..aee10cf 100644 (file)
@@ -295,6 +295,9 @@ if ! "$skip_qemu_kvm"; then
         # another CPUID leaf for non-accelerated qemu.
         if grep -q 'QEMU' "${root}/proc/cpuinfo"; then
             echo qemu
+        # https://bugzilla.redhat.com/show_bug.cgi?id=1455676#c6
+        elif grep -q 'emulated by qemu' "${root}/proc/cpuinfo"; then
+            echo qemu
         fi
     fi
 fi