From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST RFC PATCH 0/4] Nested job execution infrastructure Date: Tue, 30 Jun 2015 17:36:17 +0100 Message-ID: <1435682181-11151-1-git-send-email-ian.jackson@eu.citrix.com> References: <21892.2155.313678.103280@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z9yWQ-00061o-JI for xen-devel@lists.xenproject.org; Tue, 30 Jun 2015 16:36:34 +0000 In-Reply-To: <21892.2155.313678.103280@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Robert Hu , LongtaoX Pang , "Ian Campbell@citrix.com" List-Id: xen-devel@lists.xenproject.org I wrote: > I think it would be best if I proposed some code to you. I will get > back to you with a suggestion. Here is the result. Please let me know what you think. NB that this is an RFC and I have NOT EXECUTED IT. It is easy in Tcl to make daft mistakes like missing `global' or misspelling variable names, so I apologise in advance for the bugs. The first two patches are, I think, uncontroversial: 1/4 Tcl: Provide lunappend 2/4 sg-run-job: Declare Tcl (for the benefit of Emacs) The next one makes an assumption about how much you want to reuse of the standard host setup machinery. I think you want to go back at least to ts-xen-install ? In which case this is probably approximately correct. 3/4 sg-run-job: Break out per-host-prep and per-host-finish The final patch provides the functionality you will need for your proc run-job/test-nested: 4/4 sg-run-job: Provide infrastructure for layers of nesting You would use this by writing someething like this: proc run-job/test-nested {} { run-ts . = ts-debian-hvm-install + host l1 run-ts . = ts-nested-setup + host l1 nested-layer-descend l1 run-ts . = ts-debian-hvm-install l1 l2 ... And there is then no need to do anything special at the end of the test: the nested layering part will leak check and log capture the l1, tear it down, and then do the same to the l0. If you like the look of this approach, please feel free to fold these patches into your own series at the appropriate point (retaining my From: and S-o-b would be conventional). Before posting them other than as an RFC, you will have to test them, I'm afraid. If it doesn't work and you can't figure it out please ask me and I will try to reply quickly. When you have tested them, you can add your own Tested-by to the patch tags next to by Signed-off-by. I hope this is helpful. Thanks, Ian.