From patchwork Tue Apr 5 18:17:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 606671 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3qfcXC2txkz9sBl for ; Wed, 6 Apr 2016 04:17:30 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id D8FA810295; Tue, 5 Apr 2016 11:17:19 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 71CB910293 for ; Tue, 5 Apr 2016 11:17:18 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id B34EA420398 for ; Tue, 5 Apr 2016 12:17:17 -0600 (MDT) X-ASG-Debug-ID: 1459880236-09eadd287e69a410001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id BAv2YvoGoW5CU7Gv (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 05 Apr 2016 12:17:16 -0600 (MDT) X-Barracuda-Envelope-From: joe@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO relay6-d.mail.gandi.net) (217.70.183.198) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 5 Apr 2016 18:17:16 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at ovn.org designates 217.70.183.198 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.198 X-Barracuda-RBL-IP: 217.70.183.198 Received: from mfilter42-d.gandi.net (mfilter42-d.gandi.net [217.70.178.172]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 32884FB883; Tue, 5 Apr 2016 20:17:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter42-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter42-d.gandi.net (mfilter42-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id k9PfapsNKaaH; Tue, 5 Apr 2016 20:17:12 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from localhost.localdomain (unknown [208.91.1.34]) (Authenticated sender: joe@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id E3A41FB877; Tue, 5 Apr 2016 20:17:11 +0200 (CEST) X-CudaMail-Envelope-Sender: joe@ovn.org From: Joe Stringer To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-404065380 X-CudaMail-DTE: 040516 X-CudaMail-Originating-IP: 217.70.183.198 Date: Tue, 5 Apr 2016 11:17:02 -0700 X-ASG-Orig-Subj: [##CM-E2-404065380##][PATCH] checkpatch: Don't enforce char limit on tests. Message-Id: <1459880222-11303-1-git-send-email-joe@ovn.org> X-Mailer: git-send-email 2.1.4 X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1459880236 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH] checkpatch: Don't enforce char limit on tests. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Although tests ideally also stick to shorter line lengths, it is very common for fixed text blocks like flows or large packets to be specified within tests. Checkpatch shouldn't complain about cases like these. Signed-off-by: Joe Stringer Acked-by: Russell Bryant --- utilities/checkpatch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index d9011f370816..791c7d902fa5 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -154,7 +154,10 @@ def ovs_checkpatch_parse(text): if trailing_whitespace_or_crlf(line[1:]): print_line = True print_warning("Line has trailing whitespace", lineno) - if len(line[1:]) > 79: + + # Don't enforce character limit on test files, since they commonly + # include long pieces of text like flows or hex dumps of packets + if len(line[1:]) > 79 and '.at' not in current_file: print_line = True print_warning("Line is greater than 79-characters long", lineno)