[PATCH] kvm-unit-tests: really use QEMU_ACCEL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to README.md, users can set QEMU_ACCEL to specify
kvm or tcg. However, get_qemu_acceletor() uses ACCEL instead,
which is wrong since ACCEL is an "internal" variable. The end
result is that tests will still run if the user wants to use
kvm but kvm is unavailable. Fix get_qemu_acceletor() to use
QEMU_ACCEL.

Signed-off-by: Luiz Capitulino <lcapitulino@xxxxxxxxxx>
---
 scripts/arch-run.bash | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index d3ca19d..0997569 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -317,13 +317,13 @@ kvm_available ()
 
 get_qemu_accelerator ()
 {
-	if [ "$ACCEL" = "kvm" ] && ! kvm_available; then
+	if [ "$QEMU_ACCEL" = "kvm" ] && ! kvm_available; then
 		echo "KVM is needed, but not available on this host" >&2
 		return 2
 	fi
 
-	if [ "$ACCEL" ]; then
-		echo $ACCEL
+	if [ "$QEMU_ACCEL" ]; then
+		echo $QEMU_ACCEL
 	elif kvm_available; then
 		echo kvm
 	else
-- 
2.17.2




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux