Commit 23581ea8 authored by Andrew Jones's avatar Andrew Jones Committed by Paolo Bonzini

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: default avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 562b6b08
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment