all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: emacs-devel@gnu.org
Subject: Question about test failure on Hydra
Date: Sun, 30 Jul 2017 17:50:38 +0200	[thread overview]
Message-ID: <87efsxexf5.fsf@rosalinde> (raw)

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



             reply	other threads:[~2017-07-30 15:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-30 15:50 Stephen Berman [this message]
2017-07-30 15:59 ` Question about test failure on Hydra 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efsxexf5.fsf@rosalinde \
    --to=stephen.berman@gmx.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.