WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] [Xm-Test] XenManagedDomain and initial test case

To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] [Xm-Test] XenManagedDomain and initial test case for vTPM management using xen-api
From: Stefan Berger <stefanb@xxxxxxxxxx>
Date: Fri, 1 Dec 2006 13:07:55 -0500
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 01 Dec 2006 10:08:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061201173647.GB15632@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

Ewan Mellor <ewan@xxxxxxxxxxxxx> wrote on 12/01/2006 12:36:47 PM:

> On Tue, Nov 28, 2006 at 04:37:31PM -0500, Stefan Berger wrote:
>
> > This patch provides XmTestManagedDomain and XenManagedDomain classes
> > similar to the XmTestDomain and XenDomain classes. I have wrapped the
> > xen-api for VM configuration creation, starting and stopping of VMs and
> > destruction of the VM configuration in the XenManagedDomain class's
> > methods. No device-related functions are provided through the class.
> >
> > The managed domains' UUIDs are tracked and all created VMs are destroyed
> > upon failure or skipping of the test or by calling
> > xapi.vm_destroy_all().
> >
> > I am adding a new grouptest 'xapi' for running xen-api tests.
> >
> > Only caveat: I am using an empty username and password
> > (XmTestList/xapi.py) with Xend's authentication deactivated to run these
> > tests.
> >
> > Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
>
> Applied, thanks Stefan.  Now all we need is some tests that _don't_ need a TPM
> ;-)


Yes, I understand that, but I must say that I don't know what would be the best way to go about it and maybe what has been committed so far is not that good. One could either cut and paste all existing tests and modify them to work with the xen-api, or we could use a global variable 'xapi' that allows us to resuse existing tests like this:

if (xapi)
        domain = XenManagedTestDomain()
else
        domain = XenTestDomain()

This way all tests would need to be run twice.

And then the question is whether XenManagedTestDomain() should not rather be implemented with XenTestDomain(managed=xapi), which would lead to a messier implementation inside XenTestDomain().

Often there are statements in the tests like traceCommand('xm xyz'), which would also need to be surrounded with an if (xapi) statement. I guess the goal could be to reduce the test implementation work while not messing up the implementations.

Thoughts?

   Stefan


>
> Ewan.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>