🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1423

[PATCH 2/4] t/greplint: skip test bodies without the word grep

#1423
From: Tyler Cipriani
Date: Sun, 25 Oct 2026 06:35
34 lines
11716 bytes
From: Jeff King <peff@peff.net>

greplint.pl spends time parsing test bodies that cannot contain a bare
grep. Check for the string "grep" first and skip the parse when it isn't
there. This reduces the cost of "make test-greplint" by ~50%.

Signed-off-by: Tyler Cipriani <tyler@tylercipriani.com>
---
 t/greplint.pl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/t/greplint.pl b/t/greplint.pl
index 23efe27511..68b6eba78d 100644
--- a/t/greplint.pl
+++ b/t/greplint.pl
@@ -190,6 +190,15 @@ sub check_test {
 		}
 	}
 	return unless $body;
+	# We can never match a bare "grep" if there isn't one in the first
+	# place. So we can skip all of the parsing effort. Technically you
+	# can have:
+	#
+	#   gr\
+	#   ep
+	#
+	# but that is sufficiently insane that I think we can ignore it.
+	return unless $body =~ /grep/;
 
 	my $raw_lines = $self->{raw_lines};
 
-- 
2.47.3
Technical Details
Message-ID: <20261025063508.3026136-3-tyler@tylercipriani.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73191-linux-kernel-git=dewy.ru
References: <xmqqjynueq81.fsf@gitster.g> <20261025063508.3026136-1-tyler@tylercipriani.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73191-linux-kernel-git=dewy.ru
From: tyler@tylercipriani.com (Tyler Cipriani)
Newsgroups: linux.kernel.git
Subject: [PATCH 2/4] t/greplint: skip test bodies without the word grep
Date: Sun, 25 Oct 2026 00:35:06 -0600
Organization: Usenet Network
Message-ID: <20261025063508.3026136-3-tyler@tylercipriani.com>
References: <xmqqjynueq81.fsf@gitster.g>
 <20261025063508.3026136-1-tyler@tylercipriani.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="953484"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:bSjHMB+Vwwz4CNneONkuXwBJciw= sha256:q2Npg5c+fXxyCDPysz7/Vsq/XePo2M9xH4yzm3YEMFI=
	sha1:MWJCCSUYH/LT8IEAG10hU+sCcLQ= sha256:HUSln7tjsKY2DBqJDeVNTyKPXXBhOhUO4UTdf3ji8HI=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id D5D5B125B28; Sun, 25 Oct 2026 09:36:11 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.95
X-Spam-Status: No, score=-2.95 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=tylercipriani-com.20251104.gappssmtp.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id dfuuRjwh-Bz1;
	Sun, 25 Oct 2026 09:36:09 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-73191-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tylercipriani.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 8BAE7125B27; Sun, 25 Oct 2026 09:35:59 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id A599724E82; Sun, 25 Oct 2026 06:35:55 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792910153;
	b=PPk3R2yOkqnlAfYl/uZ+BghPDYuwial1QC/3WU0JKZEyAtkpjvu3Gu14y36OIMv9KieN
	 cglLNeFXwyQRxU2HaSHqjeekXJqWgB3ucOmdygoAhS42akDUH3cF+ymGI6XlLbbLsujh+
	 AR7KFAL9d8PsqTO6ij1w7Z0phXYNmqtf9/suA1yahJZUP6WkFsd0ie7ngshAeosX1Km3+
	 T3ZcL+n05LNZrUDvSTup37SqE42DGhNv/PyITc6q2tCVaohud+Mo5Uza+8bCLSTctwt3A
	 iO4EY5vRRRQKGW5y76cR6Yh7i+rENzZQK6d+O0N070OSD/1Jgw4nonFk5px/hHABevg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792910153;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
	 References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=sqllzQpnSXM885vnUUOktAkb3O5P1CclbvgGH8lrLKU=;
	b=ChNj96WYIRWvbBcr99kP2coceAkPkd0YrvNb+w9Z7wufWuM3tNbT2fMt6/K+j/+9qkfo
	 ShwMqN54v+WMQLo9WKW54nm1lf6Y8i7/GBmIZKOgx7D1h/YXcYxfZhPh/L5XcX2LWkLnD
	 xHa7S+Ud1HrJE2LMKgIopb+QJUow2aosYnWlwXeCS5WGuR6jriTBUcNf37LFJtUnIQDV5
	 32X+SNaFFYO+60IGdw/OfnKS8nQc5zwfbEjM2Nl0Xf3Y7vDWTxrOtlCXDTrsG+0qSgxjW
	 +eY0l4l6EPOVl+ca4fjdbBmGkFNjBHM/h+8qT3dWbMDXMFSjByi0KSV3pedvxnNGDuQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=tylercipriani-com.20251104.gappssmtp.com header.i=@tylercipriani-com.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=XMlCPz5y;
	dmarc=none header.from=tylercipriani.com;
	spf=none smtp.mailfrom=tylercipriani.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 41946606A322;
	Sun, 25 Oct 2026 06:35:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=tylercipriani-com.20251104.gappssmtp.com header.i=@tylercipriani-com.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=XMlCPz5y
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.51
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792910152;
	b=mqStyueWOlaNHPu8EGCQ6y7jsyxp+eXjwprQ3dWeNCi6Gvmm0ni0GsPpgD5oI8+pmX03
	 m7oDSd8e9C1P9o0zGUblQoTodk/tOnp01JoZ5ndCTDHI5woyCLsz/t9D4i1I4uT4wQW/C
	 XawTDKdTRhhA8HYiR8S+Z98W5qoqgDXm/sshVuITCOAY7+ZSyW0vLrZbVfFiNUkkMD3gb
	 aC7bQ1rLN0h75WIkcuqYq4WLlxOA/PivGF8uefSsBkKMFftTmEdC4X/oWE8os/MwCFkbC
	 hjOWC8ZeVD+aDOpKkSfldfzTP4QhKg0bS794+/IdDwSpceN+UhanEQXjfKAHVcVEP2w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792910152;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=sqllzQpnSXM885vnUUOktAkb3O5P1CclbvgGH8lrLKU=;
	b=4XkVSKL8y4ausmP7kbyLO/2O0Ud4u/v/HYEbxCWRs9sfJuW24jKrBITWkKIR/zlKHPgn
	 47bhJhb85E/UDSBszrsaIHqj3bTjOz9oHb0vwDWoqOFuToHq421GlWnA6BUtf4ZVkbMRn
	 CXMz5I2qTvF9hInlxRM9ctkQkM099nLmUTRj4wCuLp+U+H7CMFbrlq6tYt/YtvncVUxDQ
	 CRdle6aiDoMXl8pFSAUap6jTgetAHdF0jwXdAj1tXWEZAOA58Am4WBsFV/v724K9qH3AK
	 hVvKtn8unKD1XPHkYalmh3df8NNcAKyXfXgFRFzF/teY5dHnuaZ4shZBotI/DNWtnEw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=tylercipriani.com;
	spf=none smtp.mailfrom=tylercipriani.com;
	dkim=pass header.d=tylercipriani-com.20251104.gappssmtp.com header.i=@tylercipriani-com.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=XMlCPz5y;
	arc=none smtp.remote-ip=209.85.161.51
X-Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 100F3606A31E
	for <git@vger.kernel.org>; Sun, 25 Oct 2026 06:35:51 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 100F3606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tylercipriani.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=tylercipriani.com
X-Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-6cfed5dd083so1424995eaf.1
        for <git@vger.kernel.org>; Sat, 24 Oct 2026 23:35:51 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=tylercipriani-com.20251104.gappssmtp.com; s=20251104; t=1792910151; x=1793514951; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=sqllzQpnSXM885vnUUOktAkb3O5P1CclbvgGH8lrLKU=;
        b=XMlCPz5y8G2a/3+IrTMWv8oSOOr1Oow4/168dRsRTg5stCCyQM2dkSWGiwCSq95nAM
         FO8LkLNGasAlXhQ8GFqfQeKDQuQmFP65/sGyqVSaTeux5URuluiDfaQ0At9n44SeRybi
         Pb6g5o+eJlXSk4Rz681QaDlKPo7E41Fk5lKHOpQk9Vnkd6nJwHnQbZf0woBv8NnKY5Ao
         I85rdwyP+rFq/thY2tGUmJWRdMlgkMuMbHitwkRnMvMCVL7Bq0y+VcYQ3pA9DEr/OA6v
         u5IO1XoNjZx42ex5fc6Z/MiHXtKhaJWZhOKKmv6VeUhR/3qbdWDSoKRGsRKerGwTGx/p
         nIew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792910151; x=1793514951;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
         :to:cc:subject:date:message-id:reply-to:content-type;
        bh=sqllzQpnSXM885vnUUOktAkb3O5P1CclbvgGH8lrLKU=;
        b=RatAfrql/SuhrMqqGLFROcyAZYEW/WT8FoPSmQnspZdtbcK4bq72D99x7ARCNdssTm
         arEhRf+8Rwy66d0LD7OxUgNJLeMFh/K2Yb6F0CZPdhveGhicg4TV8u5QNWnFYeHcUbwJ
         V1s0jrCURxVCckHIyrw/bOb4kNIQ+aq3KTIUN2ZHMZAOtGERDewYepQqQ3M1PS2FKWSj
         X8L+qAACuKp16SjrLUR0tg9D0fPsF3hQsFfHs+/f0WwhHYNDNe1P3ZtW6usZ8DiDTX7b
         9R1WKCTlLXNh4ljKAbGfrYZwlniWabJ57Ncad4YfgACr8+oCqebgQq0iZjH/kRERhE9L
         Vg2g==
X-Gm-Message-State: AFq9FYJUj5M8zWsu+rv2ZBrgRatC7uHzoLMnIQ45uiSy1FrFmXyprkI6
	wCLNAicrxl2r6fZTxvxpVlxaxv3lTS5P9i5rfWxKbnqtTVgocF8C0eYN/Vlhtr7Rc50utE0ZiCT
	BjgY5
X-Gm-Gg: AYBFou1Sq1CXZkTZ2CMFKLSXXNhEWKCmlIULOWgqWuXQawJwBYufjiP5mM/MVbDsj94
	BfIzL0mtrXlsqS71xCD+8dqPhQ2u+ozymrGxxWs//LwJu/1ZamMPi6tVlKAHU5xV3svkf3GNf9H
	w3xztw0Z2nXPoNB9KPc/RssSXjCSnfrLIJlwtPsWLwjipYq42/fL8YPp9uhJqbm8NxA37WYPs+b
	SdX0a1GXdSarse4pAu8DOqLFw2Y42NRfWUQLbJxvxPMd18hT6tblR9fOxG/qP3x5ypvtJgrCQlt
	qR2L8bkyNwNVyo+2LynX4nlF74lj20dTGDYr5YVlyA4BcoYxMF+0nlvE6YKGOVB88g92SIW7cLn
	QTzdUquw6ZWuof83xrDhkph/cYb1bKNGRiq9fLmZgZGfWJbvflXC9SbVwo5KTFTx+2QDbxrvqMt
	E0+tuLjYGFuT6jIlzX8ftCcjsDDRCRANpISQ2AsqAWaWyzQyACkVwvKqNgzdUIs1129A69ansyQ
	HriBzCVfNMeDVupP2Vboryx5kn0pE45vLUjvfy6uExKQW5rw6UQ4AUElg==
X-Received: by 2002:a05:6820:1508:b0:6e5:5dc5:14f3 with SMTP id 006d021491bc7-70ba0e32c57mr1880289eaf.44.1792910150975;
        Sat, 24 Oct 2026 23:35:50 -0700 (PDT)
X-Received: from localhost ([161.97.204.248])
        by smtp.gmail.com with UTF8SMTPSA id 006d021491bc7-70b9e04aa58sm4207903eaf.7.2026.10.24.23.35.50
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 24 Oct 2026 23:35:50 -0700 (PDT)
X-Cc: Jeff King <peff@peff.net>,
	Junio C Hamano <gitster@pobox.com>,
	Michael Montalbo <mmontalbo@gmail.com>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Tyler Cipriani <tyler@tylercipriani.com>
X-Mailer: git-send-email 2.47.3
X-In-Reply-To: <20261025063508.3026136-1-tyler@tylercipriani.com>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list