[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v4 11/15] tests/qemu-iotests: Allow passing a -cpu option
From: |
Richard Henderson |
Subject: |
Re: [RFC PATCH v4 11/15] tests/qemu-iotests: Allow passing a -cpu option in the QEMU cmdline |
Date: |
Thu, 19 Jan 2023 09:09:42 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 1/19/23 03:54, Fabiano Rosas wrote:
+ cpu_map = (
+ ('aarch64', 'cortex-a57'),
+ )
This isn't a map...
+ for suffix, cpu in cpu_map:
+ if self.qemu_prog.endswith(f'qemu-system-{suffix}'):
+ self.qemu_options += f' -cpu {cpu}'
... which causes you to use a loop here, instead of a map lookup.
Also, not keen on cortex-a57 vs max, again.
You want something like
cpu_map = {
'aarch64': 'max'
}
m = re.match('qemu-system-(.*)', self.qemu_prog)
if m and m.group(1) in cpu_map:
self.qemu_options += ' -cpu ' + cpu_map[m.group(1)]
My python is rough, so take that with a lot of testing...
r~
- Re: [RFC PATCH v4 06/15] tests/qtest: Add qtest_get_machine_args, (continued)
- [RFC PATCH v4 07/15] tests/qtest: Adjust qom-test to always set a -cpu option, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 08/15] tests/qtest: Adjust test-hmp to always pass -cpu option, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 09/15] tests/qtest: Adjust device-introspect-test to always set a -cpu option, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 10/15] tests/qtest: aarch64: Set -cpu for numa-test, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 11/15] tests/qemu-iotests: Allow passing a -cpu option in the QEMU cmdline, Fabiano Rosas, 2023/01/19
- Re: [RFC PATCH v4 11/15] tests/qemu-iotests: Allow passing a -cpu option in the QEMU cmdline,
Richard Henderson <=
- [RFC PATCH v4 12/15] tests/tcg: Do not build/run TCG tests if TCG is disabled, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 13/15] target/avocado: Pass parameters to migration test on aarch64, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 15/15] arm/Kconfig: Do not build TCG-only boards on a KVM-only build, Fabiano Rosas, 2023/01/19