all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72120: [PATCH] Fix intermittent failure of dired-test-bug27243-02
@ 2024-07-15 11:12 Peter Oliver
  2024-07-15 21:25 ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Oliver @ 2024-07-15 11:12 UTC (permalink / raw)
  To: 72120

[-- Attachment #1: Type: text/plain, Size: 126 bytes --]

A patch is attached which I believe may fix an intermittent failure of test dired-test-bug27243-02.

Thanks.

-- 
Peter Oliver

[-- Attachment #2: Type: text/plain, Size: 1199 bytes --]

From c86645dde30fbd54ae0f187e4428a09ad75e0ba8 Mon Sep 17 00:00:00 2001
From: Peter Oliver <git@mavit.org.uk>
Date: Mon, 15 Jul 2024 12:03:47 +0100
Subject: [PATCH] Fix intermittent failure of dired-test-bug27243-02

* test/lisp/dired-tests.el (dired-test-bug27243-02): Exclude free disk
space from dired listing in this test, in case it changes while it's
running and confuses the result.
---
 test/lisp/dired-tests.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index 2589281e5e1..ea47043dfc5 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -189,7 +189,9 @@ dired-test-bug27243-01
 (ert-deftest dired-test-bug27243-02 ()
   "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28 ."
   (ert-with-temp-directory test-dir
-    (let ((dired-auto-revert-buffer t) buffers)
+    (let ((dired-auto-revert-buffer t)
+          (dired-free-space nil)
+          buffers)
       ;; On MS-Windows, get rid of 8+3 short names in test-dir, if the
       ;; corresponding long file names exist, otherwise such names trip
       ;; string comparisons below.
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#72120: [PATCH] Fix intermittent failure of dired-test-bug27243-02
  2024-07-15 11:12 bug#72120: [PATCH] Fix intermittent failure of dired-test-bug27243-02 Peter Oliver
@ 2024-07-15 21:25 ` Stefan Kangas
  2024-07-26 12:40   ` Peter Oliver
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2024-07-15 21:25 UTC (permalink / raw)
  To: Peter Oliver, 72120-done

Version: 30.1

Peter Oliver <p.d.oliver@mavit.org.uk> writes:

> A patch is attached which I believe may fix an intermittent failure of
> test dired-test-bug27243-02.

Thanks, installed on emacs-30 as commit a7b68c25640.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#72120: [PATCH] Fix intermittent failure of dired-test-bug27243-02
  2024-07-15 21:25 ` Stefan Kangas
@ 2024-07-26 12:40   ` Peter Oliver
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Oliver @ 2024-07-26 12:40 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 72120

[-- Attachment #1: Type: text/plain, Size: 365 bytes --]

On Mon, 15 Jul 2024, Stefan Kangas wrote:

> Peter Oliver <p.d.oliver@mavit.org.uk> writes:
>
>> A patch is attached which I believe may fix an intermittent failure of
>> test dired-test-bug27243-02.
>
> Thanks, installed on emacs-30 as commit a7b68c25640.

I’m afraid the intermittent failure came back.  Attached is a second attempt to fix it.

-- 
Peter Oliver

[-- Attachment #2: Type: text/plain, Size: 1627 bytes --]

From e0f0549ac6766ab565dbd581098b96792a807727 Mon Sep 17 00:00:00 2001
From: Peter Oliver <git@mavit.org.uk>
Date: Wed, 17 Jul 2024 00:06:02 +0100
Subject: [PATCH 4/4] Try harder to stabalise dired-test-bug27243-02

* test/lisp/dired-tests.el (dired-test-bug27243-02): Don't rely on the
expected point, since columns will move if the size of the parent directory
changes order of magnitude.
---
 test/lisp/dired-tests.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index ea47043dfc5..6078e99e13c 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -190,7 +190,6 @@ dired-test-bug27243-02
   "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28 ."
   (ert-with-temp-directory test-dir
     (let ((dired-auto-revert-buffer t)
-          (dired-free-space nil)
           buffers)
       ;; On MS-Windows, get rid of 8+3 short names in test-dir, if the
       ;; corresponding long file names exist, otherwise such names trip
@@ -216,7 +215,9 @@ dired-test-bug27243-02
             ;; Sanity check: point should now be back on the subdirectory.
             (should (eq (point) pt1))
             (push (dired test-dir) buffers)
-            (should (eq (point) pt1)))
+            (should (equal (dired-file-name-at-point)
+                           (concat (file-name-as-directory test-dir)
+                                   (file-name-as-directory "test-subdir")))))
         (dolist (buf buffers)
           (when (buffer-live-p buf) (kill-buffer buf)))))))
 
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-26 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-15 11:12 bug#72120: [PATCH] Fix intermittent failure of dired-test-bug27243-02 Peter Oliver
2024-07-15 21:25 ` Stefan Kangas
2024-07-26 12:40   ` Peter Oliver

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.