From patchwork Tue Jan 21 00:06:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Sundberg X-Patchwork-Id: 37290 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1E1DA27BBE2; Tue, 21 Jan 2025 00:08:08 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9EF2827BBE2 for ; Tue, 21 Jan 2025 00:08:07 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ta1oL-00015d-OT; Mon, 20 Jan 2025 19:08:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ta1oK-00015U-Fn for guix-patches@gnu.org; Mon, 20 Jan 2025 19:08:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ta1oI-0005fA-7c for guix-patches@gnu.org; Mon, 20 Jan 2025 19:08:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=6Gi+Cq9OcbzBcwSfee1Ymu5YfkwUXr/BLG3rj3ZR2u8=; b=CvVOAuI3iNbIZmp9rvd280k9iEpRuceEZlJ/ClbQB5RDKBbVz8Sgf/ebnWQKN6rX11p30riTNKZ6jawiZS8eNtI0egHmEkkcJYHkmQqEpGbt/rGfxTnpZfIrOy5PCupkfcljOfTmQb8A7E3F3mVQ1I4ci/PefYuQBBxTdIF3v3sefhNS1e/MQwnTp9p3oJgz60pIZe8kOJFCohJPCh6lKGN4eQRvC9I4ga7ET5tz1kYCP1ASCd6sCFoJq+n66Ol7e0nvd4oo3Gx2IZkvSHE94iacscG3d6D1TWSCFQjELf75t95crLg7hA4CM4lreYzIrLxCi5iRsmMLY+AzqzPSpA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ta1oI-0002sC-2P for guix-patches@gnu.org; Mon, 20 Jan 2025 19:08:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75716] [PATCH 1/2] gnu: go-1.23: Skip time variant tests Resent-From: Ryan Sundberg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Jan 2025 00:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75716 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75716@debbugs.gnu.org Cc: Ryan Sundberg X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173741803710974 (code B ref -1); Tue, 21 Jan 2025 00:08:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jan 2025 00:07:17 +0000 Received: from localhost ([127.0.0.1]:52323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ta1nY-0002qw-Kh for submit@debbugs.gnu.org; Mon, 20 Jan 2025 19:07:17 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46078) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ta1nW-0002qf-AD for submit@debbugs.gnu.org; Mon, 20 Jan 2025 19:07:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ta1nQ-0000uD-Nu for guix-patches@gnu.org; Mon, 20 Jan 2025 19:07:08 -0500 Received: from mail.arctype.co ([138.68.9.245]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ta1nJ-0005XD-TV for guix-patches@gnu.org; Mon, 20 Jan 2025 19:07:08 -0500 Received: from authenticated-user (mail.arctype.co [138.68.9.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.arctype.co (Postfix) with ESMTPSA id 4633813B0EB; Tue, 21 Jan 2025 00:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=arctype.co; s=mail; t=1737417990; bh=lkxsq458/CNu1vh8jJx/mcOps/6qkFVBxAUa4dfbPQg=; h=From:To:Cc:Subject:Date:From; b=jfmBpYDLiNpL3H0nbTIkFOXeeQPyna+Npl+hdFqtmAjFkMViTJhRS1wswIOKR0dUy OOGsp8cY68sSiEJSps95nKG2K9uWz0CzwRLuhLiG9HweL+fyOPXZLEfMNeXrhw5mbX PSKbvaJnUg6Qxjjg84pFhW+G+vGyZx6vDrYuUzpa9RdhRzqACiaIJXqFQuL71x+poX fvau9jF+M9VhYG31vCmoZE0ICKSIFQ96sEvDyNYVvA6CSn5opWnV4C36K9nZoh0+M+ 3+7HwdjPdSZY+NJSSi39Cj/28CjJ7ZekYg53lzYJbe/ibCCdqaTeM2AOLcSqV78olK AKq6Xay7iSu/g== Date: Mon, 20 Jan 2025 16:06:04 -0800 Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=138.68.9.245; envelope-from=ryan@arctype.co; helo=mail.arctype.co X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Ryan Sundberg X-ACL-Warn: , Ryan Sundberg via Guix-patches X-Patchwork-Original-From: Ryan Sundberg via Guix-patches via From: Ryan Sundberg Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Patch out select tests under src/crypto/tls which depend on the current wall clock time for TLS certificate testing. Specifically, the following failing test cases are skipped: ``` Change-Id: I2f1519bc1c951e15db3a1c9320148206674c7bdf --- FAIL: TestVerifyConnection (0.00s) --- FAIL: TestVerifyConnection/TLSv12 (0.00s) handshake_client_test.go:1759: RequireAndVerifyClientCert-FullHandshake: handshake failed: server: remote error: tls: bad certificate client: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2025-01-20T20:07:09Z is after 2025-01-01T00:00:00Z --- FAIL: TestVerifyConnection/TLSv13 (0.00s) handshake_client_test.go:1759: RequireAndVerifyClientCert-FullHandshake: handshake failed: server: remote error: tls: bad certificate client: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2025-01-20T20:07:09Z is after 2025-01-01T00:00:00Z --- FAIL: TestResumptionKeepsOCSPAndSCT (0.00s) --- FAIL: TestResumptionKeepsOCSPAndSCT/TLSv12 (0.00s) handshake_client_test.go:2550: handshake failed: server: remote error: tls: bad certificate client: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2025-01-20T20:07:09Z is after 2025-01-01T00:00:00Z --- FAIL: TestResumptionKeepsOCSPAndSCT/TLSv13 (0.00s) handshake_client_test.go:2550: handshake failed: server: remote error: tls: bad certificate client: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2025-01-20T20:07:09Z is after 2025-01-01T00:00:00Z --- FAIL: TestCrossVersionResume (0.01s) --- FAIL: TestCrossVersionResume/TLSv12 (0.00s) handshake_server_test.go:526: handshake did not resume at the same version --- FAIL: TestCrossVersionResume/TLSv13 (0.00s) handshake_server_test.go:526: handshake did not resume at the same version FAIL FAIL crypto/tls 0.423s ``` * gnu/packages/golang (go-1.23): Include patchset * gnu/packages/patches/go-skip-tls-tests.patch: New patch file --- gnu/packages/golang.scm | 16 +++++- gnu/packages/patches/go-skip-tls-tests.patch | 56 ++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/go-skip-tls-tests.patch base-commit: 91b18baa4274a025d28f06133682a9269217730d diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index b1ea9e5a28..d39e50e982 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -1001,7 +1001,21 @@ (define-public go-1.23 (commit (string-append "go" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0v8j43yqkhp5i5649nbxsq7lc9bjjn39gqqvlnz0d9c47qz9h7y7")))))) + (base32 "0v8j43yqkhp5i5649nbxsq7lc9bjjn39gqqvlnz0d9c47qz9h7y7")))) + (arguments + (substitute-keyword-arguments (package-arguments go-1.22) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'apply-skip-test-patch + (lambda* (#:key inputs #:allow-other-keys) + ;; Having the patch in the 'patches' field of breaks + ;; the 'TestServeContent' test due to the fact that timestamps + ;; are reset. Thus, apply it from here. + (invoke "patch" "-p1" "--force" "-i" + (assoc-ref inputs "go-skip-tls-tests.patch")))))))) + (native-inputs + `(("go-skip-tls-tests.patch" ,(search-patch "go-skip-tls-tests.patch")) + ,@(package-native-inputs go-1.22))))) ;; ;; Default Golang version used in guix/build-system/go.scm to build packages. diff --git a/gnu/packages/patches/go-skip-tls-tests.patch b/gnu/packages/patches/go-skip-tls-tests.patch new file mode 100644 index 0000000000..92e0a31a86 --- /dev/null +++ b/gnu/packages/patches/go-skip-tls-tests.patch @@ -0,0 +1,56 @@ +From 0b0cb6aa447cef0e4f631e43db05195d0d25329a Mon Sep 17 00:00:00 2001 +From: Ryan Sundberg +Date: Mon, 20 Jan 2025 15:17:39 -0800 +Subject: [PATCH] crypto/tls: Disable test cases which are time variant + +These test cases depend on the current date relative to the TLS +certificates under test. Skip them for repeatability. +--- + src/crypto/tls/handshake_client_test.go | 8 ++++---- + src/crypto/tls/handshake_server_test.go | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/crypto/tls/handshake_client_test.go b/src/crypto/tls/handshake_client_test.go +index 3c87916bcf..fa2a494a6b 100644 +--- a/src/crypto/tls/handshake_client_test.go ++++ b/src/crypto/tls/handshake_client_test.go +@@ -1561,8 +1561,8 @@ func TestServerSelectingUnconfiguredCipherSuite(t *testing.T) { + } + + func TestVerifyConnection(t *testing.T) { +- t.Run("TLSv12", func(t *testing.T) { testVerifyConnection(t, VersionTLS12) }) +- t.Run("TLSv13", func(t *testing.T) { testVerifyConnection(t, VersionTLS13) }) ++ // t.Run("TLSv12", func(t *testing.T) { testVerifyConnection(t, VersionTLS12) }) ++ // t.Run("TLSv13", func(t *testing.T) { testVerifyConnection(t, VersionTLS13) }) + } + + func testVerifyConnection(t *testing.T, version uint16) { +@@ -2528,8 +2528,8 @@ func TestDowngradeCanary(t *testing.T) { + } + + func TestResumptionKeepsOCSPAndSCT(t *testing.T) { +- t.Run("TLSv12", func(t *testing.T) { testResumptionKeepsOCSPAndSCT(t, VersionTLS12) }) +- t.Run("TLSv13", func(t *testing.T) { testResumptionKeepsOCSPAndSCT(t, VersionTLS13) }) ++ //t.Run("TLSv12", func(t *testing.T) { testResumptionKeepsOCSPAndSCT(t, VersionTLS12) }) ++ //t.Run("TLSv13", func(t *testing.T) { testResumptionKeepsOCSPAndSCT(t, VersionTLS13) }) + } + + func testResumptionKeepsOCSPAndSCT(t *testing.T, ver uint16) { +diff --git a/src/crypto/tls/handshake_server_test.go b/src/crypto/tls/handshake_server_test.go +index bbfe44bd97..4347c40a6d 100644 +--- a/src/crypto/tls/handshake_server_test.go ++++ b/src/crypto/tls/handshake_server_test.go +@@ -493,8 +493,8 @@ func testSCTHandshake(t *testing.T, version uint16) { + } + + func TestCrossVersionResume(t *testing.T) { +- t.Run("TLSv12", func(t *testing.T) { testCrossVersionResume(t, VersionTLS12) }) +- t.Run("TLSv13", func(t *testing.T) { testCrossVersionResume(t, VersionTLS13) }) ++ //t.Run("TLSv12", func(t *testing.T) { testCrossVersionResume(t, VersionTLS12) }) ++ //t.Run("TLSv13", func(t *testing.T) { testCrossVersionResume(t, VersionTLS13) }) + } + + func testCrossVersionResume(t *testing.T, version uint16) { +-- +2.41.0 +