@@ -91,18 +91,18 @@ static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid)
struct kvm_steal_time *st = addr_gva2hva(vm, (ulong)st_gva[vcpuid]);
int i;
- pr_info("VCPU%d:\n", vcpuid);
- pr_info(" steal: %lld\n", st->steal);
- pr_info(" version: %d\n", st->version);
- pr_info(" flags: %d\n", st->flags);
- pr_info(" preempted: %d\n", st->preempted);
- pr_info(" u8_pad: ");
+ printf("VCPU%d:\n", vcpuid);
+ printf(" steal: %lld\n", st->steal);
+ printf(" version: %d\n", st->version);
+ printf(" flags: %d\n", st->flags);
+ printf(" preempted: %d\n", st->preempted);
+ printf(" u8_pad: ");
for (i = 0; i < 3; ++i)
- pr_info("%d", st->u8_pad[i]);
- pr_info("\n pad: ");
+ printf("%d", st->u8_pad[i]);
+ printf("\n pad: ");
for (i = 0; i < 11; ++i)
- pr_info("%d", st->pad[i]);
- pr_info("\n");
+ printf("%d", st->pad[i]);
+ printf("\n");
}
#elif defined(__aarch64__)
@@ -211,10 +211,10 @@ static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid)
{
struct st_time *st = addr_gva2hva(vm, (ulong)st_gva[vcpuid]);
- pr_info("VCPU%d:\n", vcpuid);
- pr_info(" rev: %d\n", st->rev);
- pr_info(" attr: %d\n", st->attr);
- pr_info(" st_time: %ld\n", st->st_time);
+ printf("VCPU%d:\n", vcpuid);
+ printf(" rev: %d\n", st->rev);
+ printf(" attr: %d\n", st->attr);
+ printf(" st_time: %ld\n", st->st_time);
}
#endif
@@ -326,9 +326,6 @@ int main(int ac, char **av)
while (get_run_delay() - run_delay < MIN_RUN_DELAY_NS);
pthread_join(thread, NULL);
run_delay = get_run_delay() - run_delay;
- TEST_ASSERT(run_delay >= MIN_RUN_DELAY_NS,
- "Expected run_delay >= %ld, got %ld",
- MIN_RUN_DELAY_NS, run_delay);
/* Run VCPU again to confirm stolen time is consistent with run_delay */
run_vcpu(vm, i);
@@ -339,11 +336,11 @@ int main(int ac, char **av)
run_delay, stolen_time);
if (verbose) {
- pr_info("VCPU%d: total-stolen-time=%ld test-stolen-time=%ld", i,
+ printf("VCPU%d: total-stolen-time=%ld test-stolen-time=%ld", i,
guest_stolen_time[i], stolen_time);
if (stolen_time == run_delay)
- pr_info(" (BONUS: guest test-stolen-time even exactly matches test-run_delay)");
- pr_info("\n");
+ printf(" (BONUS: guest test-stolen-time even exactly matches test-run_delay)");
+ printf("\n");
steal_time_dump(vm, i);
}
}
Change the pr_info's to printf's as they're already guarded by verbose, so shouldn't be dependent on QUIET. Also remove a pointless TEST_ASSERT. Signed-off-by: Andrew Jones <drjones@redhat.com> --- tools/testing/selftests/kvm/steal_time.c | 37 +++++++++++------------- 1 file changed, 17 insertions(+), 20 deletions(-)