unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Question about test failure on Hydra
@ 2017-07-30 15:50 Stephen Berman
  2017-07-30 15:59 ` Eli Zaretskii
  2017-08-03 19:41 ` tagging ERT tests with bug numbers (was: Question about test failure on Hydra) Ted Zlatanov
  0 siblings, 2 replies; 20+ messages in thread
From: Stephen Berman @ 2017-07-30 15:50 UTC (permalink / raw)
  To: emacs-devel

Part of the Dired tests for bug#27243 continues to fail intermittently
on Hydra and I see in the logfiles why it fails, but I don't understand
how the trigger for the failure arises.  Here's the test code (for the
first of the bug cases; the second case has almost the same code and
fails in the same way) up to the point of failure (the should sexp):

(ert-deftest dired-test-bug27243-01 ()
  "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#5 ."
  (let ((test-dir (make-temp-file "test-dir-" t))
        (dired-auto-revert-buffer t) buffers)
    (with-current-buffer (find-file-noselect test-dir)
      (make-directory "test-subdir"))
    (push (dired test-dir) buffers)
    (unwind-protect
        (let ((buf (current-buffer))
              (pt1 (point))
              (test-file (concat (file-name-as-directory "test-subdir")
                                 "test-file")))
          (write-region "Test" nil test-file nil 'silent nil 'excl)
          ;; Sanity check: point should now be on the subdirectory.
          (should (equal (dired-file-name-at-point)
                         (concat (file-name-as-directory test-dir)
                                 (file-name-as-directory "test-subdir"))))

When it fails, Hydra show dired-file-name-at-point returning e.g. this
(it's a temporary directory so the name is different on each test run):

"/build/test-dir-26691mMc/../"

while the concat sexp it's being compared with returns (e.g.) this:

"/build/test-dir-26691mMc/test-subdir/"

IIUC dired-file-name-at-point can only return the above result if point
is on the ".." entry in Dired.  But the sexp (dired test-dir) should
(and in all my test runs does) put point on the first "nontrivial" file
(i.e. it skips "." and "..").  I don't see how the above code can lead
to the failure Hydra reports.  And again, it doesn't always fail in
Hydra.  Does anyone have any idea what's going on here and what to do
about it?

Steve Berman



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

end of thread, other threads:[~2017-08-05 21:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-30 15:50 Question about test failure on Hydra Stephen Berman
2017-07-30 15:59 ` Eli Zaretskii
2017-07-30 20:23   ` Stephen Berman
2017-07-31  3:26     ` Eli Zaretskii
2017-07-31  9:20       ` Stephen Berman
2017-08-01  3:12         ` Eli Zaretskii
2017-08-01  9:57           ` Stephen Berman
2017-08-01 13:49             ` Eli Zaretskii
2017-08-01 15:23               ` Stephen Berman
2017-08-02 15:27                 ` Stephen Berman
2017-08-01  4:39         ` Tino Calancha
2017-08-01  9:57           ` Stephen Berman
2017-08-01 10:17             ` Tino Calancha
2017-08-01 10:47               ` Stephen Berman
2017-08-05 13:07               ` Tino Calancha
2017-08-05 21:34                 ` Stephen Berman
2017-08-03 19:41 ` tagging ERT tests with bug numbers (was: Question about test failure on Hydra) Ted Zlatanov
2017-08-04  7:22   ` tagging ERT tests with bug numbers Michael Albinus
2017-08-04 13:28     ` Ted Zlatanov
2017-08-04 14:50       ` Michael Albinus

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).