From patchwork Wed Apr 23 09:59:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 28866 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4BC9920534 for ; Wed, 23 Apr 2014 10:02:27 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id j17sf4250517oag.6 for ; Wed, 23 Apr 2014 03:02:26 -0700 (PDT) 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 :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=WTqhwEzkqsvrSGnkI14EHtR3qdNes4GxVjrqvsvaArA=; b=KJ0l3mMlsodJvzBI3M3QOj2AlqEGWWILBDLMUd2tKKpb8P0QQnviEPKLQj9Pc/Cnjr IxagVNLQd7ikWCJhcQyDBNl1n25S87cUsmvpx4/c6LzLGHxWzue1LS2uDPoGzqZF8OuI jg6mGp/9fuDMVBmhOIs7wZTf8joVSEBdiRKfaiSLoEXhUNmI9da7zU//3FwpRCOYn7xe BZDRrNGOMIGro74++0OmJY3jtgmsttW34pi7Q8qb3V5sOhYfpz6x+mRtI/vmpWHPkEZr D3kRYOc1VnoUIla/2hm/66SlV1WTJIKiPiuXO511Xg29UTmPKo6KQUO+Vwl12+2ch2Dn GeTQ== X-Gm-Message-State: ALoCoQm6oa28MotF1ImWlqLsQKHiCrkicIm9STGNZcfWQkw/6ovOf6x7JCQe4jVHP9buttUjYcrd X-Received: by 10.182.19.164 with SMTP id g4mr25440780obe.21.1398247346874; Wed, 23 Apr 2014 03:02:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.213 with SMTP id u79ls527656qge.79.gmail; Wed, 23 Apr 2014 03:02:26 -0700 (PDT) X-Received: by 10.221.74.200 with SMTP id yx8mr41208092vcb.3.1398247346736; Wed, 23 Apr 2014 03:02:26 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id e9si81204vct.34.2014.04.23.03.02.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 03:02:26 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id hy4so857347vcb.11 for ; Wed, 23 Apr 2014 03:02:26 -0700 (PDT) X-Received: by 10.52.108.164 with SMTP id hl4mr11892128vdb.25.1398247346643; Wed, 23 Apr 2014 03:02:26 -0700 (PDT) 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.221.72 with SMTP id ib8csp91121vcb; Wed, 23 Apr 2014 03:02:26 -0700 (PDT) X-Received: by 10.52.166.102 with SMTP id zf6mr35381196vdb.2.1398247346307; Wed, 23 Apr 2014 03:02:26 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id o13si78229veh.85.2014.04.23.03.02.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 23 Apr 2014 03:02:26 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) 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 1Wctxz-0003R8-5S; Wed, 23 Apr 2014 09:59:47 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wctxx-0003Qe-6r for xen-devel@lists.xen.org; Wed, 23 Apr 2014 09:59:45 +0000 Received: from [193.109.254.147:48302] by server-1.bemta-14.messagelabs.com id 5E/10-00839-01F87535; Wed, 23 Apr 2014 09:59:44 +0000 X-Env-Sender: ijc@hellion.org.uk X-Msg-Ref: server-2.tower-27.messagelabs.com!1398247182!331885!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8592 invoked from network); 23 Apr 2014 09:59:43 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 23 Apr 2014 09:59:43 -0000 X-IronPort-AV: E=Sophos;i="4.97,911,1389744000"; d="scan'208";a="122616028" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 23 Apr 2014 09:59:43 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.3.123.3; Wed, 23 Apr 2014 05:59:41 -0400 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 1Wctxt-0000g1-HS; Wed, 23 Apr 2014 09:59:41 +0000 From: Ian Campbell To: Date: Wed, 23 Apr 2014 10:59:41 +0100 Message-ID: <1398247181-19595-1-git-send-email-ijc@hellion.org.uk> X-Mailer: git-send-email 1.9.0 MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH osstest] apt: lock osstest's usages of apt-get against each other 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: ijc@hellion.org.uk X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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: From: Ian Campbell Currently we rely on all apt-get invocations being in a single ts-xen-build-prep job which can't run on a shared host. That is a bit inflexible so instead use our own lock. We wait indefinitely and rely on osstest's existing command timeout infrastructure to catch problems. target_install_packages*() previous estimated the time taken to install the packages based on the number of packages. This no longer applies because the install might get stuck behind some other large install. Use a 3000s (nearly an hour) timeout instead (I expect failures here to be unusual so erred on the big side) Signed-off-by: Ian Campbell --- Osstest/Debian.pm | 2 +- Osstest/TestSupport.pm | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 059858e..0f7bb85 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -493,7 +493,7 @@ d-i apt-setup/another boolean false d-i apt-setup/non-free boolean false d-i apt-setup/contrib boolean false -d-i pkgsel/include string openssh-server, ntp, ntpdate, $extra_packages +d-i pkgsel/include string openssh-server, ntp, ntpdate, chiark-utils-bin, $extra_packages $xopts{ExtraPreseed} diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 461fe63..d49ff4f 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -430,17 +430,18 @@ sub target_putfile_root ($$$$;$) { sub target_run_apt { my ($ho, $timeout, @aptopts) = @_; target_cmd_root($ho, - "DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y apt-get @aptopts", + "DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y \ + with-lock-ex -w /var/lock/osstest-apt apt-get @aptopts", $timeout); } sub target_install_packages { my ($ho, @packages) = @_; - target_run_apt($ho, 300 + 100 * @packages, + target_run_apt($ho, 3000, qw(-y install), @packages); } sub target_install_packages_norec { my ($ho, @packages) = @_; - target_run_apt($ho, 300 + 100 * @packages, + target_run_apt($ho, 3000, qw(--no-install-recommends -y install), @packages); }