Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: selftests: Convert some printf's to pr_info's

We leave some printf's because they inform the user the test is being
skipped. QUIET should not disable those. We also leave the printf's
used for help text.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Andrew Jones and committed by
Paolo Bonzini
244c6b6d 3439d886

+13 -13
+4 -4
tools/testing/selftests/kvm/kvm_create_max_vcpus.c
··· 24 24 struct kvm_vm *vm; 25 25 int i; 26 26 27 - printf("Testing creating %d vCPUs, with IDs %d...%d.\n", 28 - num_vcpus, first_vcpu_id, first_vcpu_id + num_vcpus - 1); 27 + pr_info("Testing creating %d vCPUs, with IDs %d...%d.\n", 28 + num_vcpus, first_vcpu_id, first_vcpu_id + num_vcpus - 1); 29 29 30 30 vm = vm_create(VM_MODE_DEFAULT, DEFAULT_GUEST_PHY_PAGES, O_RDWR); 31 31 ··· 41 41 int kvm_max_vcpu_id = kvm_check_cap(KVM_CAP_MAX_VCPU_ID); 42 42 int kvm_max_vcpus = kvm_check_cap(KVM_CAP_MAX_VCPUS); 43 43 44 - printf("KVM_CAP_MAX_VCPU_ID: %d\n", kvm_max_vcpu_id); 45 - printf("KVM_CAP_MAX_VCPUS: %d\n", kvm_max_vcpus); 44 + pr_info("KVM_CAP_MAX_VCPU_ID: %d\n", kvm_max_vcpu_id); 45 + pr_info("KVM_CAP_MAX_VCPUS: %d\n", kvm_max_vcpus); 46 46 47 47 /* 48 48 * Upstream KVM prior to 4.8 does not support KVM_CAP_MAX_VCPU_ID.
+3 -3
tools/testing/selftests/kvm/s390x/resets.c
··· 134 134 135 135 static void test_normal(void) 136 136 { 137 - printf("Testing normal reset\n"); 137 + pr_info("Testing normal reset\n"); 138 138 /* Create VM */ 139 139 vm = vm_create_default(VCPU_ID, 0, guest_code_initial); 140 140 run = vcpu_state(vm, VCPU_ID); ··· 151 151 152 152 static void test_initial(void) 153 153 { 154 - printf("Testing initial reset\n"); 154 + pr_info("Testing initial reset\n"); 155 155 vm = vm_create_default(VCPU_ID, 0, guest_code_initial); 156 156 run = vcpu_state(vm, VCPU_ID); 157 157 regs = &run->s.regs; ··· 168 168 169 169 static void test_clear(void) 170 170 { 171 - printf("Testing clear reset\n"); 171 + pr_info("Testing clear reset\n"); 172 172 vm = vm_create_default(VCPU_ID, 0, guest_code_initial); 173 173 run = vcpu_state(vm, VCPU_ID); 174 174 regs = &run->s.regs;
+1 -1
tools/testing/selftests/kvm/x86_64/mmio_warning_test.c
··· 44 44 struct kvm_run *run = tc->run; 45 45 46 46 res = ioctl(kvmcpu, KVM_RUN, 0); 47 - printf("ret1=%d exit_reason=%d suberror=%d\n", 47 + pr_info("ret1=%d exit_reason=%d suberror=%d\n", 48 48 res, run->exit_reason, run->internal.suberror); 49 49 50 50 return 0;
+1 -1
tools/testing/selftests/kvm/x86_64/smm_test.c
··· 117 117 vcpu_alloc_vmx(vm, &vmx_pages_gva); 118 118 vcpu_args_set(vm, VCPU_ID, 1, vmx_pages_gva); 119 119 } else { 120 - printf("will skip SMM test with VMX enabled\n"); 120 + pr_info("will skip SMM test with VMX enabled\n"); 121 121 vcpu_args_set(vm, VCPU_ID, 1, 0); 122 122 } 123 123
+1 -1
tools/testing/selftests/kvm/x86_64/state_test.c
··· 139 139 vcpu_alloc_vmx(vm, &vmx_pages_gva); 140 140 vcpu_args_set(vm, VCPU_ID, 1, vmx_pages_gva); 141 141 } else { 142 - printf("will skip nested state checks\n"); 142 + pr_info("will skip nested state checks\n"); 143 143 vcpu_args_set(vm, VCPU_ID, 1, 0); 144 144 } 145 145
+2 -2
tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c
··· 121 121 122 122 static void report(int64_t val) 123 123 { 124 - printf("IA32_TSC_ADJUST is %ld (%lld * TSC_ADJUST_VALUE + %lld).\n", 125 - val, val / TSC_ADJUST_VALUE, val % TSC_ADJUST_VALUE); 124 + pr_info("IA32_TSC_ADJUST is %ld (%lld * TSC_ADJUST_VALUE + %lld).\n", 125 + val, val / TSC_ADJUST_VALUE, val % TSC_ADJUST_VALUE); 126 126 } 127 127 128 128 int main(int argc, char *argv[])
+1 -1
tools/testing/selftests/kvm/x86_64/xss_msr_test.c
··· 51 51 xss_supported = entry && !!(entry->eax & X86_FEATURE_XSAVES); 52 52 } 53 53 if (!xss_supported) { 54 - printf("IA32_XSS is not supported by the vCPU.\n"); 54 + printf("IA32_XSS is not supported by the vCPU, skipping test\n"); 55 55 exit(KSFT_SKIP); 56 56 } 57 57