Subject: bug#76381: todo-test-add-and-delete-file fails on Ubuntu 24.10

From: Stephen Berman <[email-masked]>
Date: Fri, 21 Feb 2025 00:01:48 +0100

On Thu, 20 Feb 2025 10:13:24 -0800 Paul Eggert <[email-masked]> wrote:

> On 2025-02-20 05:33, Stephen Berman wrote:
>> On Mon, 17 Feb 2025 17:14:19 -0800 Paul Eggert <[email-masked]> wrote:
>>>    $ cd test
>>>    $ make lisp/calendar/todo-mode-tests
>>>    make[1]: Entering directory
>>>    '/home/eggert/src/gnu/emacs/static-checking/test'
>>>      GEN      lisp/calendar/todo-mode-tests.log
>>>    Running 42 tests (2025-02-17 17:04:52-0800, selector ‘(not (or (tag
>>>    :unstable) (tag :nativecomp)))’)
>>>    Enter a non-existing file name:
>>>
>>> ... and the test hangs, waiting for me to type a file name I guess.
>> I cannot reproduce this, either on the master, emacs-30 or emacs-29
>> branch (on a GNU/Linux system with ext4 file system).  For one thing,
>> when I run the equivalent of `make lisp/calendar/todo-mode-tests' (I
>> build out-of-tree) I get:
>> steve [ ~/build/emacs-master/test ]$ make
>> ~/src/emacs/emacs-master/test/lisp/calendar/todo-mode-tests
>> make: *** No rule to make target
>> '/home/steve/src/emacs/emacs-master/test/lisp/calendar/todo-mode-tests'.
>> Stop.
>
> Thanks for looking into it. I wouldn't expect that command to reproduce the
> bug, though. I can reproduce the problem at the top level with a simple "make
> check" though this takes a while as it runs all the tests. I can also
> reproduce the problem by running
>
>    cd test
>    make lisp/calendar/todo-mode-tests
>
> as shown above.
>
> I build in-tree; I don't know if that makes a difference.

FWIW, I also tried running `make lisp/calendar/todo-mode-tests' from the
test directory of the Emacs source tree, but it also failed with "No
rule to make target".

> The test reliably fails on Ubuntu 24.10 on a zfs filesystem. It reliably
> succeeds on on the same host when running on a tmpfs filesystem. So possibly
> this is related to zfs.

That seems plausible since it's reproducible for you.  Yet I wouldn't
have thought that this kind of error could be cause by some property of
a file system, though admittedly I have next to no technical knowledge
of file systems.

> To help debug this I am attaching the trace output of the following command
> when run in the test directory in both environments:
>
> LC_ALL=C USERNAME=test HOME=/tmp/home ENV=/tmp/home/mt LOGNAME=test
> j=/tmp/home b=/tmp/home USER=test BASH_ENV=/tmp/home/mt
> PATH=/usr/bin:/usr/sbin strace -f -o /tmp/tr make
> lisp/calendar/todo-mode-tests
>
> where /tmp/home contains a single file, /tmp/home/mt, which is empty.
>
> The file zfs.tr.xz is the xz-compressed trace output on zfs, and tmpfs.tr.sz
> is the trace output on tmpfs. Perhaps that can help diagnose the bug.

Thanks for the traces.  I couldn't recognize anything in them that
indicated a reason for the test failure, but here too I lack the
necessary knowledge.  Hopefully someone who has it will be able to shed
some light.

Steve Berman