From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.bugs Subject: bug#73036: 29.4; Test failure in erc-networks--id-sort-buffers Date: Thu, 05 Sep 2024 07:59:14 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29586"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 73036@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 05 08:00:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sm5XY-0007ZY-NU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Sep 2024 08:00:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sm5XE-0003SU-If; Thu, 05 Sep 2024 02:00:00 -0400 Original-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 1sm5XC-0003SL-5W for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 01:59:58 -0400 Original-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 1sm5XB-0005ew-OT for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 01:59:57 -0400 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=CxS39XzBvLI19QqBT6S4fyUNoagUHJlKCC0nznOqUWc=; b=BxXsn7rvq7HDJPIpzSQJrZJU0xl5NPP2/s/VY1voXmrvapwioQrib/2cmZreEo1l3AAGOqzrIbv2WyPpqv0VhsQE3VwZ95/9bf44h2/foHscmShOgrqu01y/n+tq4LEbkAtOCmLzurrGXJpWaDl4vinN5qPFhOcQlilGDQzckdXCyegW375s56iP4Rtov0J2tZYxy7geHxr5yqY7XjmnmCga9pOXyxPpZw46YKfdlCYgppug4Wz2J+no7tWVgT6KBxrQ0YVpCX2mu8zdr5S35jhNuTd3va3+ONM6DbLyw1r99IgsMennZIdZmPzaZtk2tvSZ9scFhveZ0xbrfegsHw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sm5YE-0000CJ-9X for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 02:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Sep 2024 06:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73036 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1725516036680 (code B ref -1); Thu, 05 Sep 2024 06:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Sep 2024 06:00:36 +0000 Original-Received: from localhost ([127.0.0.1]:35907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sm5Xn-0000Au-Q1 for submit@debbugs.gnu.org; Thu, 05 Sep 2024 02:00:36 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sm5Xj-0000Ai-V9 for submit@debbugs.gnu.org; Thu, 05 Sep 2024 02:00:33 -0400 Original-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 1sm5Wh-00030f-3z for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 01:59:27 -0400 Original-Received: from woodpecker.gentoo.org ([140.211.166.183] helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1sm5We-0005VL-VE for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 01:59:26 -0400 Received-SPF: pass client-ip=140.211.166.183; envelope-from=ulm@gentoo.org; helo=smtp.gentoo.org X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291224 Archived-At: --=-=-= Content-Type: text/plain Forwarding Gentoo bug 920696 . We see the following test failure on an hppa2.0-unknown-linux-gnu (Linux-6.9.8-gentoo-parisc64-parisc64-PA8900_-Shortfin-with-glibc2.39) system: Test erc-networks--id-sort-buffers condition: (ert-test-failed ((should (equal (erc-networks--id-sort-buffers ...) (list newest middle oldest))) :form (equal (# # #) (# # #)) :value nil :explanation (list-elt 0 (different-atoms # #)))) FAILED 6/41 erc-networks--id-sort-buffers (0.000000 sec) at lisp/erc/erc-networks-tests.el:133 [...] Ran 41 tests, 40 results as expected, 1 unexpected (2024-09-03 20:09:01+0000, 14 .712021 sec) 1 unexpected results: FAILED erc-networks--id-sort-buffers ((should (equal (erc-networks--id-sort -buffers (list oldest newest middle)) (list newest middle oldest))) :form (equal (# # #) (# # #)) :value nil :explanation (list-elt 0 (different-atoms # #))) [...] SUMMARY OF TEST RESULTS ----------------------- Files examined: 465 Ran 6939 tests, 6675 results as expected, 1 unexpected, 263 skipped 1 files contained unexpected results: lisp/erc/erc-networks-tests.log Looking at the code, the test creates three buffers, then sorts them by time. Clock resolution on HPPA appears to be 4 milliseconds, so it is not unlikely that the buffers end up with exactly the same timestamp and sorting fails. Attached patch fixes the problem. Is it OK to install it on the emacs-30 branch? --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=0001-Fix-test-failure-in-erc-networks-tests.patch >From bf42248be8e795d591ce97c1d161d73d98038db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Wed, 4 Sep 2024 13:35:51 +0200 Subject: [PATCH] Fix test failure in erc-networks-tests * test/lisp/erc/erc-networks-tests.el (erc-networks--id-sort-buffers): Make sure that buffers have different timestamps. --- test/lisp/erc/erc-networks-tests.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/lisp/erc/erc-networks-tests.el b/test/lisp/erc/erc-networks-tests.el index f0a7c37ddf2..e84cca68cdd 100644 --- a/test/lisp/erc/erc-networks-tests.el +++ b/test/lisp/erc/erc-networks-tests.el @@ -133,10 +133,12 @@ erc-networks--id-sort-buffers (with-temp-buffer (setq erc-networks--id (erc-networks--id-fixed-create 'oldest) oldest (current-buffer)) + (sleep-for 0.02) (with-temp-buffer (setq erc-networks--id (erc-networks--id-fixed-create 'middle) middle (current-buffer)) + (sleep-for 0.02) (with-temp-buffer (setq erc-networks--id (erc-networks--id-fixed-create 'newest) -- 2.46.0 --=-=-=--