Re: [PATCH kvm-unit-tests 4/4] Add sample test using the api test harness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 27, 2010 at 11:15:54AM +0200, Avi Kivity wrote:
> On 11/26/2010 04:17 PM, Michael S. Tsirkin wrote:
> >>  +
> >>  +int main(int ac, char **av)
> >>  +{
> >>  +    kvm::system system;
> >>  +    kvm::vm vm(system);
> >>  +    identity::setup_vm(vm);
> >>  +    kvm::vcpu vcpu(vm, 0);
> >>  +    identity::vcpu thread(vcpu, set_global);
> >>  +    vcpu.run();
> >>  +    printf("global %d\n", global);
> >>  +    return global == 1;
> >>  +}
> >
> >I note that no exceptions are caught.  So any failure will get us a crash,
> >is there an indication what went wrong?
> >
> 
> I'll add a try/catch.

So we'll get a "test failed: error 11" at high level?
That's still not very helpful for debugging.
The specific test might be better served by assert calls after each ioctl
than an elaborate exception handling scheme.

> -- 
> I have a truly marvellous patch that fixes the bug which this
> signature is too narrow to contain.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux