[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v16 08/99] qtest/migration-test: Skip tests if KVM not builti
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v16 08/99] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64 |
Date: |
Tue, 8 Jun 2021 10:26:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 6/4/21 11:11 PM, Richard Henderson wrote:
> On 6/4/21 8:51 AM, Alex Bennée wrote:
>> if (g_str_equal(qtest_get_arch(), "ppc64") &&
>> (access("/sys/module/kvm_hv", F_OK) ||
>> - access("/dev/kvm", R_OK | W_OK))) {
>> + access("/dev/kvm", R_OK | W_OK) || !qtest_has_accel("kvm"))) {
>> g_test_message("Skipping test: kvm_hv not available");
>> return g_test_run();
>> }
>> @@ -1398,7 +1398,7 @@ int main(int argc, char **argv)
>> */
>> if (g_str_equal(qtest_get_arch(), "s390x")) {
>> #if defined(HOST_S390X)
>> - if (access("/dev/kvm", R_OK | W_OK)) {
>> + if (access("/dev/kvm", R_OK | W_OK) ||
>> !qtest_has_accel("kvm")) {
>> g_test_message("Skipping test: kvm not available");
>
> I would have sorted the kvm test first.
access() is a simple syscall from the qtest, while qtest_has_accel()
spawn a whole QEMU process to exec the QMP request.
> For s390x, we has the HOST test, but ppc doesn't. So we're doing the
> access() on any host, e.g. x86_64, where kvm cannot true for this test.
Hmm I suppose the issue you described predate this patch?
- Re: [PATCH v16 04/99] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM, (continued)
[PATCH v16 05/99] qtest/arm-cpu-features: Restrict sve_tests_sve_off_kvm test to KVM, Alex Bennée, 2021/06/04
[PATCH v16 03/99] qtest: Add qtest_has_accel() method, Alex Bennée, 2021/06/04
[PATCH v16 08/99] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64, Alex Bennée, 2021/06/04
[PATCH v16 06/99] qtest/arm-cpu-features: Remove TCG fallback to KVM specific tests, Alex Bennée, 2021/06/04
[PATCH v16 07/99] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for TCG, Alex Bennée, 2021/06/04
[PATCH v16 09/99] qtest/bios-tables-test: Rename tests not TCG specific, Alex Bennée, 2021/06/04