From unknown Tue Aug 19 10:04:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79190: [PATCH] Fix some tests on OpenBSD Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Aug 2025 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 79190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 79190@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.175457290728549 (code B ref -1); Thu, 07 Aug 2025 13:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Aug 2025 13:21:47 +0000 Received: from localhost ([127.0.0.1]:34065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uk0Z1-0007QO-2p for submit@debbugs.gnu.org; Thu, 07 Aug 2025 09:21:47 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49810) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uk0Yw-0007Q7-GF for submit@debbugs.gnu.org; Thu, 07 Aug 2025 09:21:45 -0400 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 1uk0Yr-0007PQ-3M for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2025 09:21:37 -0400 Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uk0Yo-0003Im-1p for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2025 09:21:36 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=IgsXuzM8 6+oyYHl7ezjtnAFjaOXcVXIVanRcS9Uwx0s=; h=date:subject:to:from; d=ledu-giraud.fr; b=nf5Wk2HC03S3y+HI/L4jTOK/OsBbeOSqRBTYvHJ3gElJxwjvdf MNrADycY9ery+R3f1cuunfe9ke8lvTgffPBQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=IgsXuzM86+oyYHl7 ezjtnAFjaOXcVXIVanRcS9Uwx0s=; h=date:subject:to:from; d=ledu-giraud.fr; b=rXMuyvzMl7izOcuqBe2h7EPp0eKPRVlE3YbSdwU8fQRGgJhco0 4gknmQraaa95RxddghpSnBhrOMm+wyU23vzOhQnBMoTj729cFcn1i1+/HqSt6WyClHSE40 ZdjTZBg7FGLAfvOd/LUtc9Itcga05IzQMa8qMlpWsK3QlN/uUEcWGwNnNENNvsd914F+8N AiEuXlKJhifVjNDJucePZythPVpNETmTbEooqMglZI8FJoyZpbv74K4AX9wrYP0CgMpRCF xyGaM1ATQUoT3Xjrj8/TvBc3zcZY8sT8b+8RShDyX/i3l+p2+4ARPVx/c5QeeF7nKho3dc xAYUItEeluhQ== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 30f6135c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Thu, 7 Aug 2025 15:21:31 +0200 (CEST) From: Manuel Giraud Date: Thu, 07 Aug 2025 15:21:29 +0200 Message-ID: <87v7mzi7xi.fsf@ledu-giraud.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain Tags: patch Hi, Here is a patch to fix some of the failing tests on OpenBSD. In GNU Emacs 31.0.50 (build 9, x86_64-unknown-openbsd7.7) of 2025-08-06 built on computer Repository revision: f0da94e2c28fe79b2bb6f16697438fbf3777ebb8 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101018 System Description: OpenBSD computer 7.7 GENERIC.MP#78 amd64 Configured using: 'configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs --bindir=/home/manuel/bin --with-x-toolkit=no --with-toolkit-scroll-bars=no --without-cairo --without-dbus --without-gconf --without-gsettings --without-compress-install' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-some-tests-on-OpenBSD.patch >From 7fd23b3d6161b995c2f512a439d8e2180de94c1e Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Thu, 7 Aug 2025 15:00:58 +0200 Subject: [PATCH] Fix some tests on OpenBSD * test/lisp/eshell/em-script-tests.el (em-script-test/batch-file/shebang): env -S is not supported. * test/src/fns-tests.el (fns-tests-random): random is non-deterministic. --- test/lisp/eshell/em-script-tests.el | 5 ++++- test/src/fns-tests.el | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/lisp/eshell/em-script-tests.el b/test/lisp/eshell/em-script-tests.el index 01dc5fd9a72..30b917baa35 100644 --- a/test/lisp/eshell/em-script-tests.el +++ b/test/lisp/eshell/em-script-tests.el @@ -143,7 +143,10 @@ em-script-test/batch-file (ert-deftest em-script-test/batch-file/shebang () "Test running an Eshell script file as a batch script via a shebang." - (skip-unless (not (memq system-type '(windows-nt ms-dos)))) + (skip-when (or (memq system-type '(windows-nt ms-dos)) + ;; OpenBSD's env does not support -S + (and (eq system-type 'berkeley-unix) + (string-match-p "openbsd" system-configuration)))) (ert-with-temp-file temp-file :text (format "#!/usr/bin/env -S %s --batch -f eshell-batch-file\necho hi" diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el index 6a50d89c778..6f0155cd5df 100644 --- a/test/src/fns-tests.el +++ b/test/src/fns-tests.el @@ -38,7 +38,11 @@ fns-tests-random (should (= (random 1) 0)) (should (>= (random 10) 0)) (should (< (random 10) 10)) - (should (equal (random "seed") (random "seed"))) + ;; On OpenBSD random is non-deterministic. + (if (and (eq system-type 'berkeley-unix) + (string-match-p "openbsd" system-configuration)) + (should (not (equal (random "seed") (random "seed")))) + (should (equal (random "seed") (random "seed")))) ;; The probability of four calls being the same is low. ;; This makes sure that the value isn't constant. (should (not (= (random t) (random t) (random t) (random t)))) -- 2.50.1 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From unknown Tue Aug 19 10:04:01 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Manuel Giraud Subject: bug#79190: closed (Re: bug#79190: [PATCH] Fix some tests on OpenBSD) Message-ID: References: <86tt2jp4wp.fsf@gnu.org> <87v7mzi7xi.fsf@ledu-giraud.fr> X-Gnu-PR-Message: they-closed 79190 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 79190@debbugs.gnu.org Date: Thu, 07 Aug 2025 14:46:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1754577962-13618-1" This is a multi-part message in MIME format... ------------=_1754577962-13618-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #79190: [PATCH] Fix some tests on OpenBSD which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 79190@debbugs.gnu.org. --=20 79190: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79190 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1754577962-13618-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 79190-done) by debbugs.gnu.org; 7 Aug 2025 14:45:06 +0000 Received: from localhost ([127.0.0.1]:35432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uk1rd-0003Rf-7e for submit@debbugs.gnu.org; Thu, 07 Aug 2025 10:45:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51754) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uk1rb-0003PP-Ee for 79190-done@debbugs.gnu.org; Thu, 07 Aug 2025 10:45:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uk1rU-0001de-Us; Thu, 07 Aug 2025 10:44:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DIrQwl7zpGpR9q7Pgmc75LoAIPz836e5zJ425VwwUf4=; b=WNktT7Mz/X4C M7h4go8xPV7KRSyg7n2ShQuEHEkdzwEMAV1AQ49860l+m+5BUJAwB44Qxsyug5KM9qO9V58Zs5349 4e6PqRwZ+/jYWkc6Dq4Fr617HbORnUT6O0c9dIlGHm68iDW9K5ioG0ay+pprcmEs+ftJ2e+PNVhtj TRa8ejDvOioQXW8pfukTBwAIqirLBqOITMQwuaZYjQktVamKyTvV+uLtjjN7+AXjfvGLc62mysJAQ Y3HNAO8Eh6y2yuht2aP0lm+hIrZLfL2DfpGQOpY9PIGLPKCNIVZp767vxy4I0sVmoJg5Yy1Vu5QZQ Yw5Wa58xJYlpIq+HiEWS7A==; Date: Thu, 07 Aug 2025 17:44:54 +0300 Message-Id: <86tt2jp4wp.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <87v7mzi7xi.fsf@ledu-giraud.fr> (message from Manuel Giraud on Thu, 07 Aug 2025 15:21:29 +0200) Subject: Re: bug#79190: [PATCH] Fix some tests on OpenBSD References: <87v7mzi7xi.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79190-done Cc: 79190-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Date: Thu, 07 Aug 2025 15:21:29 +0200 > > Here is a patch to fix some of the failing tests on OpenBSD. Thanks, installed on the master branch. ------------=_1754577962-13618-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Aug 2025 13:21:47 +0000 Received: from localhost ([127.0.0.1]:34065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uk0Z1-0007QO-2p for submit@debbugs.gnu.org; Thu, 07 Aug 2025 09:21:47 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49810) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uk0Yw-0007Q7-GF for submit@debbugs.gnu.org; Thu, 07 Aug 2025 09:21:45 -0400 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 1uk0Yr-0007PQ-3M for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2025 09:21:37 -0400 Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uk0Yo-0003Im-1p for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2025 09:21:36 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=IgsXuzM8 6+oyYHl7ezjtnAFjaOXcVXIVanRcS9Uwx0s=; h=date:subject:to:from; d=ledu-giraud.fr; b=nf5Wk2HC03S3y+HI/L4jTOK/OsBbeOSqRBTYvHJ3gElJxwjvdf MNrADycY9ery+R3f1cuunfe9ke8lvTgffPBQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=IgsXuzM86+oyYHl7 ezjtnAFjaOXcVXIVanRcS9Uwx0s=; h=date:subject:to:from; d=ledu-giraud.fr; b=rXMuyvzMl7izOcuqBe2h7EPp0eKPRVlE3YbSdwU8fQRGgJhco0 4gknmQraaa95RxddghpSnBhrOMm+wyU23vzOhQnBMoTj729cFcn1i1+/HqSt6WyClHSE40 ZdjTZBg7FGLAfvOd/LUtc9Itcga05IzQMa8qMlpWsK3QlN/uUEcWGwNnNENNvsd914F+8N AiEuXlKJhifVjNDJucePZythPVpNETmTbEooqMglZI8FJoyZpbv74K4AX9wrYP0CgMpRCF xyGaM1ATQUoT3Xjrj8/TvBc3zcZY8sT8b+8RShDyX/i3l+p2+4ARPVx/c5QeeF7nKho3dc xAYUItEeluhQ== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 30f6135c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Thu, 7 Aug 2025 15:21:31 +0200 (CEST) From: Manuel Giraud To: bug-gnu-emacs@gnu.org Subject: [PATCH] Fix some tests on OpenBSD X-Debbugs-Cc: Date: Thu, 07 Aug 2025 15:21:29 +0200 Message-ID: <87v7mzi7xi.fsf@ledu-giraud.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain Tags: patch Hi, Here is a patch to fix some of the failing tests on OpenBSD. In GNU Emacs 31.0.50 (build 9, x86_64-unknown-openbsd7.7) of 2025-08-06 built on computer Repository revision: f0da94e2c28fe79b2bb6f16697438fbf3777ebb8 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101018 System Description: OpenBSD computer 7.7 GENERIC.MP#78 amd64 Configured using: 'configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs --bindir=/home/manuel/bin --with-x-toolkit=no --with-toolkit-scroll-bars=no --without-cairo --without-dbus --without-gconf --without-gsettings --without-compress-install' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-some-tests-on-OpenBSD.patch >From 7fd23b3d6161b995c2f512a439d8e2180de94c1e Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Thu, 7 Aug 2025 15:00:58 +0200 Subject: [PATCH] Fix some tests on OpenBSD * test/lisp/eshell/em-script-tests.el (em-script-test/batch-file/shebang): env -S is not supported. * test/src/fns-tests.el (fns-tests-random): random is non-deterministic. --- test/lisp/eshell/em-script-tests.el | 5 ++++- test/src/fns-tests.el | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/lisp/eshell/em-script-tests.el b/test/lisp/eshell/em-script-tests.el index 01dc5fd9a72..30b917baa35 100644 --- a/test/lisp/eshell/em-script-tests.el +++ b/test/lisp/eshell/em-script-tests.el @@ -143,7 +143,10 @@ em-script-test/batch-file (ert-deftest em-script-test/batch-file/shebang () "Test running an Eshell script file as a batch script via a shebang." - (skip-unless (not (memq system-type '(windows-nt ms-dos)))) + (skip-when (or (memq system-type '(windows-nt ms-dos)) + ;; OpenBSD's env does not support -S + (and (eq system-type 'berkeley-unix) + (string-match-p "openbsd" system-configuration)))) (ert-with-temp-file temp-file :text (format "#!/usr/bin/env -S %s --batch -f eshell-batch-file\necho hi" diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el index 6a50d89c778..6f0155cd5df 100644 --- a/test/src/fns-tests.el +++ b/test/src/fns-tests.el @@ -38,7 +38,11 @@ fns-tests-random (should (= (random 1) 0)) (should (>= (random 10) 0)) (should (< (random 10) 10)) - (should (equal (random "seed") (random "seed"))) + ;; On OpenBSD random is non-deterministic. + (if (and (eq system-type 'berkeley-unix) + (string-match-p "openbsd" system-configuration)) + (should (not (equal (random "seed") (random "seed")))) + (should (equal (random "seed") (random "seed")))) ;; The probability of four calls being the same is low. ;; This makes sure that the value isn't constant. (should (not (= (random t) (random t) (random t) (random t)))) -- 2.50.1 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- ------------=_1754577962-13618-1--