From patchwork Fri May 31 18:47:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brooks Moses X-Patchwork-Id: 248004 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id D40282C008C for ; Sat, 1 Jun 2013 04:47:58 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=vrmZiN+FEdzEzgLgkF8TTg/q8hDe2GLgVFq0QLdvd7ze2y Q20wn9uza4/yixGKAnKtXw8GKVFGIsaJP35Ve1Sqb/RPC3vALAJ3Kb9EkV1uOe9w FLIP/bIVKHjlDZt6IU9ASlJUgf6/Ngag70Neb6NRHoQ9n4l5IGYVjK4GYq+0I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=OBx1sbROAbM6Naf4gh8B9Ky4L7E=; b=qUDSKl7Y2jIKY4pSDkqv XHMYd07oOTwEbG2AnS1qK8tBp5TmGUNpLR5mwc3YpEyKM5Jy3Zfnl9JpLsjQ/UQp G7ViDOwCxNXx500xFVruppEbO75WyUNSVTbf6veLZCc++m1lnDzAIE2FmTIravZ2 ItO3L9LdeZGBOy8EaP7MNLE= Received: (qmail 30561 invoked by alias); 31 May 2013 18:47:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 30548 invoked by uid 89); 31 May 2013 18:47:52 -0000 X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.1 Received: from mail-pb0-f50.google.com (HELO mail-pb0-f50.google.com) (209.85.160.50) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 31 May 2013 18:47:51 +0000 Received: by mail-pb0-f50.google.com with SMTP id wy17so2667972pbc.37 for ; Fri, 31 May 2013 11:47:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:x-gm-message-state; bh=GwlvhYLYvRH1Z/XL3J5Cc6TkuhRpOJu1sCOvN/SLBvY=; b=O4ygO8FSVUT+PQggoJ31KDcZsQNnJ8O7h8dB2yQ+6dEUggMoTeg0PAOOqXX+WyYsQI ++Uz/JNFn2JWYttmPQVMAp1eUsa8yuOGv5jhmZLGztGKJi2aopUh4YydaQWwJWufcUJB O5o+dyjmSUzv6kevlomUhgzqyY/GsRIQIiM8hamJyZzC2wvejkwU1zYkanJGd5HDWNfs ZC4EafjysCeUBwrcs0jxY8SmR+G0ME+0ZbpjZlcd/REOtjCQfeTwNApA7HdaM1G1xAEL Jpa40PLgmwY/mMZ9qgzVDwerztB/WRWYd3m/qZZ1nZgchGEOqbE1/r160Pb4IJ7ObQlD 6aeA== X-Received: by 10.68.175.33 with SMTP id bx1mr7809636pbc.21.1370026070162; Fri, 31 May 2013 11:47:50 -0700 (PDT) Received: from brooks.mtv.corp.google.com ([2620:0:1000:3002:1260:4bff:fe6b:ed8a]) by mx.google.com with ESMTPSA id qh4sm50933079pac.8.2013.05.31.11.47.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 11:47:49 -0700 (PDT) Message-ID: <51A8F054.4040503@google.com> Date: Fri, 31 May 2013 11:47:48 -0700 From: Brooks Moses User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: GCC Patches , Diego Novillo , Simon Baldwin Subject: [patch] Fix parsing bug in validate_patches.py X-Gm-Message-State: ALoCoQmdiVamcEWks7YckncL+UWmGqOP7fedM8iBmD/zB6P1TR/8BHLMygMEiF2Yq5BmNVS5lyUNsV0aDSVeIqlTJtA1uOdVcVpoQhB+HAyZ3gI2SlSkVb1hhXbu1HQAnvpDlyS6r6ezV+Pm5tTRl7gy51PXsV72gpDaT4QBuzHa88LVXHME/UJSLzo8q03/x01Yqf/PO1wrOBqSJMifCPRcPMuv+z6mHK10Ab4H8rD+GI86Xp6rnQU= X-Virus-Found: No The validate_failures.py script in contrib/testsuite-management expects the first "|" character in a test summary line to be a delineator allowing the line to be prefixed by attributes such as "flaky". This causes problems when a test line itself contains "|" in the message. We can get around this in the xfail file by prefixing the line with "|" to indicate an empty attribute set. However, validate_failures.py uses the same line-parser for files in the DejaGnu output, and we obviously can't adjust those -- with the result that the relevant summary line in the DejaGnu output is ignored. This patch fixes the problem: If an entire line is a valid summary line, we don't try to split it. Ok to commit? - Brooks ---- 2013-05-31 Brooks Moses * validate_failures.py: Don't split already-valid summary lines. The validate_failures.py script in contrib/testsuite-management expects the first "|" character in a test summary line to be a delineator allowing the line to be prefixed by attributes such as "flaky". This causes problems when a test line itself contains "|" in the message. We can get around this in the xfail file by prefixing the line with "|" to indicate an empty attribute set. However, validate_failures.py uses the same line-parser for files in the DejaGnu output, and we obviously can't adjust those -- with the result that the relevant summary line in the DejaGnu output is ignored. This patch fixes the problem: If an entire line is a valid summary line, we don't try to split it. Index: contrib/testsuite-management/validate_failures.py =================================================================== --- contrib/testsuite-management/validate_failures.py (revision 199390) +++ contrib/testsuite-management/validate_failures.py (working copy) @@ -120,7 +120,7 @@ def __init__(self, summary_line, ordinal=-1): try: self.attrs = '' - if '|' in summary_line: + if '|' in summary_line and not _VALID_TEST_RESULTS_REX.match(summary_line): (self.attrs, summary_line) = summary_line.split('|', 1) try: (self.state, @@ -210,7 +210,7 @@ def IsInterestingResult(line): """Return True if line is one of the summary lines we care about.""" - if '|' in line: + if '|' in line and not _VALID_TEST_RESULTS_REX.match(line): (_, line) = line.split('|', 1) line = line.strip() return bool(_VALID_TEST_RESULTS_REX.match(line))