From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9B8A546BAE for ; Fri, 18 Jul 2025 21:37:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9544B40611; Fri, 18 Jul 2025 21:37:04 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5F49540611 for ; Fri, 18 Jul 2025 21:37:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=axeTnrEqtJIzGo/ZZrECdc7zz3lwTcXxQ7uR1+CeDig=; b=Jp78TDQ+0uWwCEms7NSbebG3yCVugP2K3YOK9xSS7OA2h4Y+yhXV7cimub6i8A0ww7cHBf 1o93Bqtx7VY9ZQ+ZWJRZRNQBCTtjjC0j5fyvVWKK0AQpdFVN8bMuloBB9+NwWfIRoLjbtq Lvvz63yJ1AAL8FEHnB0tb3uCiah+0DI= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-jmE_lZ-2NHygsrtFPBPXIg-1; Fri, 18 Jul 2025 15:36:58 -0400 X-MC-Unique: jmE_lZ-2NHygsrtFPBPXIg-1 X-Mimecast-MFC-AGG-ID: jmE_lZ-2NHygsrtFPBPXIg_1752867417 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D3BA51800365; Fri, 18 Jul 2025 19:36:57 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ADB5818003FC; Fri, 18 Jul 2025 19:36:56 +0000 (UTC) From: Kevin Traynor To: Marat Khalili Cc: dpdk stable Subject: patch 'buildtools/test: scan muti-line registrations' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:30:50 +0100 Message-ID: <20250718193247.1008129-116-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 9LQCGFmml2Of_y1YDNct80A2lhDQz23IlBJiuE3_t7o_1752867417 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 24.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2e783994260f5efde0d19ebc383bb16357698cef Thanks. Kevin --- >From 2e783994260f5efde0d19ebc383bb16357698cef Mon Sep 17 00:00:00 2001 From: Marat Khalili Date: Wed, 18 Jun 2025 13:39:46 +0100 Subject: [PATCH] buildtools/test: scan muti-line registrations [ upstream commit 778688b445e1d42e2e30cca29c0301dc94f32af5 ] Test list is currently generated by scanning all files for macros starting with `REGISTER_` and ending with `_TEST`. Unfortunately, this was done line-by-line, and macros split into several lines were silently ignored resulting in tests being excluded from test suites without any warning. Make regular expression multiline, capturing everything until the closing parenthesis. (There should be no nested parentheses due to the nature of the arguments these macros accept.) The rest of the functionality stays the same. The result was manually compared to be identical to the previous version. Fixes: 0aeaf75df879 ("test: define unit tests suites based on test types") Signed-off-by: Marat Khalili --- buildtools/get-test-suites.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/buildtools/get-test-suites.py b/buildtools/get-test-suites.py index fd22d25f36..c3a99a862e 100644 --- a/buildtools/get-test-suites.py +++ b/buildtools/get-test-suites.py @@ -7,8 +7,10 @@ import re input_list = sys.argv[1:] -test_def_regex = re.compile(r"REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)") +test_def_regex = re.compile( + r"^\s*REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)[^)]*\)", re.MULTILINE) test_suites = {} # track tests not in any test suite. -non_suite_regex = re.compile(r"REGISTER_TEST_COMMAND\s*\(\s*([a-z0-9_]+)") +non_suite_regex = re.compile( + r"^\s*REGISTER_TEST_COMMAND\s*\(\s*([a-z0-9_]+)[^)]*\)", re.MULTILINE) non_suite_tests = [] @@ -21,10 +23,9 @@ def get_fast_test_params(test_name, ln): for fname in input_list: with open(fname, "r", encoding="utf-8") as f: - contents = [ln.strip() for ln in f.readlines()] - test_lines = [ln for ln in contents if test_def_regex.match(ln)] - non_suite_tests.extend([non_suite_regex.match(ln).group(1) - for ln in contents if non_suite_regex.match(ln)]) - for ln in test_lines: - (test_suite, test_name) = test_def_regex.match(ln).group(1, 2) + contents = f.read() + non_suite_tests.extend( + match.group(1) for match in non_suite_regex.finditer(contents)) + for match in test_def_regex.finditer(contents): + (test_suite, test_name) = match.group(1, 2) suite_name = f"{test_suite.lower()}-tests" if suite_name in test_suites: @@ -33,5 +34,6 @@ for fname in input_list: test_suites[suite_name] = [test_name] if suite_name == "fast-tests": - test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln) + test_suites["fast-tests"][-1] += get_fast_test_params( + test_name, match.group(0)) for suite in test_suites.keys(): -- 2.50.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-18 20:29:15.058408970 +0100 +++ 0116-buildtools-test-scan-muti-line-registrations.patch 2025-07-18 20:29:11.055907714 +0100 @@ -1 +1 @@ -From 778688b445e1d42e2e30cca29c0301dc94f32af5 Mon Sep 17 00:00:00 2001 +From 2e783994260f5efde0d19ebc383bb16357698cef Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 778688b445e1d42e2e30cca29c0301dc94f32af5 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org