[kvm-unit-tests PATCH] scripts: Search the entire string for the correct accelerator

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

 



Search the entire ACCEL string for the required accelerator as searching
for an exact match incorrectly rejects ACCEL when additional accelerator
specific options are provided, e.g.

  SKIP pmu (kvm only, but ACCEL=kvm,kernel_irqchip=on)

Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
 scripts/runtime.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index 4b9c7d6b..59d1727c 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -126,7 +126,7 @@ function run()
         machine="$MACHINE"
     fi
 
-    if [ -n "$accel" ] && [ -n "$ACCEL" ] && [ "$accel" != "$ACCEL" ]; then
+    if [ -n "$accel" ] && [ -n "$ACCEL" ] && [[ ! "$ACCEL" =~ $accel ]]; then
         print_result "SKIP" $testname "" "$accel only, but ACCEL=$ACCEL"
         return 2
     elif [ -n "$ACCEL" ]; then

base-commit: 0d3cb7dd56ec255a71af867c2d76c8f4b22cd420
-- 
2.49.0.850.g28803427d3-goog





[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