qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] iotests: Revert emulator selection to old behaviour


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH] iotests: Revert emulator selection to old behaviour
Date: Tue, 2 Feb 2021 18:48:42 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

02.02.2021 17:28, Kevin Wolf wrote:
If the qemu-system-{arch} binary for the host architecture can't be
found, the old 'check' implementation selected the alphabetically first
system emulator binary that it could find. The new Python implementation
just uses the first result of glob.iglob(), which has an undefined
order.

This is a problem that breaks CI because the iotests aren't actually
prepared to run on any emulator. They should be, so this is really a bug
in the failing test cases that should be fixed there, but as a quick
fix, let's revert to the old behaviour to let CI runs succeed again.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
  tests/qemu-iotests/testenv.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py
index b31275f518..1fbec854c1 100644
--- a/tests/qemu-iotests/testenv.py
+++ b/tests/qemu-iotests/testenv.py
@@ -135,7 +135,7 @@ class TestEnv(ContextManager['TestEnv']):
          if not os.path.exists(self.qemu_prog):
              pattern = root('qemu-system-*')
              try:
-                progs = glob.iglob(pattern)
+                progs = sorted(glob.iglob(pattern))
                  self.qemu_prog = next(p for p in progs if isxfile(p))
              except StopIteration:
                  sys.exit("Not found any Qemu executable binary by pattern "


Great that you find the problem! Anyway sorted is better than random. Probably 
we should print some warning when we have to chose from several binaries.. But 
nobody will read it anyway.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]