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

> From: Stephen Berman <stephen.berman@gmx.net>
> Date: Sun, 30 Jul 2017 17:50:38 +0200
> 
> (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?

Doesn't dired-auto-revert-buffer by default use some kind of file
notifications?  If so, this could be some race between the
notification coming in and the rest.  You could introduce a wait to
try to solve that, or maybe try turning off file notifications.



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

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-30 15:50 Question about test failure on Hydra Stephen Berman
2017-07-30 15:59 ` Eli Zaretskii [this message]
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=83r2wx29w9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stephen.berman@gmx.net \
    /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.