tools/testing/selftests/kvm/loongarch/pmu_test.c

Source file repositories/reference/linux-study-clean/tools/testing/selftests/kvm/loongarch/pmu_test.c

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/kvm/loongarch/pmu_test.c
Extension
.c
Size
5505 bytes
Lines
206
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

switch (get_ucall(vcpu, &uc)) {
		case UCALL_PRINTF:
			printf("%s", (const char *)uc.buffer);
			break;
		case UCALL_DONE:
			printf("PMU test PASSED\n");
			goto done;
		case UCALL_ABORT:
			printf("PMU test FAILED\n");
			ret = -1;
			goto done;
		default:
			printf("Unexpected exit\n");
			ret = -1;
			goto done;
		}
	}

done:
	kvm_vm_free(vm);
	return ret;
}

Annotation

Implementation Notes