Re: [libvirt] PATCH: 4/28: Thread safety for test driver

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

 



On Mon, Dec 01, 2008 at 05:44:14PM +0000, Daniel P. Berrange wrote:
> On Mon, Dec 01, 2008 at 06:26:03PM +0100, Daniel Veillard wrote:
> > On Sun, Nov 30, 2008 at 11:27:14PM +0000, Daniel P. Berrange wrote:
> > I hope it's worth the effort, it's a lot of complexity added.
> > One of the things which worries me is that detecting errors will be
> > hard, you end up with a locked server that can be far from trivial
> > to debug.
> > I'm really wondering how we could automate testing or at least ease the
> > debug,
> 
> It occurred to me that a static analysis tool like CIL really ought to
> be able to check correctness fairly easily. Rich has discussed this a
> little before
> 
>   http://et.redhat.com/~rjones/cil-analysis-of-libvirt/
> 
> Basically since we have a known set of functions which lock the object
> and CIL can give us the code flow within a method, we ought to be able
> to write something that looks at each call of virDomainFindByUUID,
> and then traces the code paths to functiuon return, and validates that
> the unlock call was made. It could likewise check for people calling
> things before acquiring the lock.
> 
> Would be an interesting project..... :-)

Trying out Rich's demo code I got it to generate before & after control
flow diagrams of the 'domain create' functiuon n the QEMU driver

  http://fedorapeople.org/~berrange/libvirt/qemudDomainCreateBefore.png
  http://fedorapeople.org/~berrange/libvirt/qemudDomainCreateAfter.png

The main problem I had was that CIL doesn't underderstand the 'bool'
data type, so I had to hack  gnulib/lib/c-ctype.{h,c}, src/cgroup.c
and src/xmlrpc.{h,c} to do a s/bool/char/.

Be nice to get rid of these directly in our source tree, or find a compile
flag to automatically turn 'bool' into 'char' ?

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]