Am 26.01.2021 um 14:19 hat Vladimir Sementsov-Ogievskiy geschrieben: > 26.01.2021 15:53, Kevin Wolf wrote: > > Am 25.01.2021 um 19:50 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > v9: > > > 01: new, one more whitespace-fixing patch > > > testenv: allow case when we don't have system-arch emulator, but have > > > several for another architectures > > > change direct os.access(..., os.X_OK) calls to new helper > > > function which also check that path is a file > > > testrunner: s/fail/not run/ for 'No qualified output' > > > drop elapsed time arg for one of 'not run' results (now no > > > elapsed time for any 'not run' result) > > > > More CI fun: > > > > Traceback (most recent call last): > > File "./check", line 117, in <module> > > testfinder = TestFinder(test_dir=env.source_iotests) > > File "/builds/.../qemu/tests/qemu-iotests/findtests.py", line 53, in > > __init__ > > for line in f: > > File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode > > return codecs.ascii_decode(input, self.errors)[0] > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1591: > > ordinal not in range(128) > > Can be solved by adding encoding='utf8' to the open().. But.. Adding > it everywhere is not fun. > > So, what about just define PYTHONUTF8=1 for running check in > check-block.sh?
Ah, I didn't know this one. Yes, that's probably nicer than my attempt of adding an explicit encoding everywhere. > > Traceback (most recent call last): > > File "./check", line 112, in <module> > > env = TestEnv(imgfmt=args.imgfmt, imgproto=args.imgproto, > > File "/builds/.../qemu/tests/qemu-iotests/testenv.py", line 216, in > > __init__ > > self.qemu_default_machine = get_default_machine(self.qemu_prog) > > File "/builds/.../qemu/tests/qemu-iotests/testenv.py", line 41, in > > get_default_machine > > default_machine = next(m for m in machines if m.endswith(' (default)')) > > Looking at original check, default_machine should be empty string in this > case. > > so we need > > diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py > index 8b80425670..222395caef 100644 > --- a/tests/qemu-iotests/testenv.py > +++ b/tests/qemu-iotests/testenv.py > @@ -38,7 +38,11 @@ def get_default_machine(qemu_prog: str) -> str: > stdout=subprocess.PIPE).stdout > machines = outp.split('\n') > - default_machine = next(m for m in machines if m.endswith(' (default)')) > + try: > + default_machine = next(m for m in machines if m.endswith(' > (default)')) > + except StopIteration: > + return '' > + > default_machine = default_machine.split(' ', 1)[0] > alias_suf = ' (alias of {})'.format(default_machine) This one looks a bit nicer than mine (using None instead of an exception), too, so I'll apply this one as well for the next test cycle. Kevin