From patchwork Tue Sep 12 06:07:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gray X-Patchwork-Id: 138183 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp409886vqx; Tue, 12 Sep 2023 06:32:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEL/Mn9brkw9hEF1i+qUJdTkVeG3x/e+T9Eun7tJx4mkM1240/8EnuyNGwKT11phbJeY5YC X-Received: by 2002:a05:6808:1a2a:b0:3a4:57a7:b30e with SMTP id bk42-20020a0568081a2a00b003a457a7b30emr16103348oib.26.1694525554178; Tue, 12 Sep 2023 06:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694525554; cv=none; d=google.com; s=arc-20160816; b=MAM9yyvIxNWARhqDuvv7P7HiEQLsPukQk/f6zPvsVUs0LveZEGRN2BsQ+RODoFgmGc kVMqDtd4YT5ki0p++ZkOyqe3GkfjxOsbI9NdTkWmjksi3fizrSy199XXWgmjnUQlRRlx 0ZBEVpg6v98GpKTKAx56wljU8Tfwizzq6I6er8pZZOPKpMLyJKXSbOxbKTwzyR4882p2 MsLEpCH45aeKChj6WBzvPghI6ws640B6w449/CI6tTKWKcLCA4iMWY0s+yl3N8adXzXM lZnkQ7mlAQRSEVb6stpjALguW2JF/r0nMFb1OIcB/Imw2KMVUTOSTl2XPA9Os5oXX8SD G0Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pVsoSIX0LquyhqYU7mNO5pYiIavcWpaflJ3uRYxt3cM=; fh=iXnGog/S+cxG51hz3+a6seiRv5742LjMh//2j1hYtKc=; b=NM+Ro8DcbZAZ9UelLPxlOQiyXaUks3mrRYUdYKvmrnVybJuwF6uum0ga/+SEkfQx27 5jepFdL0NF4XN6tcn6K3S2auBYrbMRSqKZoyyuRkQ6xTLmEiWP6NrWbXZuV1NzOgrlLZ 6FY2JP2iJodaM6/T2GXsDZuZyEsvwYniU9mhkeIy9OzFnFu/GUxQx4JyfXiuK+bxQUOP i6jf38/9EmrA4zYGQR0RPZ46GxNu9nMcjm8ymlJ5iCpqZNF2PtnWLzDT8h72FCfOTK6j N9Ieym1wKl0foDJkeof3NkLE25cE334syzHNOLrZQgq+eFh3QgJX4TzCFHJNFTb7zVUb CAQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=LWDxNvMG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id j193-20020a638bca000000b005644a9be955si5965321pge.179.2023.09.12.06.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 06:32:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=LWDxNvMG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6FF5B8028541; Mon, 11 Sep 2023 23:09:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230195AbjILGJU (ORCPT + 39 others); Tue, 12 Sep 2023 02:09:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbjILGJE (ORCPT ); Tue, 12 Sep 2023 02:09:04 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 829CC10EC; Mon, 11 Sep 2023 23:08:53 -0700 (PDT) Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C66QTb019715; Tue, 12 Sep 2023 06:08:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=pVsoSIX0LquyhqYU7mNO5pYiIavcWpaflJ3uRYxt3cM=; b=LWDxNvMG8lYzsC1aUXoW6JzDqfSHUsc3KXrSFlJ/IbbQdIBjS3awOnuZFmvHOvMK1GAD 9wgwsdHloDtmy90kM26tqaBl/twjnsHMiIFlARXGX9aCrIs2j17VJLo7ti+LsQK0+C1+ 3tKUqsp2cav7K8MKsWjHBjV12+Y5jdsjlADptH9KxRLmDkON/C5bAy2UC8Q4V0a6cEGD lLqzv0S30HOwVFzd4m4ryAhR520vaDCWSbmkDtwaFCz6SXhDjcmYcy7c8JTtMzrPq+Uc YtQgJV1B7ZBID+vM/QHlMmxYK+5cyVZwsZQ6YZmkwRYrBzq8UJXzIRhrpycag4pEtlKB IA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2j2m0m8y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:20 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38C66oJK022824; Tue, 12 Sep 2023 06:08:19 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2j2m0m7m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:19 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38C5K8rm012005; Tue, 12 Sep 2023 06:08:18 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3t15r1r6aq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:17 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38C68GpI43450858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 06:08:16 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 198242004B; Tue, 12 Sep 2023 06:08:16 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8959D2004E; Tue, 12 Sep 2023 06:08:15 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Sep 2023 06:08:15 +0000 (GMT) Received: from bgray-lenovo-p15.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 42882604D2; Tue, 12 Sep 2023 16:08:13 +1000 (AEST) From: Benjamin Gray To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, llvm@lists.linux.dev, linux-pm@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Jonathan Corbet , Ian Abbott , H Hartley Sweeten , Nathan Chancellor , Nick Desaulniers , Tom Rix , Jan Kiszka , Kieran Bingham , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Todd E Brandt , Andrii Nakryiko , Mykola Lysenko , Shuah Khan , Benjamin Gray Subject: [PATCH v2 1/7] ia64: fix Python string escapes Date: Tue, 12 Sep 2023 16:07:55 +1000 Message-ID: <20230912060801.95533-2-bgray@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912060801.95533-1-bgray@linux.ibm.com> References: <20230912060801.95533-1-bgray@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: EvGCAH8YbUzwSS0IFNvAtrUQxSrHti_W X-Proofpoint-ORIG-GUID: VcYwa2_Qk-Wr4TTJkO7Q7SON10cC7pI1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_03,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 phishscore=0 clxscore=1011 malwarescore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 spamscore=0 adultscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120050 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 11 Sep 2023 23:09:54 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776838827356267240 X-GMAIL-MSGID: 1776838827356267240 Python 3.6 introduced a DeprecationWarning for invalid escape sequences. This is upgraded to a SyntaxWarning in Python 3.12, and will eventually be a syntax error. Fix these now to get ahead of it before it's an error. Signed-off-by: Benjamin Gray --- arch/ia64/scripts/unwcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/scripts/unwcheck.py b/arch/ia64/scripts/unwcheck.py index 9581742f0db2..adc24152d3b9 100644 --- a/arch/ia64/scripts/unwcheck.py +++ b/arch/ia64/scripts/unwcheck.py @@ -21,7 +21,7 @@ if len(sys.argv) != 2: readelf = os.getenv("READELF", "readelf") -start_pattern = re.compile("<([^>]*)>: \[0x([0-9a-f]+)-0x([0-9a-f]+)\]") +start_pattern = re.compile(r"<([^>]*)>: \[0x([0-9a-f]+)-0x([0-9a-f]+)\]") rlen_pattern = re.compile(".*rlen=([0-9]+)") def check_func (func, slots, rlen_sum): From patchwork Tue Sep 12 06:07:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gray X-Patchwork-Id: 138280 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp504511vqx; Tue, 12 Sep 2023 08:56:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEpM3jPDwpUskJpG+oZJ2f+14uHufI7flFR1Ms27cASd7ONTlnPzv0PEiX/re4eoEbsWPLy X-Received: by 2002:a17:90a:fe8f:b0:26d:124e:571a with SMTP id co15-20020a17090afe8f00b0026d124e571amr12117625pjb.26.1694534161081; Tue, 12 Sep 2023 08:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694534161; cv=none; d=google.com; s=arc-20160816; b=QEPPmbHcPQYf6Qyuea7o72KPJRUo6nOb6U7DBi6PLg9TSbq2O+ezzOj196wCRjdpZ7 Fh8zVMCbUdZVaJm9rJbS2bESIsTMXPS3FzNbCdEWwDH02ecxQW9PMVVMZ4Ou0aMP6/Yw au731v9sAmpQH/YcwFH0sVkrbl7bV9tHUNyIwZBNfmAkydaB8SPa/VH5CF0PhV6MMIib 0fw2l5CoacDqgW2KxAQczW3GMdJbpI8dgqKeHd41LWngLipMrPDksl9fOM4RU/24mUiI NltUgiQ8843waX7uo/pOZxufykbbDk9Lt55/l7WGJKOjHcED3NAmAXaLNExNPYMhVGeF hOyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eeIpZhLNEW5AXZKRPNrYr3hGhad3rh5/hRfI/n3KT8A=; fh=iXnGog/S+cxG51hz3+a6seiRv5742LjMh//2j1hYtKc=; b=QIHRw0rjVRtOZt4QDE+KmA2aXwL1ExnCVdNSPKWu6PZknpQ7p5LZk8N3YmX71JaQ// wkyFmndF3Sji6zbNPPgXuilGMGLrQZQ22W76Yy1vFoBUKgktVQLZ+mLPlS+0H6hBVC5k ltSlEE+GdGf02Niqit+rIcf/+kddFVA0tm1jpq1KU7pXQAmRfCrinpsaDvM0qenWRIcX y6z2yvbUfJA0VQU2rZaeD1kyJyXEZVkLb1vWB4OL/0jOHz6BHNuX9QpFpelUPx6tO6mP 3APvX2+KhWHIUr/WB46DJR7gp/tJkjFucvN7zskmsubdlHNMSrLXn2vi/4r1m0EIKLX/ 4iUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=aKfrsTWn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id z1-20020a17090ad78100b0026d4e16c957si10063852pju.77.2023.09.12.08.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 08:56:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=aKfrsTWn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6D61F806E4CF; Mon, 11 Sep 2023 23:10:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229902AbjILGJd (ORCPT + 39 others); Tue, 12 Sep 2023 02:09:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbjILGJF (ORCPT ); Tue, 12 Sep 2023 02:09:05 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27B210F3; Mon, 11 Sep 2023 23:08:53 -0700 (PDT) Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C66IPF019526; Tue, 12 Sep 2023 06:08:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=eeIpZhLNEW5AXZKRPNrYr3hGhad3rh5/hRfI/n3KT8A=; b=aKfrsTWn+TW2qWV4le8BpfyyzcVZYv4esJ3fWqO8vcZ49dan28/3S+jqp92UlYKVnDJk BXv7+Gv1eblGANxbj7ahm0cxENgbYSCZgEzlmiyzZSjvoDWMQsJX/RMPjwiKmDXJpo7R +CZYO84/UbNXQr4PLLHA6r6vQxgsiMvSDkql/c7r9+VE2WEibu7V9glYOpdiKK8J+cip ELJsksCLHcvJC+a5xwcgvZHxbqZQl91CNpppt8yi5vd3nzLJ1tVi9bUG8iPht1J9CK+W hcp7wLVjn6jC88UlFsUsIGMF8AawcidUqwV9QKqhtxQyfAtueBfUz182I6B7ZKgm2//O ZQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2j2m0m9k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:20 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38C66bNh020262; Tue, 12 Sep 2023 06:08:19 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2j2m0m7y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:19 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38C4gMur002367; Tue, 12 Sep 2023 06:08:18 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3t158k0c7y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:18 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38C68GCT43450866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 06:08:16 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88CA320049; Tue, 12 Sep 2023 06:08:16 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 879F52004F; Tue, 12 Sep 2023 06:08:15 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Sep 2023 06:08:15 +0000 (GMT) Received: from bgray-lenovo-p15.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 4A404602EF; Tue, 12 Sep 2023 16:08:13 +1000 (AEST) From: Benjamin Gray To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, llvm@lists.linux.dev, linux-pm@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Jonathan Corbet , Ian Abbott , H Hartley Sweeten , Nathan Chancellor , Nick Desaulniers , Tom Rix , Jan Kiszka , Kieran Bingham , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Todd E Brandt , Andrii Nakryiko , Mykola Lysenko , Shuah Khan , Benjamin Gray Subject: [PATCH v2 2/7] Documentation/sphinx: fix Python string escapes Date: Tue, 12 Sep 2023 16:07:56 +1000 Message-ID: <20230912060801.95533-3-bgray@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912060801.95533-1-bgray@linux.ibm.com> References: <20230912060801.95533-1-bgray@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: nVcX-8eISnUoPLAV3poLceWG0eT8WOC2 X-Proofpoint-ORIG-GUID: OUb1ytoz2-XxgbA7j22UppPEbWA49ZVy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_03,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 phishscore=0 clxscore=1015 malwarescore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 spamscore=0 adultscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120050 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 11 Sep 2023 23:10:02 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776847852808885607 X-GMAIL-MSGID: 1776847852808885607 Python 3.6 introduced a DeprecationWarning for invalid escape sequences. This is upgraded to a SyntaxWarning in Python 3.12, and will eventually be a syntax error. Fix these now to get ahead of it before it's an error. Signed-off-by: Benjamin Gray --- Documentation/sphinx/cdomain.py | 2 +- Documentation/sphinx/kernel_abi.py | 2 +- Documentation/sphinx/kernel_feat.py | 2 +- Documentation/sphinx/kerneldoc.py | 2 +- Documentation/sphinx/maintainers_include.py | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/sphinx/cdomain.py b/Documentation/sphinx/cdomain.py index a99716bf44b5..de5d132d94c5 100644 --- a/Documentation/sphinx/cdomain.py +++ b/Documentation/sphinx/cdomain.py @@ -93,7 +93,7 @@ def markup_ctype_refs(match): # RE_expr = re.compile(r':c:(expr|texpr):`([^\`]+)`') def markup_c_expr(match): - return '\ ``' + match.group(2) + '``\ ' + return '\\ ``' + match.group(2) + '``\\ ' # # Parse Sphinx 3.x C markups, replacing them by backward-compatible ones diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py index b5feb5b1d905..49797c55479c 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -138,7 +138,7 @@ class KernelCmd(Directive): code_block += "\n " + l lines = code_block + "\n\n" - line_regex = re.compile("^\.\. LINENO (\S+)\#([0-9]+)$") + line_regex = re.compile(r"^\.\. LINENO (\S+)\#([0-9]+)$") ln = 0 n = 0 f = fname diff --git a/Documentation/sphinx/kernel_feat.py b/Documentation/sphinx/kernel_feat.py index 27b701ed3681..b5fa2f0542a5 100644 --- a/Documentation/sphinx/kernel_feat.py +++ b/Documentation/sphinx/kernel_feat.py @@ -104,7 +104,7 @@ class KernelFeat(Directive): lines = self.runCmd(cmd, shell=True, cwd=cwd, env=shell_env) - line_regex = re.compile("^\.\. FILE (\S+)$") + line_regex = re.compile(r"^\.\. FILE (\S+)$") out_lines = "" diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py index 9395892c7ba3..8dc134904b90 100644 --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -130,7 +130,7 @@ class KernelDocDirective(Directive): result = ViewList() lineoffset = 0; - line_regex = re.compile("^\.\. LINENO ([0-9]+)$") + line_regex = re.compile(r"^\.\. LINENO ([0-9]+)$") for line in lines: match = line_regex.search(line) if match: diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sphinx/maintainers_include.py index 328b3631a585..dcad0fff4723 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -77,7 +77,7 @@ class MaintainersInclude(Include): line = line.rstrip() # Linkify all non-wildcard refs to ReST files in Documentation/. - pat = '(Documentation/([^\s\?\*]*)\.rst)' + pat = r'(Documentation/([^\s\?\*]*)\.rst)' m = re.search(pat, line) if m: # maintainers.rst is in a subdirectory, so include "../". @@ -90,11 +90,11 @@ class MaintainersInclude(Include): output = "| %s" % (line.replace("\\", "\\\\")) # Look for and record field letter to field name mappings: # R: Designated *reviewer*: FullName - m = re.search("\s(\S):\s", line) + m = re.search(r"\s(\S):\s", line) if m: field_letter = m.group(1) if field_letter and not field_letter in fields: - m = re.search("\*([^\*]+)\*", line) + m = re.search(r"\*([^\*]+)\*", line) if m: fields[field_letter] = m.group(1) elif subsystems: @@ -112,7 +112,7 @@ class MaintainersInclude(Include): field_content = "" # Collapse whitespace in subsystem name. - heading = re.sub("\s+", " ", line) + heading = re.sub(r"\s+", " ", line) output = output + "%s\n%s" % (heading, "~" * len(heading)) field_prev = "" else: From patchwork Tue Sep 12 06:07:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gray X-Patchwork-Id: 138495 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp756506vqx; Tue, 12 Sep 2023 17:06:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEk8f45VoPKnkIZFJvkrEmYnRHEYX4j9mYyhr+rk1YDvlB2ZdsYhyGQVSI2UrsotrxHI0JG X-Received: by 2002:a1f:df01:0:b0:48d:3983:24b3 with SMTP id w1-20020a1fdf01000000b0048d398324b3mr1207498vkg.8.1694563613038; Tue, 12 Sep 2023 17:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694563612; cv=none; d=google.com; s=arc-20160816; b=zxBlfIPWRQ4DA+L8/c4ZYpETlw+VmoM8OOsttgkl6rasR71ceby1u8gs2pRoslKfsV LCJ6q75DJMPVnu2J0xO6KqbvRjriLNDbRdnpsTkKzLj34LRLw4DBC7rLdqNqRe9CJsfp llf4PXASStAvj3lSo9AP4dCPMTsdFK3E3fljljO+PjtQcnqsWN+9/aMtTJtOZqAI5MRG AsmMvgPX+MrSvZcbqyDOxyeJq8/DRRKD4fKgvISuZdmrh4YPYNGj83hfZYMMEyLazIMU d2DdL4VaItAYxZhl7BbfTSAmqkk60vOuoe4AC7TF1K4zjl3kdw66U2GIQQK3uTFEFyaI sxtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i/BWHqLFUbyvP7xwuZNU6sl0evU8IuBy8XSKXM7iy4M=; fh=iXnGog/S+cxG51hz3+a6seiRv5742LjMh//2j1hYtKc=; b=eJEmZVLWzM0eJ76eY0NMwIcqcwX1TQIMXf05mvO5H9uXmGh6rqxKzHPfytmQ6Y2Hks Z1vajk9VY4sDzcjkLFzeuX8jRGJ9ID7uC5Ue0nWxRFTCC6rV6I9kPlyd5vaCcPzhh6iD 5ffTEQ+5REKcMVWPRaUcPrrFBf3Se+JV+wAZSSkPeckRlbzSNcNLqv1XnzEY5NRvqYv1 ZcAOo383LQfebT1vo+0/RkNjeYJnEkV+cNA9eB6v+x8vVGxP6wisaFXyGj4hKeUjac+g OxVqEbi6+lbNcatE+BS6tgXB34czCD0vd2mrzHl1oh/4S3XX4vi4vGSqf4RlJ1UClXgi dD5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=aAvDBdoO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id g2-20020a056a0023c200b0068bc08d8a3dsi6429994pfc.262.2023.09.12.17.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 17:06:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=aAvDBdoO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 40A9B83AB342; Mon, 11 Sep 2023 23:09:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbjILGJO (ORCPT + 39 others); Tue, 12 Sep 2023 02:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229710AbjILGIx (ORCPT ); Tue, 12 Sep 2023 02:08:53 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51CE110C6; Mon, 11 Sep 2023 23:08:49 -0700 (PDT) Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C67ptP023034; Tue, 12 Sep 2023 06:08:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=i/BWHqLFUbyvP7xwuZNU6sl0evU8IuBy8XSKXM7iy4M=; b=aAvDBdoOF2s0iz8P+59qU5iannJGZ5Z/k3DfwMzND5xZNFUhooKFry4mSzQWnaD4kPkm Uz/aS0PJGmDmgzdkAJhU+oZZUcC1HZNiHW/aVQER1DZdq1XD56GuVS1iYuU1abcuKupc 27UkO8cGjNh3Zh+ZZ2IGtfAcZXkyC0ABACfjD81VknI+QJacjZ8x3UtZAu68PST6+BV/ POtmUjwpFhOHNEdn92kNoU/x1ky7v9XBInhZKxWG9W4/j9JBIYjt9QHXqZNC9nnEGBZC FE1mkKh9lFwbt/K4yO09Rs2SeyumvI5lp3RQNHBr4LkzTtDzu5wGZB02wDLEPCZewPgn Gg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2jbhr2gm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:21 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38C68KlR026058; Tue, 12 Sep 2023 06:08:20 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2jbhr2f5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:20 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38C50QcL024061; Tue, 12 Sep 2023 06:08:18 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3t131t14q9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:17 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38C68GK751511700 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 06:08:16 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 19B132004F; Tue, 12 Sep 2023 06:08:16 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 894CD2004D; Tue, 12 Sep 2023 06:08:15 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Sep 2023 06:08:15 +0000 (GMT) Received: from bgray-lenovo-p15.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 51EA460525; Tue, 12 Sep 2023 16:08:13 +1000 (AEST) From: Benjamin Gray To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, llvm@lists.linux.dev, linux-pm@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Jonathan Corbet , Ian Abbott , H Hartley Sweeten , Nathan Chancellor , Nick Desaulniers , Tom Rix , Jan Kiszka , Kieran Bingham , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Todd E Brandt , Andrii Nakryiko , Mykola Lysenko , Shuah Khan , Benjamin Gray Subject: [PATCH v2 3/7] drivers/comedi: fix Python string escapes Date: Tue, 12 Sep 2023 16:07:57 +1000 Message-ID: <20230912060801.95533-4-bgray@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912060801.95533-1-bgray@linux.ibm.com> References: <20230912060801.95533-1-bgray@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Ht3TfvFc0_YeVg_8IiUdPAm8k0D23rNZ X-Proofpoint-ORIG-GUID: muMt5JJeGDhOfEDCB02ZP0AzKiBwbhnu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_03,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120050 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 11 Sep 2023 23:09:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776848914159546645 X-GMAIL-MSGID: 1776878735020842704 Python 3.6 introduced a DeprecationWarning for invalid escape sequences. This is upgraded to a SyntaxWarning in Python 3.12, and will eventually be a syntax error. Fix these now to get ahead of it before it's an error. Signed-off-by: Benjamin Gray --- drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py b/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py index 90378fb50580..d19101fc2a94 100755 --- a/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py +++ b/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py @@ -44,7 +44,7 @@ def routedict_to_structinit_single(name, D, return_name=False): lines.append('\t\t[B({})] = {{'.format(D0_sig)) for D1_sig, value in D1: - if not re.match('[VIU]\([^)]*\)', value): + if not re.match(r'[VIU]\([^)]*\)', value): sys.stderr.write('Invalid register format: {}\n'.format(repr(value))) sys.stderr.write( 'Register values should be formatted with V(),I(),or U()\n') From patchwork Tue Sep 12 06:07:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gray X-Patchwork-Id: 140516 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1147293vqi; Fri, 15 Sep 2023 08:57:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGFB28z3C/CcM0nXVpNbdCAqh+6UMXgjQHg8sLKhJ2Zur7v7+4HCnTCjj8TF/6vc+wQTU+ X-Received: by 2002:a05:6a00:179b:b0:68f:b7f6:f1df with SMTP id s27-20020a056a00179b00b0068fb7f6f1dfmr2400888pfg.5.1694793430165; Fri, 15 Sep 2023 08:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694793430; cv=none; d=google.com; s=arc-20160816; b=kSKvbN4OBpVERsi6Lfxkw6m4IHIy8cjYYkvHvly2sXo01NKPfPo8D6bHt5Cr9Y4Hp7 AhBSZOQv1k5I/B758aBAMhJqy2GoVhCuQDR+4+NnEwPGu0ESpSmZdc53yIjzKptOyNl3 4dV0QvX4amLSAzPShEiNiUF1sTBcWjcIqBN3Rtg20TTZg7KdK3wnRkvQ0bdI8iIiJK0b Mn2SgX4/I5Qd9/9Puckd7R8JRccRVl0AIHPzp7zjfDP1gMcwkVP4bAybPyIkxq8+6Hca VjQBraeVlQKghhNrEfLsjtE6qRUOda44cZRkgXZApVGPTSpeXqW+x/tQFjmOVfpWs342 SfRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AHbcqJ2CieRG9hp04VV8TGkxNE1F6nI9dc1SB21bi+c=; fh=iXnGog/S+cxG51hz3+a6seiRv5742LjMh//2j1hYtKc=; b=E/Uw7pxZQqG4dyH3AMYRll5Z9CzqlK7C0/Fu49SRdVSgQSYIfqPu6oDZJuyAId/hjT g1QZtaabAY4DxzRrDfZbnOnY52T1rgTXl6rxgX7jKVZ+/rOfsVc5BEyCGb8kGJ8ZGQc6 TSZxOhJCJiJ/fqmyyl8RPSxV0qLx5rSdsxZeG1bA3xf3peQZD1hWfCIdEHvhHtFt4RzA Qa64dqcYTfvx6SxvTwjHngTcunwsWWhGHNJdXYkWFsRfmnxkZeSR8tMsYhxbDPJbe8q6 EURwgnMkDytNY/wRgLAfyuQ6xjGhtysOelWhExUu4bW4x4vgV7fY4PQPEym13kbof8qB 7fyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KL+HGGv6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id cr7-20020a056a000f0700b0068e29a05fa4si3446974pfb.326.2023.09.15.08.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 08:57:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KL+HGGv6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9A43183A98C4; Mon, 11 Sep 2023 23:09:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjILGJh (ORCPT + 39 others); Tue, 12 Sep 2023 02:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbjILGJF (ORCPT ); Tue, 12 Sep 2023 02:09:05 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97CD31703; Mon, 11 Sep 2023 23:08:55 -0700 (PDT) Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C5mYkm022911; Tue, 12 Sep 2023 06:08:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=AHbcqJ2CieRG9hp04VV8TGkxNE1F6nI9dc1SB21bi+c=; b=KL+HGGv6nI2bTy7njwn26PxsHbyEE1JS45DdUTWZ8bBeBB6Yj2aG4RzaFZ8rNn8JHjq6 33w3Hk4LaJnp/RA7mIsjf7cFTcn2czaKsJB5NuIGmpRL1kux2V354quKyHE1xcstH0Eg tMQ+gndQfl8DXw/cqpukXILWeSOwZJHCbUJ0UyHEfg9G8644BXDs4nw+/FE8HezRGpxN buLU/gANH6WviS3YEL6oze0+hEJUql3t1foFx2TrdChLf51BVD3jy+lYMyp6bGgqi7c5 n7lQ/H69ONCv/hlh7o0kvJ8yU95dyajmY0vdOkvuSTly264aa2kvQupcsmq8MCRQtfbH yA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2gmraq03-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:20 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38C67JsQ018554; Tue, 12 Sep 2023 06:08:19 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2gmrapy9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:19 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38C5K8rl012005; Tue, 12 Sep 2023 06:08:17 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3t15r1r6ap-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:17 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38C68GcO28705526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 06:08:16 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0E64620040; Tue, 12 Sep 2023 06:08:16 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7FA5520043; Tue, 12 Sep 2023 06:08:15 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Sep 2023 06:08:15 +0000 (GMT) Received: from bgray-lenovo-p15.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 5956060595; Tue, 12 Sep 2023 16:08:13 +1000 (AEST) From: Benjamin Gray To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, llvm@lists.linux.dev, linux-pm@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Jonathan Corbet , Ian Abbott , H Hartley Sweeten , Nathan Chancellor , Nick Desaulniers , Tom Rix , Jan Kiszka , Kieran Bingham , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Todd E Brandt , Andrii Nakryiko , Mykola Lysenko , Shuah Khan , Benjamin Gray Subject: [PATCH v2 4/7] scripts: fix Python string escapes Date: Tue, 12 Sep 2023 16:07:58 +1000 Message-ID: <20230912060801.95533-5-bgray@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912060801.95533-1-bgray@linux.ibm.com> References: <20230912060801.95533-1-bgray@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: A2TrB0HujiOs_UwzMmju5UXnpzVKn05t X-Proofpoint-ORIG-GUID: 3euzVgIOZ-4yQSvwXOSBFMDwLp03uWEg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_03,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 suspectscore=0 clxscore=1015 mlxscore=0 spamscore=0 adultscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120050 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 11 Sep 2023 23:09:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777119716187079972 X-GMAIL-MSGID: 1777119716187079972 Python 3.6 introduced a DeprecationWarning for invalid escape sequences. This is upgraded to a SyntaxWarning in Python 3.12, and will eventually be a syntax error. Fix these now to get ahead of it before it's an error. Signed-off-by: Benjamin Gray --- scripts/clang-tools/gen_compile_commands.py | 2 +- scripts/gdb/linux/symbols.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py index a84cc5737c2c..649a80005c83 100755 --- a/scripts/clang-tools/gen_compile_commands.py +++ b/scripts/clang-tools/gen_compile_commands.py @@ -170,7 +170,7 @@ def process_line(root_directory, command_prefix, file_path): # escape the pound sign '#', either as '\#' or '$(pound)' (depending on the # kernel version). The compile_commands.json file is not interepreted # by Make, so this code replaces the escaped version with '#'. - prefix = command_prefix.replace('\#', '#').replace('$(pound)', '#') + prefix = command_prefix.replace('\\#', '#').replace('$(pound)', '#') # Use os.path.abspath() to normalize the path resolving '.' and '..' . abs_path = os.path.abspath(os.path.join(root_directory, file_path)) diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py index 5179edd1b627..2a55c4b83306 100644 --- a/scripts/gdb/linux/symbols.py +++ b/scripts/gdb/linux/symbols.py @@ -82,7 +82,7 @@ lx-symbols command.""" self.module_files_updated = True def _get_module_file(self, module_name): - module_pattern = ".*/{0}\.ko(?:.debug)?$".format( + module_pattern = r".*/{0}\.ko(?:.debug)?$".format( module_name.replace("_", r"[_\-]")) for name in self.module_files: if re.match(module_pattern, name) and os.path.exists(name): From patchwork Tue Sep 12 06:07:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gray X-Patchwork-Id: 138355 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp589979vqx; Tue, 12 Sep 2023 11:09:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+QnYhxGUJudnOnfQhbx/Hfq2357pibOhmj4s8odwIIPVnAXQRaJIrxBrHL7CFWuBBh1vN X-Received: by 2002:a05:6a20:f3b0:b0:14d:382c:f908 with SMTP id qr48-20020a056a20f3b000b0014d382cf908mr159897pzb.32.1694542167985; Tue, 12 Sep 2023 11:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694542167; cv=none; d=google.com; s=arc-20160816; b=spDpspGs/3UcwOMlPuerV2EJPbdBQ4P+4LDVIuDvST7aENHd/M5NHbhHg6QliZkWyg kAMc9n/ub+ASpAUOCTyBx+z5QOxVlTkHc08wK6kxFluqFJvNCc6va6Zu8ozQHiCIohHr Oh90dCsnX4PicAQM3ySGtjzMbyT778DbRMXIPlFtDoB7TuuKMVAgzZjcw+Ye+DL9+hHd m1at6QiWlSQ5Q9nI5RRigDVPHzoWhb8CAG8RX51jksgq1O55u2a01/tmZ8QBIeBvyFJP aPEyEdGIjHoFFsAng/1HH87m/ze2jjC+0bhhZSXkaNwFzpCbE0HQu2WJqMch/KabDw10 pKmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=q9Xb8j5HP9E1kLEc7j7wBE0qLNTgFJmUvEApSnloaJU=; fh=iXnGog/S+cxG51hz3+a6seiRv5742LjMh//2j1hYtKc=; b=d6aYjBDkBiwkxI/cv3nDsILHMve6jY2xWULoRh5sK7jY2UAxPxnZtEBbJLr/1GqE0X +UGhpoXqvhNNCLgqjycf496fchHGO21/Lchc9vM8YCkTmqUP3Xft+XZrCEpmTMxwQPdV po28+mgVNBu1YFannQZxo6VU2boHc8zM4eOl8XRJtkCr945h+VNrEt6lhss58NYbTmTk ZRNb8dIFtJPi4a/jSOpXjwdlFiLJLjKjl5GUDV9CBQvX0TlbdCvOyO7ZXU6btsqfOzZf BlVdhccV+5MYF9vJqbauY/veiD9NNt9QRx2BvjSPEQAz4rgX/I9tbK6ItKwtEsZ9r71W wlGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=EZaGrpLx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id k62-20020a638441000000b0057762236debsi5146909pgd.546.2023.09.12.11.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 11:09:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=EZaGrpLx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 3B5788027A59; Mon, 11 Sep 2023 23:09:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbjILGJH (ORCPT + 39 others); Tue, 12 Sep 2023 02:09:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjILGIv (ORCPT ); Tue, 12 Sep 2023 02:08:51 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 188F810D9; Mon, 11 Sep 2023 23:08:48 -0700 (PDT) Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C67nTB022948; Tue, 12 Sep 2023 06:08:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=q9Xb8j5HP9E1kLEc7j7wBE0qLNTgFJmUvEApSnloaJU=; b=EZaGrpLxF3ZbmbWexSEPuBHUXiu2FT2GLVmZlz2kKerksVJ4wPT1J/1zwr8n+eMiEQdy toyNgGg4hO3HWwgOSw5jhF7mslrFm/pHaT8VSLMOQM1vSwLZDbf61XgzDjoetPkZkI8b S6k1JQ/KPGf/R/+BsbS4OsrML3JbAQNg+baXE6b9lMqwAT2ENL5SqiqI921nMyqL9Uaq 1sIepKst/aPqS0nTfV0QaKAoSquWrxIO+m9KT5l1p6aiRgeasBCi83RkEAsm0omiS10s 0pD3fa4h5XpRsSudM1ePoJ5byD+Bf5EodWf49u1VPay++E8pKhdRLGkr1Wzxov9ASgSa FQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2jbhr2mw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:25 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38C67tp6023364; Tue, 12 Sep 2023 06:08:24 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2jbhr2gv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:24 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38C5JffP011974; Tue, 12 Sep 2023 06:08:20 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3t15r1r6bf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:20 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38C68I6U27722392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 06:08:19 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D77EB2004E; Tue, 12 Sep 2023 06:08:18 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DBBF620040; Tue, 12 Sep 2023 06:08:17 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Sep 2023 06:08:17 +0000 (GMT) Received: from bgray-lenovo-p15.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 60CF16051E; Tue, 12 Sep 2023 16:08:13 +1000 (AEST) From: Benjamin Gray To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, llvm@lists.linux.dev, linux-pm@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Jonathan Corbet , Ian Abbott , H Hartley Sweeten , Nathan Chancellor , Nick Desaulniers , Tom Rix , Jan Kiszka , Kieran Bingham , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Todd E Brandt , Andrii Nakryiko , Mykola Lysenko , Shuah Khan , Benjamin Gray Subject: [PATCH v2 5/7] tools/perf: fix Python string escapes Date: Tue, 12 Sep 2023 16:07:59 +1000 Message-ID: <20230912060801.95533-6-bgray@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912060801.95533-1-bgray@linux.ibm.com> References: <20230912060801.95533-1-bgray@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: oXFyySFm0WnKsXVhO1yBMm10V3F6kD7H X-Proofpoint-ORIG-GUID: GD8A1lF_Ao7SODdN_F8A9yrRwXNibOzv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_03,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120050 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 11 Sep 2023 23:09:43 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776856248356674908 X-GMAIL-MSGID: 1776856248356674908 Python 3.6 introduced a DeprecationWarning for invalid escape sequences. This is upgraded to a SyntaxWarning in Python 3.12, and will eventually be a syntax error. Fix these now to get ahead of it before it's an error. Signed-off-by: Benjamin Gray Signed-off-by: Benjamin Gray Acked-by: Adrian Hunter --- tools/perf/pmu-events/jevents.py | 2 +- tools/perf/scripts/python/arm-cs-trace-disasm.py | 4 ++-- tools/perf/scripts/python/compaction-times.py | 2 +- tools/perf/scripts/python/exported-sql-viewer.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index a7e88332276d..980f080a5a2c 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -83,7 +83,7 @@ def c_len(s: str) -> int: """Return the length of s a C string This doesn't handle all escape characters properly. It first assumes - all \ are for escaping, it then adjusts as it will have over counted + all \\ are for escaping, it then adjusts as it will have over counted \\. The code uses \000 rather than \0 as a terminator as an adjacent number would be folded into a string of \0 (ie. "\0" + "5" doesn't equal a terminator followed by the number 5 but the escape of diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py index d59ff53f1d94..de58991c78bb 100755 --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py @@ -45,8 +45,8 @@ parser = OptionParser(option_list=option_list) # Initialize global dicts and regular expression disasm_cache = dict() cpu_data = dict() -disasm_re = re.compile("^\s*([0-9a-fA-F]+):") -disasm_func_re = re.compile("^\s*([0-9a-fA-F]+)\s.*:") +disasm_re = re.compile(r"^\s*([0-9a-fA-F]+):") +disasm_func_re = re.compile(r"^\s*([0-9a-fA-F]+)\s.*:") cache_size = 64*1024 glb_source_file_name = None diff --git a/tools/perf/scripts/python/compaction-times.py b/tools/perf/scripts/python/compaction-times.py index 2560a042dc6f..9401f7c14747 100644 --- a/tools/perf/scripts/python/compaction-times.py +++ b/tools/perf/scripts/python/compaction-times.py @@ -260,7 +260,7 @@ def pr_help(): comm_re = None pid_re = None -pid_regex = "^(\d*)-(\d*)$|^(\d*)$" +pid_regex = r"^(\d*)-(\d*)$|^(\d*)$" opt_proc = popt.DISP_DFL opt_disp = topt.DISP_ALL diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py index 13f2d8a81610..121cf61ba1b3 100755 --- a/tools/perf/scripts/python/exported-sql-viewer.py +++ b/tools/perf/scripts/python/exported-sql-viewer.py @@ -677,8 +677,8 @@ class CallGraphModelBase(TreeModel): # sqlite supports GLOB (text only) which uses * and ? and is case sensitive if not self.glb.dbref.is_sqlite3: # Escape % and _ - s = value.replace("%", "\%") - s = s.replace("_", "\_") + s = value.replace("%", "\\%") + s = s.replace("_", "\\_") # Translate * and ? into SQL LIKE pattern characters % and _ trans = string.maketrans("*?", "%_") match = " LIKE '" + str(s).translate(trans) + "'" From patchwork Tue Sep 12 06:08:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gray X-Patchwork-Id: 139542 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp310753vqi; Thu, 14 Sep 2023 05:28:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErltNkCHxG7syhTWjP1WKbvOjOgVhOJ7MR7lBJJ0EiJvP1Trg5n/S4kFi9rMqHCTmksms8 X-Received: by 2002:a05:6358:5903:b0:141:1469:1f93 with SMTP id g3-20020a056358590300b0014114691f93mr6168223rwf.2.1694694505297; Thu, 14 Sep 2023 05:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694694505; cv=none; d=google.com; s=arc-20160816; b=h9BQkC/lFpWqrzqDnpu43NKvNAsbKPrIUul3fuufhRV2P3Pnj5bvSf6i3MZaKGCIn1 LQvv0I01dBH1SPANFmfPI4l6RrnPIticpF2O4HLToPvpwFPQH+2+62LY9xlidR0o7KtA ag4ScPBps1FdFtBqnieilnViASL+HpzVEW3wn19iIiciTAqANNMxVqTEdth8sI3qP1E9 gRhNWVhbeUZ6a+fPjbnNLJvWKXjK86xY8vp2G/ba8aSKcadXBR7mh8ar0Opzfbwj3yCk T2newpYcAUPPwQS4ZZH7v1pkYxl2ChlmkFIKazFsclGGFM1+zqrUeFNGImGiL/J2x6ry N1rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=D9ft4suxW8ykLbW0M/jyXvmCz9pVutJ/MVv7YYdZiY8=; fh=iXnGog/S+cxG51hz3+a6seiRv5742LjMh//2j1hYtKc=; b=oeRa8I02CHTb4c1Q0GsNg5BMwNjLAkwJqL3TpavITS8tuMwNGVuN+m1alxQ8+hx5/U /MIz3uFvkmUDWRik8mVuG73NOqeCRErHxnkAQLiMSmv/XkZ1mt6SEP8IFg8T339kMsZU eYv+6hz1sQ43yrWhBSFg8UhDTO4nha09O8ZPs22Gj4R8R4i3X0eZ9qZ/jbIWBL5ljkYl 9vQq/NyuYkBugV8oGn9fd95OG8CvDIwb4J9XMK5lMmGr/rGdyh1g5yt0xwqoQd1h98rb CADs1c4iIp/ENMBDARO8wwmFiozqeEIr+S0TQScTLWHBN/6XhxVYVUdcPMVD5iFes9ub TNfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JGyIXs67; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id e13-20020a65678d000000b00569466198b0si1406018pgr.821.2023.09.14.05.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 05:28:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JGyIXs67; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1B7B48083B42; Mon, 11 Sep 2023 23:09:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230167AbjILGJK (ORCPT + 39 others); Tue, 12 Sep 2023 02:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229801AbjILGIw (ORCPT ); Tue, 12 Sep 2023 02:08:52 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FC34E7A; Mon, 11 Sep 2023 23:08:48 -0700 (PDT) Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C67l6h022818; Tue, 12 Sep 2023 06:08:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=D9ft4suxW8ykLbW0M/jyXvmCz9pVutJ/MVv7YYdZiY8=; b=JGyIXs67NjpJBlZqs8XNxydmimSvOSWjo8B8zKqQGdKUqHK+7iCrsZaLF4ryDfDz9kjh UAj48oq7EIBy1XLPU5NYD8TXuYdDlfLlsL2QREhxqSo75Ft0nGbWS1NO45yveF9sV7ua fkXq3W+5FqgCRTkbHfJ6BQuAjtMFJZn9ZpSUvMMkXr2z68fTPLCEbCgfAEuqYUFMYv/4 llzjaiMItzc3UvioVcfgq3QUYY8D79djlwO2srjPDuAmLOJLR9luvPHRIUnrGhZErBvT 4O9dWF9bnG0kKKQtoTFqm0WE/YiM77Q/A3CWshrxHsiav49P1h62AMv55CUCIucyi/sz 1Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2jbhr2pf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:26 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38C68HVT025804; Tue, 12 Sep 2023 06:08:26 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2jbhr2kw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:25 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38C4gMut002367; Tue, 12 Sep 2023 06:08:20 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3t158k0c8c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:20 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38C68IDd62456184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 06:08:19 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D81B220040; Tue, 12 Sep 2023 06:08:18 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB0F22004B; Tue, 12 Sep 2023 06:08:17 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Sep 2023 06:08:17 +0000 (GMT) Received: from bgray-lenovo-p15.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 6822B6064D; Tue, 12 Sep 2023 16:08:13 +1000 (AEST) From: Benjamin Gray To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, llvm@lists.linux.dev, linux-pm@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Jonathan Corbet , Ian Abbott , H Hartley Sweeten , Nathan Chancellor , Nick Desaulniers , Tom Rix , Jan Kiszka , Kieran Bingham , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Todd E Brandt , Andrii Nakryiko , Mykola Lysenko , Shuah Khan , Benjamin Gray Subject: [PATCH v2 6/7] tools/power: fix Python string escapes Date: Tue, 12 Sep 2023 16:08:00 +1000 Message-ID: <20230912060801.95533-7-bgray@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912060801.95533-1-bgray@linux.ibm.com> References: <20230912060801.95533-1-bgray@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: IviUSYOCb5QUHkrRHEz_WD4rjRokRC4F X-Proofpoint-ORIG-GUID: QDmhJDIhqZRLk6cbjGWTKsamLVT9d-7j X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_03,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120050 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 11 Sep 2023 23:09:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777015985263334245 X-GMAIL-MSGID: 1777015985263334245 Python 3.6 introduced a DeprecationWarning for invalid escape sequences. This is upgraded to a SyntaxWarning in Python 3.12, and will eventually be a syntax error. Fix these now to get ahead of it before it's an error. Signed-off-by: Benjamin Gray --- tools/power/pm-graph/bootgraph.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/power/pm-graph/bootgraph.py b/tools/power/pm-graph/bootgraph.py index f96f50e0c336..c53cfdba0365 100755 --- a/tools/power/pm-graph/bootgraph.py +++ b/tools/power/pm-graph/bootgraph.py @@ -77,12 +77,12 @@ class SystemValues(aslib.SystemValues): fp.close() self.testdir = datetime.now().strftime('boot-%y%m%d-%H%M%S') def kernelVersion(self, msg): - m = re.match('^[Ll]inux *[Vv]ersion *(?P\S*) .*', msg) + m = re.match(r'^[Ll]inux *[Vv]ersion *(?P\S*) .*', msg) if m: return m.group('v') return 'unknown' def checkFtraceKernelVersion(self): - m = re.match('^(?P[0-9]*)\.(?P[0-9]*)\.(?P[0-9]*).*', self.kernel) + m = re.match(r'^(?P[0-9]*)\.(?P[0-9]*)\.(?P[0-9]*).*', self.kernel) if m: val = tuple(map(int, m.groups())) if val >= (4, 10, 0): @@ -324,7 +324,7 @@ def parseKernelLog(): idx = line.find('[') if idx > 1: line = line[idx:] - m = re.match('[ \t]*(\[ *)(?P[0-9\.]*)(\]) (?P.*)', line) + m = re.match(r'[ \t]*(\[ *)(?P[0-9\.]*)(\]) (?P.*)', line) if(not m): continue ktime = float(m.group('ktime')) @@ -336,20 +336,20 @@ def parseKernelLog(): if(not sysvals.stamp['kernel']): sysvals.stamp['kernel'] = sysvals.kernelVersion(msg) continue - m = re.match('.* setting system clock to (?P[0-9\-]*)[ A-Z](?P[0-9:]*) UTC.*', msg) + m = re.match(r'.* setting system clock to (?P[0-9\-]*)[ A-Z](?P[0-9:]*) UTC.*', msg) if(m): bt = datetime.strptime(m.group('d')+' '+m.group('t'), '%Y-%m-%d %H:%M:%S') bt = bt - timedelta(seconds=int(ktime)) data.boottime = bt.strftime('%Y-%m-%d_%H:%M:%S') sysvals.stamp['time'] = bt.strftime('%B %d %Y, %I:%M:%S %p') continue - m = re.match('^calling *(?P.*)\+.* @ (?P

[0-9]*)', msg) + m = re.match(r'^calling *(?P.*)\+.* @ (?P

[0-9]*)', msg) if(m): func = m.group('f') pid = int(m.group('p')) devtemp[func] = (ktime, pid) continue - m = re.match('^initcall *(?P.*)\+.* returned (?P.*) after (?P.*) usecs', msg) + m = re.match(r'^initcall *(?P.*)\+.* returned (?P.*) after (?P.*) usecs', msg) if(m): data.valid = True data.end = ktime From patchwork Tue Sep 12 06:08:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gray X-Patchwork-Id: 138034 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp264517vqx; Tue, 12 Sep 2023 01:47:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyoVBn9oifmmizbkeQNiWz/kamSMbLgKm/o24BXYlP0B1Fw1KHbGqsNY9iq2TmW4mZ1WjW X-Received: by 2002:a9d:69cc:0:b0:6b9:62f5:ac62 with SMTP id v12-20020a9d69cc000000b006b962f5ac62mr11268720oto.35.1694508448342; Tue, 12 Sep 2023 01:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694508448; cv=none; d=google.com; s=arc-20160816; b=iYeRdPfqpFVGBvIuLyy3uGPGteyvq2IXU2fC5Jisw2KJ8vgDznOf5rbgQmqG1EESnV 92lmFDqvIKh6xY63MPNMOIzBIFnoiXTzSCuyVHoMJHlRberLE7AsepNVVVrCStGXGrY2 Mf5ZBS2eaVdn5m4NeN5D3GRnDyGwyDY8fYlol/NN45MVtDbGLumj1R0fV7m744GL877O xz2QEFeEXYWh7q2h6cTiXiA2HUwaYr4+B1K1jjYccm9jMUFlY8n7KodoMSoKfFx3wOBu QtuziCcGPlYyibagV2ptRON/5V66UOrI14ya8PFfu7VIN672T81nuPNttdM9WvjSCkFu JBsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Mrt5Om+SBC9plFsiqVzEbfiFYt6ycZbrMHc7cXLbplU=; fh=iXnGog/S+cxG51hz3+a6seiRv5742LjMh//2j1hYtKc=; b=ibl20cfQxslNSGFzDSA878Zfz40UnMwX44gsabEoh1RCHmWyZS2kBWsQmjksuzy5RR 4Fj9u+rnOSbKFAc4K7ciOvjPO6hxGsxdKEAcE0xKb04/wJjIHiOo8ELz1vc8bAlAauXM +yo+jXy6A8uHhXcHnjcKzw0hifg3VRstzlctLFfIXO20Gvurpo9h8Pug3wdFH0R7Fejd 4V9HQSjTXjxpPUc8ESMAmm1GvMWVLlAC0z4zflhJSzc86S8ylnxmFGk6WG8zUJXExlan Juw3RmvcJ+c3BMHOhEbNt3gxaxhowArOL6hH9Ng9BpeoxwvkJofsfAyQOlIMzVFkk35l ozUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZC80FEiG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id az1-20020a056a02004100b005775c819f23si4585493pgb.336.2023.09.12.01.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 01:47:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZC80FEiG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 64405801BE4C; Mon, 11 Sep 2023 23:09:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229703AbjILGIw (ORCPT + 39 others); Tue, 12 Sep 2023 02:08:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbjILGIu (ORCPT ); Tue, 12 Sep 2023 02:08:50 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D780D10D1; Mon, 11 Sep 2023 23:08:46 -0700 (PDT) Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C67nC4022933; Tue, 12 Sep 2023 06:08:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Mrt5Om+SBC9plFsiqVzEbfiFYt6ycZbrMHc7cXLbplU=; b=ZC80FEiGgG1IBhRa7ajAWHytz5Uvo3Eht6YbmUNekhOlmW7SUA1Uv88josqBFGcRevxW 5Aptekhy+aFtRuXXgHaMkpXx/sjQrTgG0DmjNGOVt06FQmA3iDkxY1PT9+Q6QJBfi6GS YKjN7F70ODIIH+us6L2iYArLIbJRaXlykxtq33bwiWy3l9iH+nvIMC+B5ntAGcvnSR4J XZPpLBiyL40Dx+srrvgUL9vWxvC3T2lQwplEaYY+YAnnySgfDSFn2RmgvFhw2wxsGMfV 4vhIBvW7M71sbqWlptb1rE31hFeEJ1Tv3NDa0CBLyp+6EO8ZXH+/58bFROTUBYKDiPV1 Qw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2jbhr2k2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:24 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38C68HVQ025804; Tue, 12 Sep 2023 06:08:23 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2jbhr2hj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:23 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38C5Orwg012069; Tue, 12 Sep 2023 06:08:21 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3t13dygxrg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 06:08:21 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38C68JeW43778332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 06:08:19 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 757B62004D; Tue, 12 Sep 2023 06:08:19 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EDEAF20049; Tue, 12 Sep 2023 06:08:17 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Sep 2023 06:08:17 +0000 (GMT) Received: from bgray-lenovo-p15.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 6FBEF60807; Tue, 12 Sep 2023 16:08:13 +1000 (AEST) From: Benjamin Gray To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, llvm@lists.linux.dev, linux-pm@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Jonathan Corbet , Ian Abbott , H Hartley Sweeten , Nathan Chancellor , Nick Desaulniers , Tom Rix , Jan Kiszka , Kieran Bingham , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Todd E Brandt , Andrii Nakryiko , Mykola Lysenko , Shuah Khan , Benjamin Gray Subject: [PATCH v2 7/7] selftests/bpf: fix Python string escapes Date: Tue, 12 Sep 2023 16:08:01 +1000 Message-ID: <20230912060801.95533-8-bgray@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912060801.95533-1-bgray@linux.ibm.com> References: <20230912060801.95533-1-bgray@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: hIboO_QQnjrF-2ilBdAWsEDtjmaEdZK3 X-Proofpoint-ORIG-GUID: 5D_1LRGlKmhI0fgYbqYhUM2wNxymK6_b X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_03,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120050 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 11 Sep 2023 23:09:04 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776820891112531826 X-GMAIL-MSGID: 1776820891112531826 Python 3.6 introduced a DeprecationWarning for invalid escape sequences. This is upgraded to a SyntaxWarning in Python 3.12, and will eventually be a syntax error. Fix these now to get ahead of it before it's an error. Signed-off-by: Benjamin Gray --- .../selftests/bpf/test_bpftool_synctypes.py | 26 +++++++++---------- tools/testing/selftests/bpf/test_offload.py | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/testing/selftests/bpf/test_bpftool_synctypes.py b/tools/testing/selftests/bpf/test_bpftool_synctypes.py index 0cfece7ff4f8..46862af44f86 100755 --- a/tools/testing/selftests/bpf/test_bpftool_synctypes.py +++ b/tools/testing/selftests/bpf/test_bpftool_synctypes.py @@ -66,7 +66,7 @@ class ArrayParser(BlockParser): def __init__(self, reader, array_name): self.array_name = array_name - self.start_marker = re.compile(f'(static )?const bool {self.array_name}\[.*\] = {{\n') + self.start_marker = re.compile(rf'(static )?const bool {self.array_name}\[.*\] = {{\n') super().__init__(reader) def search_block(self): @@ -80,7 +80,7 @@ class ArrayParser(BlockParser): Parse a block and return data as a dictionary. Items to extract must be on separate lines in the file. """ - pattern = re.compile('\[(BPF_\w*)\]\s*= (true|false),?$') + pattern = re.compile(r'\[(BPF_\w*)\]\s*= (true|false),?$') entries = set() while True: line = self.reader.readline() @@ -178,7 +178,7 @@ class FileExtractor(object): @enum_name: name of the enum to parse """ start_marker = re.compile(f'enum {enum_name} {{\n') - pattern = re.compile('^\s*(BPF_\w+),?(\s+/\*.*\*/)?$') + pattern = re.compile(r'^\s*(BPF_\w+),?(\s+/\*.*\*/)?$') end_marker = re.compile('^};') parser = BlockParser(self.reader) parser.search_block(start_marker) @@ -226,8 +226,8 @@ class FileExtractor(object): @block_name: name of the blog to parse, 'TYPE' in the example """ - start_marker = re.compile(f'\*{block_name}\* := {{') - pattern = re.compile('\*\*([\w/-]+)\*\*') + start_marker = re.compile(rf'\*{block_name}\* := {{') + pattern = re.compile(r'\*\*([\w/-]+)\*\*') end_marker = re.compile('}\n') return self.__get_description_list(start_marker, pattern, end_marker) @@ -245,8 +245,8 @@ class FileExtractor(object): @block_name: name of the blog to parse, 'TYPE' in the example """ - start_marker = re.compile(f'"\s*{block_name} := {{') - pattern = re.compile('([\w/]+) [|}]') + start_marker = re.compile(rf'"\s*{block_name} := {{') + pattern = re.compile(r'([\w/]+) [|}]') end_marker = re.compile('}') return self.__get_description_list(start_marker, pattern, end_marker) @@ -264,8 +264,8 @@ class FileExtractor(object): @macro: macro starting the block, 'HELP_SPEC_OPTIONS' in the example """ - start_marker = re.compile(f'"\s*{macro}\s*" [|}}]') - pattern = re.compile('([\w-]+) ?(?:\||}[ }\]])') + start_marker = re.compile(rf'"\s*{macro}\s*" [|}}]') + pattern = re.compile(r'([\w-]+) ?(?:\||}[ }\]])') end_marker = re.compile('}\\\\n') return self.__get_description_list(start_marker, pattern, end_marker) @@ -284,7 +284,7 @@ class FileExtractor(object): @block_name: name of the blog to parse, 'TYPE' in the example """ start_marker = re.compile(f'local {block_name}=\'') - pattern = re.compile('(?:.*=\')?([\w/]+)') + pattern = re.compile(r"(?:.*=')?([\w/]+)") end_marker = re.compile('\'$') return self.__get_description_list(start_marker, pattern, end_marker) @@ -316,7 +316,7 @@ class MainHeaderFileExtractor(SourceFileExtractor): {'-p', '-d', '--pretty', '--debug', '--json', '-j'} """ start_marker = re.compile(f'"OPTIONS :=') - pattern = re.compile('([\w-]+) ?(?:\||}[ }\]"])') + pattern = re.compile(r'([\w-]+) ?(?:\||}[ }\]"])') end_marker = re.compile('#define') parser = InlineListParser(self.reader) @@ -338,8 +338,8 @@ class ManSubstitutionsExtractor(SourceFileExtractor): {'-p', '-d', '--pretty', '--debug', '--json', '-j'} """ - start_marker = re.compile('\|COMMON_OPTIONS\| replace:: {') - pattern = re.compile('\*\*([\w/-]+)\*\*') + start_marker = re.compile(r'\|COMMON_OPTIONS\| replace:: {') + pattern = re.compile(r'\*\*([\w/-]+)\*\*') end_marker = re.compile('}$') parser = InlineListParser(self.reader) diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selftests/bpf/test_offload.py index 40cba8d368d9..fffbc375a7e7 100755 --- a/tools/testing/selftests/bpf/test_offload.py +++ b/tools/testing/selftests/bpf/test_offload.py @@ -429,7 +429,7 @@ class NetdevSim: def __init__(self, nsimdev, port_index, ifname): # In case udev renamed the netdev to according to new schema, # check if the name matches the port_index. - nsimnamere = re.compile("eni\d+np(\d+)") + nsimnamere = re.compile(r"eni\d+np(\d+)") match = nsimnamere.match(ifname) if match and int(match.groups()[0]) != port_index + 1: raise Exception("netdevice name mismatches the expected one")