From patchwork Wed Jan 22 09:55:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 23497 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f198.google.com (mail-yk0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BA329218DC for ; Wed, 22 Jan 2014 10:33:58 +0000 (UTC) Received: by mail-yk0-f198.google.com with SMTP id 131sf728616ykp.1 for ; Wed, 22 Jan 2014 02:33:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=XjItfhw8z2rx+uhA7UcTNukdRUU0yedoFWFguTnY9xU=; b=MQ++gVVrt83rTRC7XMDMjEnuFEkCeMyJe8k/zCx7ZJZy5bNmXSEmEltDlvJwHCzOn+ rTAsESIKb8eM7lli6cOUaW1wjXMPLDJG/ELzgvVtrU1Zzrm5wcSpCsrt3b4yCALh8/uP NZfM6wVQvhGomsPaxbFNHjlou225QtI+jXe9/bvUhVQ0AfTe7/IKR8OhsGjyPqp2H+Q2 FuERRTdCJxTqpXz8RKNMFx08PUXJa3CM7g1noT5n/E2Cg7ZP1Tj0ltQqBMFBCujtJ22V mtArDN3FGBZqeacAeFAEjUymofId5wRljvPyatTrAF7whBJWmetZ2vAecAYosICsCAhA 0aZQ== X-Gm-Message-State: ALoCoQl6RLqRUNhop2puei+Q1nJ18apncpOh54V2R+plVVD9BApZz71LPcLfUMvKkCAgXNmXAoQb X-Received: by 10.58.38.137 with SMTP id g9mr299364vek.6.1390386837925; Wed, 22 Jan 2014 02:33:57 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.134 with SMTP id r6ls31087qgd.47.gmail; Wed, 22 Jan 2014 02:33:57 -0800 (PST) X-Received: by 10.58.50.71 with SMTP id a7mr362541veo.32.1390386837792; Wed, 22 Jan 2014 02:33:57 -0800 (PST) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id a3si4271916ved.41.2014.01.22.02.33.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 02:33:57 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id id10so102770vcb.41 for ; Wed, 22 Jan 2014 02:33:57 -0800 (PST) X-Received: by 10.58.50.71 with SMTP id a7mr362531veo.32.1390386837629; Wed, 22 Jan 2014 02:33:57 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp175581vcz; Wed, 22 Jan 2014 02:33:57 -0800 (PST) X-Received: by 10.50.97.6 with SMTP id dw6mr22463700igb.21.1390386836896; Wed, 22 Jan 2014 02:33:56 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id ha7si12991012icc.51.2014.01.22.02.33.56 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Jan 2014 02:33:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W5uWm-0006tn-E0; Wed, 22 Jan 2014 09:55:20 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W5uWj-0006nv-KS for xen-devel@lists.xen.org; Wed, 22 Jan 2014 09:55:18 +0000 Received: from [85.158.143.35:34918] by server-3.bemta-4.messagelabs.com id 4A/1D-32360-5859FD25; Wed, 22 Jan 2014 09:55:17 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-7.tower-21.messagelabs.com!1390384503!385!5 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27063 invoked from network); 22 Jan 2014 09:55:15 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-7.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 22 Jan 2014 09:55:15 -0000 X-IronPort-AV: E=Sophos;i="4.95,698,1384300800"; d="scan'208";a="95230034" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 22 Jan 2014 09:55:15 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Wed, 22 Jan 2014 04:55:14 -0500 Received: from spare.cam.xci-test.com ([10.80.2.80] helo=kazak.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1W5uWU-0005Rs-TG; Wed, 22 Jan 2014 09:55:02 +0000 From: Ian Campbell To: Date: Wed, 22 Jan 2014 09:55:01 +0000 Message-ID: <1390384501-20552-17-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1390384419.32519.32.camel@kazak.uk.xensource.com> References: <1390384419.32519.32.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST 17/17] make-flight: refactor test_matrix_do_one X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Pull some test creation out into their own subdirectories. This allows the total level of indentation to be reduced. It also allows us to invert the pre-condition test and simply return at the top of the subroutine, which further reduces indentation. --- make-flight | 201 +++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 118 insertions(+), 83 deletions(-) diff --git a/make-flight b/make-flight index 4a144ec..092a0cf 100755 --- a/make-flight +++ b/make-flight @@ -95,25 +95,13 @@ test_matrix_branch_filter_callback () { return 0 } -test_matrix_do_one () { - if [ $dom0arch = armhf ]; then - job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \ - $xenarch $dom0arch \ - $debian_runvars all_hostflags=$most_hostflags - return - fi - - job_create_test test-$xenarch$kern-$dom0arch-pv test-debian xend \ - $xenarch $dom0arch \ - $debian_runvars all_hostflags=$most_hostflags - - job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \ - $xenarch $dom0arch \ - $debian_runvars all_hostflags=$most_hostflags +do_freebsd_tests () { - if [ $xenarch = amd64 -a $dom0arch = i386 -a "$kern" = "" ]; then + if [ $xenarch != amd64 -o $dom0arch != i386 -o "$kern" != "" ]; then + return + fi - for freebsdarch in amd64 i386; do + for freebsdarch in amd64 i386; do job_create_test test-$xenarch$kern-$dom0arch$qemuu_suffix-freebsd10-$freebsdarch \ test-freebsd xl $xenarch $dom0arch \ @@ -121,36 +109,20 @@ test_matrix_do_one () { freebsd_image=${FREEBSD_IMAGE_PREFIX-FreeBSD-10.0-BETA3-}$freebsdarch${FREEBSD_IMAGE_SUFFIX--20131103-r257580.qcow2.xz} \ all_hostflags=$most_hostflags - done - - fi - - for qemuu_suffix in '' -qemut -qemuu; do - case "$qemuu_suffix" in - '') - qemuu_runvar='' - ;; - -qemut) - qemuu_runvar=device_model_version=qemu-xen-traditional - ;; - -qemuu) - case $xenbranch in - xen-3.*-testing) continue;; - xen-4.0-testing) continue;; - xen-4.1-testing) continue;; - esac - qemuu_runvar=device_model_version=qemu-xen - ;; - esac + done +} - for vcpus in '' 1; do - case "$vcpus" in - '') vcpus_runvars=''; vcpus_suffix='' ;; - *) vcpus_runvars=guests_vcpus=$vcpus; vcpus_suffix=-vcpus$vcpus ;; - esac +do_hvm_winxp_tests () { + for vcpus in '' 1; do + case "$vcpus" in + '') vcpus_runvars=''; vcpus_suffix='' ;; + *) vcpus_runvars=guests_vcpus=$vcpus; vcpus_suffix=-vcpus$vcpus ;; + esac - if [ "x$vcpus" = x ] || \ - [ "$xenarch$kern-$dom0arch" = "amd64-i386" ]; then + if [ "x$vcpus" != x ] && \ + [ "$xenarch$kern-$dom0arch" != "amd64-i386" ]; then + continue + fi stripy toolstack xend xl \ "$vcpus" 1 \ @@ -160,85 +132,148 @@ test_matrix_do_one () { toolstack_runvars="toolstack=$toolstack" - job_create_test \ + job_create_test \ test-$xenarch$kern-$dom0arch-$toolstack$qemuu_suffix-winxpsp3$vcpus_suffix \ test-win $toolstack $xenarch $dom0arch $qemuu_runvar \ win_image=winxpsp3.iso $vcpus_runvars \ all_hostflags=$most_hostflags,hvm - fi - done + done +} - if [ $xenarch = amd64 ]; then +do_hvm_win7_x64_tests () { + if [ $xenarch != amd64 ]; then + return + fi job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-win7-amd64 \ test-win xl $xenarch $dom0arch $qemuu_runvar \ win_image=win7-x64.iso \ all_hostflags=$most_hostflags,hvm +} +do_hvm_rhel6_tests () { + if [ $xenarch != amd64 -o $dom0arch != i386 -o "$kern" != "" ]; then + return fi - if [ $xenarch = amd64 -a $dom0arch = i386 -a "$kern" = "" ]; then - - for cpuvendor in amd intel; do + for cpuvendor in amd intel; do job_create_test test-$xenarch$kern-$dom0arch$qemuu_suffix-rhel6hvm-$cpuvendor \ test-rhelhvm xl $xenarch $dom0arch \ - redhat_image=rhel-server-6.1-i386-dvd.iso \ + redhat_image=rhel-server-6.1-i386-dvd.iso \ all_hostflags=$most_hostflags,hvm-$cpuvendor \ $qemuu_runvar - done + done +} +do_sedf_tests () { + if [ $xenarch != amd64 -o $dom0arch != amd64 ]; then + return fi - done # qemuu_suffix + for pin in '' -pin; do + job_create_test test-$xenarch$kern-$dom0arch-xl-sedf$pin \ + test-debian xl $xenarch $dom0arch \ + guests_vcpus=4 \ + xen_boot_append="sched=sedf loglvl=all ${pin:+dom0_vcpus_pin}" \ + linux_boot_append='loglevel=9 debug' \ + $debian_runvars all_hostflags=$most_hostflags + done +} - job_create_test test-$xenarch$kern-$dom0arch-pair test-pair \ - $onetoolstack $xenarch $dom0arch \ - !host !host_hostflags \ - $debian_runvars \ - all_hostflags=$most_hostflags,equiv-1 +do_credit2_tests () { + if [ $xenarch != amd64 -o $dom0arch != i386 ]; then + return + fi - if [ $xenarch = amd64 -a $dom0arch = amd64 ]; then + job_create_test test-$xenarch$kern-$dom0arch-xl-credit2 \ + test-debian xl $xenarch $dom0arch \ + guests_vcpus=4 xen_boot_append='sched=credit2' \ + $debian_runvars all_hostflags=$most_hostflags +} - for pin in '' -pin; do +do_passthrough_tests () { + if [ $xenarch != amd64 -o $dom0arch != amd64 -o "$kern" != "" ]; then + return + fi - job_create_test test-$xenarch$kern-$dom0arch-xl-sedf$pin \ - test-debian xl $xenarch $dom0arch \ - guests_vcpus=4 xen_boot_append="sched=sedf loglvl=all ${pin:+dom0_vcpus_pin}" linux_boot_append='loglevel=9 debug' \ + for cpuvendor in intel; do + job_create_test test-$xenarch$kern-$dom0arch-xl-pcipt-intel \ + test-debian-nomigr xl $xenarch $dom0arch \ + guests_vcpus=4 \ + $debian_runvars debian_pcipassthrough_nic=host \ + all_hostflags=$most_hostflags,hvm-$cpuvendor,pcipassthrough-nic + + done +} + +test_matrix_do_one () { + + # Basic PV Linux test with xl + + job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \ + $xenarch $dom0arch \ $debian_runvars all_hostflags=$most_hostflags - done + # No further arm tests at the moment + if [ $dom0arch = armhf ]; then + return + fi + # xend PV guest test on x86 only + if [ $dom0arch = "i386" -o $dom0arch = "amd64" ]; then + job_create_test test-$xenarch$kern-$dom0arch-pv test-debian xend \ + $xenarch $dom0arch \ + $debian_runvars all_hostflags=$most_hostflags fi - if [ $xenarch = amd64 -a $dom0arch = i386 ]; then + do_freebsd_tests - job_create_test test-$xenarch$kern-$dom0arch-xl-multivcpu \ - test-debian xl $xenarch $dom0arch guests_vcpus=4 \ - $debian_runvars all_hostflags=$most_hostflags + for qemuu_suffix in '' -qemut -qemuu; do + case "$qemuu_suffix" in + '') + qemuu_runvar='' + ;; + -qemut) + qemuu_runvar=device_model_version=qemu-xen-traditional + ;; + -qemuu) + case $xenbranch in + xen-3.*-testing) continue;; + xen-4.0-testing) continue;; + xen-4.1-testing) continue;; + esac + qemuu_runvar=device_model_version=qemu-xen + ;; + esac - job_create_test test-$xenarch$kern-$dom0arch-xl-credit2 \ - test-debian xl $xenarch $dom0arch \ - guests_vcpus=4 xen_boot_append='sched=credit2' \ - $debian_runvars all_hostflags=$most_hostflags + do_hvm_winxp_tests + do_hvm_win7_x64_tests + do_hvm_rhel6_tests - fi + done # qemuu_suffix - if [ $xenarch = amd64 -a $dom0arch = amd64 -a "$kern" = "" ]; then + # Test live migration + job_create_test test-$xenarch$kern-$dom0arch-pair test-pair \ + $onetoolstack $xenarch $dom0arch \ + !host !host_hostflags \ + $debian_runvars \ + all_hostflags=$most_hostflags,equiv-1 - for cpuvendor in intel; do + do_sedf_tests + do_credit2_tests - job_create_test test-$xenarch$kern-$dom0arch-xl-pcipt-intel \ - test-debian-nomigr xl $xenarch $dom0arch \ - guests_vcpus=4 \ - $debian_runvars debian_pcipassthrough_nic=host \ - all_hostflags=$most_hostflags,hvm-$cpuvendor,pcipassthrough-nic + if [ $xenarch = amd64 -a $dom0arch = i386 ]; then - done + job_create_test test-$xenarch$kern-$dom0arch-xl-multivcpu \ + test-debian xl $xenarch $dom0arch guests_vcpus=4 \ + $debian_runvars all_hostflags=$most_hostflags fi + + do_passthrough_tests } test_matrix_iterate