Re: [PATCH 3/3 V6] selftest: KVM: Add intra host migration

From: Marc Orr
Date: Tue Aug 31 2021 - 11:21:00 EST


> > > > +
> > > > + for (i = 0; i < 1000; ++i) {
> > > > + j = input->source_fds[i % LOCK_TESTING_THREADS];
> > > > + cap.args[0] = input->source_fds[j];
> > > > + /*
> > > > + * Call IOCTL directly without checking return code. We are
> > > > + * simply trying to confirm there is no deadlock from userspace
> > > > + * not check correctness of migration here.
> > > > + */
> > > > + ioctl(input->vm->fd, KVM_ENABLE_CAP, &cap);
> > >
> > > Should we use `vm_enable_cap()` here?
> > >
>
> I took all other suggestions but this one I just updated the comment.
> vm_enable_cap TEST_ASSERT()s if the ioctl fails. Since we are just
> randomly iterating through a bunch of ioclts we fail often so this
> would kill the test.

Gah, of course! My bad. Anyway, sounds good and thanks!