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.
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.
r~