From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 884D71FA42 for ; Tue, 17 Oct 2023 23:38:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1697585899; bh=LXT1PuFI+slap1SRI5oTHqwY8gQWF9ZVY6xdKfJEOvo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nYrDTT7+CClY35suGq+9QIyDZe/vWxovbEzD1iBKUPms+IbWik56GcSr9mUKo21ew U78yTVHbeuY2JyQYPn0DPQj6hT5tUFqbBjTkUdMjhc7YjMtw0diVbZnHPKc/6bdlTA 9z9RSNbgMqhvl0A0oYBGm8pOFv5fO6W4mTyRAVcs= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 20/30] test_common: only hide TCP port in messages Date: Tue, 17 Oct 2023 23:38:05 +0000 Message-ID: <20231017233815.1637932-21-e@80x24.org> In-Reply-To: <20231017233815.1637932-1-e@80x24.org> References: <20231017233815.1637932-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: v2:// lei outputs are on the filesystem, so putting $HOST:$PORT is nonsensical. We'll also keep `127.0.0.1' or `[::1]' since it's harmless and can point out obvious errors in system configuration when testing with old Perls or libraries. --- lib/PublicInbox/TestCommon.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 3839ab45..96663731 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -619,7 +619,7 @@ sub lei_ok (@) { my @msg = ref($_[0]) eq 'ARRAY' ? @{$_[0]} : @_; if (!$lei_loud) { for (@msg) { - s!\A([a-z0-9]+://)[^/]+/!$1\$HOST_PORT/!; + s!(127\.0\.0\.1|\[::1\]):(?:\d+)!$1:\$PORT!g; s!$tmpdir\b/(?:[^/]+/)?!\$TMPDIR/!g; s!\Q$PWD\E\b!\$PWD!g; }