Subject: Re: bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted

From: Eli Zaretskii <[email-masked]>
Date: Wed, 16 Sep 2015 20:55:20 +0300

> From: Michael Albinus <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 16 Sep 2015 19:26:50 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> The whole test case is about this check. And maybe this is also the
> >> reason that it passes now the remote test case, surprisingly.
> >
> > Does it work for you if you add the test after read-event?  It fails
> > here, i.e. the watch is still valid.
> 
> Yes, it works for inotify. And `file-notify-test04-file-validity-remote'
> fails as expected, 'cos I haven't fixed it yet in Tramp.
> 
> For inotify it is obvious that it shall work. All inotify watches are
> based on inodes. If a file is watched by inotify, and the parent
> directory of the file is deleted, the inode of the file itself disappears.
> 
> I don't know how it works with w32notify internally. And I don't know
> yet how it will behave with gfilenotify, all checks for that backend I
> have moved to later.

It works for w32notify if I run the test in an interactive session.
It only fails in batch mode.  Since the batch-mode operation of
w32notify is fragile (there's no input threads to send the message
to), and we have already wasted too much time on this tiny feature,
feel free to skip that test when in batch mode and w32notify back-end
is used.