From patchwork Wed Jun 21 14:14:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9801955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6D4B260329 for ; Wed, 21 Jun 2017 14:17:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CEDE285E2 for ; Wed, 21 Jun 2017 14:17:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51CC9285F1; Wed, 21 Jun 2017 14:17:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CD878285EE for ; Wed, 21 Jun 2017 14:17:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNgP1-00059a-Ko; Wed, 21 Jun 2017 14:14:39 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNgP0-00057m-Es for xen-devel@lists.xenproject.org; Wed, 21 Jun 2017 14:14:38 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id 8C/48-03920-D4F7A495; Wed, 21 Jun 2017 14:14:37 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeJIrShJLcpLzFFi42JxWrohUte33iv SoH+bhMX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmrG6/QpzwXSuijM9nA2Md9i7GDk5JAT8Jfbu WwdmswnoSjRt+cvWxcjBISKgInF7rwFImFlAW2LvurnMILawgKPEgcvnwMpZBFQllvUdBbN5B bwkvr3fzwQxUk7i/PGfzCBjOIHiix/5g5hCAp4S80/5QZhqEnPXx0M0CkqcnPmEBWKRhMTBFy +YJzDyzkKSmoUktYCRaRWjRnFqUVlqka6RqV5SUWZ6RkluYmaOrqGBmV5uanFxYnpqTmJSsV5 yfu4mRmDIMADBDsZVCwIPMUpyMCmJ8pZ7e0UK8SXlp1RmJBZnxBeV5qQWH2KU4eBQkuA9WQuU EyxKTU+tSMvMAQYvTFqCg0dJhHdNCVCat7ggMbc4Mx0idYpRUUqc9wRInwBIIqM0D64NFjGXG GWlhHkZgQ4R4ilILcrNLEGVf8UozsGoJMx7sAZoCk9mXgnc9FdAi5mAFr844gGyuCQRISXVwN i5t1n5UrNKWF/wGakb2stkeepsL+v554swuxVtW6IiFvvwzu164yuRX2YWJJZxdm5l+cZ58bi pgs3MTunN16Qzwjm/hVsZ3zZLtnsv5+lcc6ZNK+vodPcHQQm5EW9uMWx04VpZxPD3a+eaHVb7 uy9GsISb50YcqknUOiN6aO1f1/Yzmy9WK7EUZyQaajEXFScCAJLw41eTAgAA X-Env-Sender: prvs=33896ecda=Ian.Jackson@citrix.com X-Msg-Ref: server-13.tower-27.messagelabs.com!1498054474!99281155!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 44465 invoked from network); 21 Jun 2017 14:14:37 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-13.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 21 Jun 2017 14:14:37 -0000 X-IronPort-AV: E=Sophos;i="5.39,369,1493683200"; d="scan'208";a="428818076" From: Ian Jackson To: Date: Wed, 21 Jun 2017 15:14:02 +0100 Message-ID: <1498054447-11281-11-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1498054447-11281-1-git-send-email-ian.jackson@eu.citrix.com> References: <1498054447-11281-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Cc: Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 10/15] sg-run-job: Spawn ts-syslog-server X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Every job now gets a syslog server, which starts up after host allocation. The server's address and port are recorded by ts-syslog-server in a runvar and can be used by subsequent test steps. Signed-off-by: Ian Jackson --- v2: Change mistaken TESTID `.' to `='. `.' means literally `.'. Do not start ts-syslog-server if !$ok. Do not start ts-syslog-server if job is being truncated now. Use new | (stdin pipe) spawn-ts feature; avoids total failure. --- sg-run-job | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sg-run-job b/sg-run-job index 620d89a..66c2c19 100755 --- a/sg-run-job +++ b/sg-run-job @@ -76,6 +76,8 @@ proc run-job {job} { if {$ok && ![catch { info args prep-job/$jobinfo(recipe) }]} \ { catching-otherwise fail prep-job/$jobinfo(recipe) } + if {$ok} { set syslog [spawn-ts broken = | ts-syslog-server] } + if {$ok && $need_build_host} \ { catching-otherwise broken prepare-build-host } @@ -99,6 +101,10 @@ proc run-job {job} { run-ts !broken capture-logs ts-logs-capture + host } + if {[info exists syslog]} { + reap-ts $syslog + } + if {$ok} { if {[jobdb::job-check-escaped-steps $flight $job]} { set ok 0