From nobody Thu Nov 14 03:25:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xpls01h6cz5d0v3; Thu, 14 Nov 2024 03:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xplrz61jGz4Gp2; Thu, 14 Nov 2024 03:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sh4qdIxDDvdbdz6fp+WTsT/buaitGQlV4BE4JWnyRGc=; b=Lotj2FaLB/CtB+8UMCZZ6nZFD63spPlyzVil/l7+U/wd/iwGaA/MQb25x1Vpn+eTj95OEx 9DzaB5RSzx7BoZ74v5XBYFvph6eRVgDu0sEZlwrstkdS1dw/rOZIhWnF9B6mNVonb68Nax nm6CQzJNb8NnTKqqAIDAMMH7VBGUN3EOTdRqAFhJS4WVOu1i8FNA9lYctSnY5g+85Sn3TO 5phY1ByGNsi7qWSlYZ4zuw/Z4iGrXClWoh6zhVIjDJaQGmmFhkKkv9aVT+9D4TzP/tT0/u XsjzIPIwyY8gZ8hMux6QyNViqeknb18466HYdtISnntqrFjww6InML+wQriYZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sh4qdIxDDvdbdz6fp+WTsT/buaitGQlV4BE4JWnyRGc=; b=Xl9efOYgDNXRv88aqsQB8ADzSr5knSBNAUtB6dwCf9RxVJnlUOsTEFey6/7MGMIHBa0elL aGk0ttz623qGkqybUjsf+VP6TOyl5Yd6rRkxtdVS7TGx68R8dIiIIKOW6aQVMxUNlVDwVe CUMXKGGXmjy7FSJvLMrDglzpyq9mz+zzQPkSm67/y6+tHx9G0huPSEPLYadfK+J0pEo7AJ bm2xPzc3EulcIaMey1W3lgTlHuYEi9aTYnDuOt68bnn0QWXV0+H4nuZopW5x7eC0Ust+57 r5D0DjnET0tiwBuYsZQfTIV+g/xvDHFdslDDyhgftQK7G9xIkzHdW3GeRbfuFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554707; a=rsa-sha256; cv=none; b=nxrBG8xSEdmGw4LXB5Z7mI90ipOVz2D4plOyGxThEwhJB2TCIMJyB/Pi+IDzb7A3yMWdSj l8BzEpMNfRbmdpaUFGL/pcL70OPjfUFfKHZNeW8R9c92JRaagLMMN1NvW7YdD5ecIu0twK antlD34QkkScANj8zcbgPgs24kuxrVTbAPTrIo9sI3YMy51Puy0xGgUVKHm9OgHUatO/ts k22LhmoLXcnLUGrmfrDFIIKDtrZ76UTwzZSeQ1rg2ynsddq750NsxgitBoD5qSrwtCdqYD qW9K/C4eD8npzU1f4WxD4uCIZX3vIyO0eSvFYcLLK4OUVbkpx+kr38af/0P12Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xplrz5ZdKzMLc; Thu, 14 Nov 2024 03:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE3P7Vo024946; Thu, 14 Nov 2024 03:25:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P7Sg024943; Thu, 14 Nov 2024 03:25:07 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:07 GMT Message-Id: <202411140325.4AE3P7Sg024943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 124ecd59ba81 - stable/14 - ping tests: Silence deprecation warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 124ecd59ba8160f9adbaca833e83a96b2d57370d Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=124ecd59ba8160f9adbaca833e83a96b2d57370d commit 124ecd59ba8160f9adbaca833e83a96b2d57370d Author: Jose Luis Duran AuthorDate: 2024-11-05 03:04:53 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:23:16 +0000 ping tests: Silence deprecation warnings Declare some regex patterns as a raw string by prepending `r`. Reviewed by: markj Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D42174 (cherry picked from commit 8b13cb9d654c985534d24a09ec5dab02cc4dea6e) --- sbin/ping/tests/test_ping.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index cf2e46a146c8..93b42d7d53bd 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -270,15 +270,15 @@ def pinger( def redact(output): """Redact some elements of ping's output""" pattern_replacements = [ - ("localhost \([0-9]{1,3}(\.[0-9]{1,3}){3}\)", "localhost"), - ("from [0-9]{1,3}(\.[0-9]{1,3}){3}", "from"), + (r"localhost \([0-9]{1,3}(\.[0-9]{1,3}){3}\)", "localhost"), + (r"from [0-9]{1,3}(\.[0-9]{1,3}){3}", "from"), ("hlim=[0-9]*", "hlim="), ("ttl=[0-9]*", "ttl="), ("time=[0-9.-]*", "time="), ("cp: .*", "cp: xx xx xx xx xx xx xx xx"), ("dp: .*", "dp: xx xx xx xx xx xx xx xx"), - ("\(-[0-9\.]+[0-9]+ ms\)", "(- ms)"), - ("[0-9\.]+/[0-9.]+", "/"), + (r"\(-[0-9\.]+[0-9]+ ms\)", "(- ms)"), + (r"[0-9\.]+/[0-9.]+", "/"), ] for pattern, repl in pattern_replacements: output = re.sub(pattern, repl, output)