forked from luck/tmp_suning_uos_patched
KVM: selftests: Fix unknown ucall command asserts
The TEST_ASSERT in x86_64/platform_info_test.c would have print 'ucall' instead of 'uc.cmd'. Also fix all uc.cmd format types. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
562b6b089d
commit
23581ea8ce
|
@ -106,7 +106,7 @@ int main(int argc, char *argv[])
|
|||
case UCALL_DONE:
|
||||
goto done;
|
||||
default:
|
||||
TEST_ASSERT(false, "Unknown ucall 0x%x.", uc.cmd);
|
||||
TEST_ASSERT(false, "Unknown ucall %lu", uc.cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ int main(int argc, char *argv[])
|
|||
case UCALL_DONE:
|
||||
goto done;
|
||||
default:
|
||||
TEST_ASSERT(false, "Unknown ucall 0x%x.", uc.cmd);
|
||||
TEST_ASSERT(false, "Unknown ucall %lu", uc.cmd);
|
||||
}
|
||||
|
||||
/* UCALL_SYNC is handled here. */
|
||||
|
|
|
@ -58,8 +58,7 @@ static void test_msr_platform_info_enabled(struct kvm_vm *vm)
|
|||
exit_reason_str(run->exit_reason));
|
||||
get_ucall(vm, VCPU_ID, &uc);
|
||||
TEST_ASSERT(uc.cmd == UCALL_SYNC,
|
||||
"Received ucall other than UCALL_SYNC: %u\n",
|
||||
ucall);
|
||||
"Received ucall other than UCALL_SYNC: %lu\n", uc.cmd);
|
||||
TEST_ASSERT((uc.args[1] & MSR_PLATFORM_INFO_MAX_TURBO_RATIO) ==
|
||||
MSR_PLATFORM_INFO_MAX_TURBO_RATIO,
|
||||
"Expected MSR_PLATFORM_INFO to have max turbo ratio mask: %i.",
|
||||
|
|
|
@ -160,7 +160,7 @@ int main(int argc, char *argv[])
|
|||
case UCALL_DONE:
|
||||
goto done;
|
||||
default:
|
||||
TEST_ASSERT(false, "Unknown ucall 0x%x.", uc.cmd);
|
||||
TEST_ASSERT(false, "Unknown ucall %lu", uc.cmd);
|
||||
}
|
||||
|
||||
/* UCALL_SYNC is handled here. */
|
||||
|
|
|
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
|||
TEST_ASSERT(false, "%s", (const char *)uc.args[0]);
|
||||
/* NOT REACHED */
|
||||
default:
|
||||
TEST_ASSERT(false, "Unknown ucall 0x%x.", uc.cmd);
|
||||
TEST_ASSERT(false, "Unknown ucall %lu", uc.cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ int main(int argc, char *argv[])
|
|||
done = true;
|
||||
break;
|
||||
default:
|
||||
TEST_ASSERT(false, "Unknown ucall 0x%x.", uc.cmd);
|
||||
TEST_ASSERT(false, "Unknown ucall %lu", uc.cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ int main(int argc, char *argv[])
|
|||
case UCALL_DONE:
|
||||
goto done;
|
||||
default:
|
||||
TEST_ASSERT(false, "Unknown ucall 0x%x.", uc.cmd);
|
||||
TEST_ASSERT(false, "Unknown ucall %lu", uc.cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user