all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Tassilo Horn <tsdh@gnu.org>
Cc: 21435@debbugs.gnu.org
Subject: bug#21435: 25.0.50; file-notify has problems after renames
Date: Thu, 10 Sep 2015 19:50:21 +0200	[thread overview]
Message-ID: <87si6mi2oy.fsf@gmx.de> (raw)
In-Reply-To: <87a8sunve8.fsf@gnu.org> (Tassilo Horn's message of "Thu, 10 Sep 2015 17:31:27 +0200")

Tassilo Horn <tsdh@gnu.org> writes:

>>>   1. Now `file-notify-test02-events-remote' fails because after every
>>>      expected `changed' event an additional `attribute-changed' event is
>>>      received.  This is wrong because when adding the watch, only
>>>      '(change) is given as FLAGS argument, not '(change
>>>      attribute-change).
>>
>> I'll contact the Tramp maintainer about :-)
>
> Deliver him my best wishes. :-)

Done. He's working on the problem.

> Ah, ok, so when you write to a file you'll only get a `changed' event,
> and not an additional `attribute-changed' event for the changed
> modification time.  So basically, attribute changes are subsumed by
> `changed' and `created' events.
>
> By the way, I think it could be hard to test `attribute-changed' events
> because those probably depend on the filesystem and mount options on the
> machine where the tests are run, e.g., if access time recording is
> enabled or not.

Yes. And I also expect here the most notable differences between the
native libraries. Not checked yet, 'tho.

> I've added a new macro to the tests now which lets you do things this
> way:
>
>         ;; Check creation, change, and deletion.
>         (file-notify--test-with-events
>             3 3 (lambda (events)
>                   (should (equal '(created changed deleted)
>                                  (mapcar #'cadr events))))
>           (write-region
>            "any text" nil file-notify--test-tmpfile nil 'no-message)
>           (delete-file file-notify--test-tmpfile))
>
> This means we're waiting for 3 events for at most 3 seconds, and then
> apply the lambda to the received events.  The rest is the code which
> causes the events to be emitted.

That's good, yes. Please add a docstring to that macro (boring, I know,
but it will help other people like Eli and me).

One point: you don't call any longer `read-event'. I believe it still
makes sense; IIRC I did it because sometimes you must trigger Emacs to
check all its file descriptors for new events.

> Another thing: the remote tests, especially the test03-autorevert one,
> take really, really long (maybe 30 seconds).  I saw that this uses some
> mock TRAMP method which suggests it is a mockup connection which can
> probably simulate a fast or a slow connection.  If so, I'd prefer to
> have a reasonably fast one so that I don't try to avoid running all
> tests frequently.

Well, the mockup method is a silly one and it even doesn't require a
remote connection, so it shall be faster than any other Tramp method.
And I do not experience serious delays when testing.

You could alway skip all the remote tests. Call

# env REMOTE_TEMPORARY_FILE_DIRECTORY=/dev/null make -C test/automated file-notify-tests

> Bye,
> Tassilo

Best regards, Michael.





  reply	other threads:[~2015-09-10 17:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08  8:47 bug#21435: 25.0.50; file-notify has problems after renames Tassilo Horn
2015-09-08 16:03 ` Eli Zaretskii
2015-09-08 18:04   ` Michael Albinus
2015-09-08 18:21     ` Eli Zaretskii
2015-09-08 19:28       ` Tassilo Horn
2015-09-09 18:15         ` Michael Albinus
2015-09-09 19:01           ` Tassilo Horn
2015-09-09 20:23             ` Tassilo Horn
2015-09-10 11:23               ` Michael Albinus
2015-09-10 15:31                 ` Tassilo Horn
2015-09-10 17:50                   ` Michael Albinus [this message]
2015-09-10 19:22                     ` Tassilo Horn
2015-09-11  9:53                       ` Michael Albinus
2015-09-11 12:17                         ` Tassilo Horn
2015-09-11 12:32                           ` Eli Zaretskii
2015-09-12  8:44                           ` Michael Albinus
2015-09-11  9:45                     ` Michael Albinus
2015-09-11 12:11                       ` Tassilo Horn
2015-09-09 18:41       ` Michael Albinus
2015-09-09 19:21         ` Eli Zaretskii
2015-09-10 11:09           ` Michael Albinus
2015-09-10 15:45             ` Eli Zaretskii
2015-09-10 17:37               ` Michael Albinus
2015-09-10 18:03                 ` Eli Zaretskii
2015-09-10 18:20                   ` Michael Albinus
2015-09-10 18:55                     ` Eli Zaretskii
2015-09-11 12:51                       ` Michael Albinus
2015-09-08 19:05   ` Tassilo Horn
2015-09-08 19:19     ` Eli Zaretskii
2015-09-08 19:47       ` Tassilo Horn
2015-09-09  2:39         ` Eli Zaretskii
2015-09-09  6:13           ` Tassilo Horn
2015-09-20 17:26 ` Michael Albinus
2015-09-20 19:36   ` Eli Zaretskii
2015-09-21  6:25     ` Michael Albinus
2015-09-21  7:54       ` Eli Zaretskii
2015-09-21 10:13         ` Michael Albinus
2015-09-21 10:14           ` Eli Zaretskii
2015-09-21 13:11             ` Michael Albinus
2015-09-21 13:31               ` Eli Zaretskii
2015-09-21 13:38                 ` 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=87si6mi2oy.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=21435@debbugs.gnu.org \
    --cc=tsdh@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.