Re: [PATCH 1/2] KVM: selftests: Add get featured msrs test case

From: Andrew Jones
Date: Mon Oct 26 2020 - 05:08:39 EST


On Mon, Oct 26, 2020 at 09:58:54AM +0100, Vitaly Kuznetsov wrote:
> Peter Xu <peterx@xxxxxxxxxx> writes:
> > +int kvm_vm_get_feature_msrs(struct kvm_vm *vm, struct kvm_msrs *msrs)
> > +{
> > + return ioctl(vm->kvm_fd, KVM_GET_MSRS, msrs);
> > +}
>
> I *think* that the non-written rule for kvm selftests is that functions
> without '_' prefix check ioctl return value with TEST_ASSERT() and
> functions with it don't (e.g. _vcpu_run()/vcpu_run()) but maybe it's
> just me.
>

Yes, that's the pattern I've been trying to implement. If we want to be
strict about it, then we should do a quick scan of the code to ensure
its currently consistent. I have it feeling it isn't.

Thanks,
drew