GNU bug report logs -
#73036
29.4; Test failure in erc-networks--id-sort-buffers
Previous Next
Reported by: Ulrich Mueller <ulm <at> gentoo.org>
Date: Thu, 5 Sep 2024 06:01:02 UTC
Severity: normal
Found in version 29.4
Fixed in version 30.1
Done: Ulrich Mueller <ulm <at> gentoo.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Forwarding Gentoo bug 920696 <https://bugs.gentoo.org/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
(#<killed buffer> #<killed buffer> #<killed buffer>)
(#<killed buffer> #<killed buffer> #<killed buffer>))
:value nil :explanation
(list-elt 0
(different-atoms #<killed buffer> #<killed buffer>))))
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
(#<killed buffer> #<killed buffer> #<killed buffer>) (#<killed buffer> #<killed buffer> #<killed buffer>)) :value nil :explanation (list-elt 0 (different-atoms #<killed buffer> #<killed buffer>)))
[...]
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?
[0001-Fix-test-failure-in-erc-networks-tests.patch (text/plain, inline)]
From bf42248be8e795d591ce97c1d161d73d98038db6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm <at> gentoo.org>
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
This bug report was last modified 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.