Subject: bug#79018: vc-test-cvs06-version-diff failure on GNU/Linux with current master

From: Paul Eggert <[email-masked]>
Date: Mon, 14 Jul 2025 08:46:53 -0700

This test has been failing for some time and I am now getting around to 
reporting it. I see it on Ubuntu 25.04 x86-64, on a zfs file system. I 
also see it on Fedora 42 x86-64, on an ext4 file system.

To reproduce, build Emacs from master and run "make check". Here is the 
shell transcript of a run of the individual test case:

$ cd test
$ make check LOGFILES=lisp/vc/vc-tests/vc-tests.log
rm -f ./*.tmp
make[1]: Entering directory 
'/home/eggert/src/gnu/emacs/static-checking/test'
make[2]: Entering directory 
'/home/eggert/src/gnu/emacs/static-checking/test'
   GEN      lisp/vc/vc-tests/vc-tests.log
Running 28 tests (2025-07-14 08:39:55-0700, selector ‘(not (or (tag 
:expensive-test) (tag :unstable) (tag :nativecomp)))’)
    passed   1/28  vc-test-cvs00-create-repo (0.002597 sec)
Registering (/tmp/vc-test9CTtF9/foo bla)...
Registering (/tmp/vc-test9CTtF9/foo bla)... done
    passed   2/28  vc-test-cvs01-register (0.003624 sec)
vc-state2 nil
vc-state3 CVS unregistered
Registering (foo)...
Registering (foo)... done
vc-state4 added
vc-state5 unsupported
    passed   3/28  vc-test-cvs02-state (0.003098 sec)
vc-working-revision1 nil
vc-working-revision2 nil
vc-working-revision3 nil
Registering (foo)...
Registering (foo)... done
vc-working-revision4 0
vc-working-revision5 unsupported
    passed   4/28  vc-test-cvs03-working-revision (0.003098 sec)
vc-checkout-model1 implicit
vc-checkout-model2 implicit
vc-checkout-model3 implicit
Registering (foo)...
Registering (foo)... done
vc-checkout-model4 implicit
vc-checkout-model5 unsupported
    passed   5/28  vc-test-cvs04-checkout-model (0.002972 sec)
   skipped   6/28  vc-test-cvs05-rename-file (0.000051 sec)
Registering (foo)...
Registering (foo)... done
Checking out /tmp/vc-testdtGboN/foo...
Checking out /tmp/vc-testdtGboN/foo...done
Test vc-test-cvs06-version-diff backtrace:
   vc-resynch-window("/tmp/vc-testdtGboN/foo" t t nil)
   vc-resynch-buffer("/tmp/vc-testdtGboN/foo" t t)
   vc-checkout("/tmp/vc-testdtGboN/foo")
   vc-test--version-diff(CVS)
   #f(lambda () :dynbind (let ((value-39 (gensym "ert-form-evaluation-a
   #f(compiled-function () #<bytecode -0x4a3e14b67aca15b>)()
   handler-bind-1(#f(compiled-function () #<bytecode -0x4a3e14b67aca15b
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name vc-test-cvs06-version-diff :documenta
   ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
   ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
   ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
   ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
   eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
   command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
   command-line()
   normal-top-level()
Test vc-test-cvs06-version-diff condition:
     (void-variable auto-revert-mode)
    FAILED   7/28  vc-test-cvs06-version-diff (0.003896 sec) at 
lisp/vc/vc-tests/vc-tests.el:1
    passed   8/28  vc-test-git00-create-repo (0.002133 sec)
Registering (/tmp/vc-testI5Y7DM/foo bla)...
Registering (/tmp/vc-testI5Y7DM/foo bla)... done
    passed   9/28  vc-test-git01-register (0.025454 sec)
vc-state2 nil
vc-state3 Git unregistered
Registering (foo)...
Registering (foo)... done
vc-state4 added
vc-state5 Git unregistered
    passed  10/28  vc-test-git02-state (0.009256 sec)
vc-working-revision1 nil
vc-working-revision2 nil
vc-working-revision3 nil
Registering (foo)...
Registering (foo)... done
vc-working-revision4 nil
vc-working-revision5 nil
    passed  11/28  vc-test-git03-working-revision (0.011061 sec)
vc-checkout-model1 implicit
vc-checkout-model2 implicit
vc-checkout-model3 implicit
Registering (foo)...
Registering (foo)... done
vc-checkout-model4 implicit
vc-checkout-model5 implicit
    passed  12/28  vc-test-git04-checkout-model (0.005132 sec)
Registering (foo)...
Registering (foo)... done
    passed  13/28  vc-test-git05-rename-file (0.007707 sec)
Registering (foo)...
Registering (foo)... done
Mark set
Press C-c C-c when you are done editing.
Enter a change comment.  Type C-c C-c when done
Checking in foo...
Checking in foo...done
Test vc-test-git06-version-diff backtrace:
   vc-resynch-window("foo" t t nil)
   vc-resynch-buffer("foo" t t)
   #f(compiled-function (file) #<bytecode 0x1ab3abad2107e41c>)("foo")
   mapc(#f(compiled-function (file) #<bytecode 0x1ab3abad2107e41c>) ("f
   #f(compiled-function () #<bytecode -0xf354fad98237e8a>)()
   vc-finish-logentry()
   funcall-interactively(vc-finish-logentry)
   call-interactively(vc-finish-logentry)
   log-edit-done()
   vc-test--version-diff(Git)
   #f(lambda () :dynbind (let ((value-63 (gensym "ert-form-evaluation-a
   #f(compiled-function () #<bytecode -0x4a3e14b67aca15b>)()
   handler-bind-1(#f(compiled-function () #<bytecode -0x4a3e14b67aca15b
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name vc-test-git06-version-diff :documenta
   ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
   ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
   ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
   ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
   eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
   command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
   command-line()
   normal-top-level()
Test vc-test-git06-version-diff condition:
     (void-variable auto-revert-mode)
    FAILED  14/28  vc-test-git06-version-diff (0.011852 sec) at 
lisp/vc/vc-tests/vc-tests.el:1
    passed  15/28  vc-test-hg00-create-repo (0.099967 sec)
Registering (/tmp/vc-testrJwXQj/foo bla)...
Registering (/tmp/vc-testrJwXQj/foo bla)... done
    passed  16/28  vc-test-hg01-register (1.673005 sec)
vc-state2 nil
vc-state3 Hg unregistered
Registering (foo)...
Registering (foo)... done
vc-state4 added
vc-state5 Hg unregistered
    passed  17/28  vc-test-hg02-state (0.726100 sec)
vc-working-revision1 nil
vc-working-revision2 nil
vc-working-revision3 nil
Registering (foo)...
Registering (foo)... done
vc-working-revision4 -1
vc-working-revision5 nil
    passed  18/28  vc-test-hg03-working-revision (0.739181 sec)
vc-checkout-model1 implicit
vc-checkout-model2 implicit
vc-checkout-model3 implicit
Registering (foo)...
Registering (foo)... done
vc-checkout-model4 implicit
vc-checkout-model5 implicit
    passed  19/28  vc-test-hg04-checkout-model (0.405528 sec)
Registering (foo)...
Registering (foo)... done
    passed  20/28  vc-test-hg05-rename-file (0.727295 sec)
Registering (foo)...
Registering (foo)... done
Mark set
Press C-c C-c when you are done editing.
Enter a change comment.  Type C-c C-c when done
Checking in foo...
Checking in foo...done
Test vc-test-hg06-version-diff backtrace:
   vc-resynch-window("foo" t t nil)
   vc-resynch-buffer("foo" t t)
   #f(compiled-function (file) #<bytecode 0x1ab3abad2107e41c>)("foo")
   mapc(#f(compiled-function (file) #<bytecode 0x1ab3abad2107e41c>) ("f
   #f(compiled-function () #<bytecode -0xf398548d8237e8a>)()
   vc-finish-logentry()
   funcall-interactively(vc-finish-logentry)
   call-interactively(vc-finish-logentry)
   log-edit-done()
   vc-test--version-diff(Hg)
   #f(lambda () :dynbind (let ((value-87 (gensym "ert-form-evaluation-a
   #f(compiled-function () #<bytecode -0x4a3e14b67aca15b>)()
   handler-bind-1(#f(compiled-function () #<bytecode -0x4a3e14b67aca15b
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name vc-test-hg06-version-diff :documentat
   ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
   ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
   ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
   ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
   eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
   command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
   command-line()
   normal-top-level()
Test vc-test-hg06-version-diff condition:
     (void-variable auto-revert-mode)
    FAILED  21/28  vc-test-hg06-version-diff (0.653209 sec) at 
lisp/vc/vc-tests/vc-tests.el:1
    passed  22/28  vc-test-rcs00-create-repo (0.000192 sec)
Registering (/tmp/vc-test7bNsGJ/foo bla)...
Registering (/tmp/vc-test7bNsGJ/foo bla)... done
    passed  23/28  vc-test-rcs01-register (0.010858 sec)
vc-state2 nil
vc-state3 RCS unregistered
Registering (foo)...
Registering (foo)... done
vc-state4 up-to-date
vc-state5 RCS unregistered
    passed  24/28  vc-test-rcs02-state (0.004687 sec)
vc-working-revision1 nil
vc-working-revision2 nil
vc-working-revision3 nil
Registering (foo)...
Registering (foo)... done
vc-working-revision4 1.1
vc-working-revision5 nil
    passed  25/28  vc-test-rcs03-working-revision (0.004837 sec)
vc-checkout-model1 locking
vc-checkout-model2 locking
vc-checkout-model3 locking
Registering (foo)...
Registering (foo)... done
vc-checkout-model4 locking
vc-checkout-model5 locking
    passed  26/28  vc-test-rcs04-checkout-model (0.004915 sec)
Registering (foo)...
Registering (foo)... done
    passed  27/28  vc-test-rcs05-rename-file (0.008202 sec)
Registering (foo)...
Registering (foo)... done
Checking out /tmp/vc-testWsKEsM/foo...
Checking out /tmp/vc-testWsKEsM/foo...done
Test vc-test-rcs06-version-diff backtrace:
   vc-resynch-window("/tmp/vc-testWsKEsM/foo" t t nil)
   vc-resynch-buffer("/tmp/vc-testWsKEsM/foo" t t)
   vc-checkout("/tmp/vc-testWsKEsM/foo")
   vc-test--version-diff(RCS)
   #f(lambda () :dynbind (let ((value-15 (gensym "ert-form-evaluation-a
   #f(compiled-function () #<bytecode -0x4a3e14b67aca15b>)()
   handler-bind-1(#f(compiled-function () #<bytecode -0x4a3e14b67aca15b
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name vc-test-rcs06-version-diff :documenta
   ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
   ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
   ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
   ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
   eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
   command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
   command-line()
   normal-top-level()
Test vc-test-rcs06-version-diff condition:
     (void-variable auto-revert-mode)
    FAILED  28/28  vc-test-rcs06-version-diff (0.007603 sec) at 
lisp/vc/vc-tests/vc-tests.el:1

Ran 28 tests, 23 results as expected, 4 unexpected, 1 skipped 
(2025-07-14 08:40:01-0700, 5.327171 sec)

4 unexpected results:
    FAILED  vc-test-cvs06-version-diff
    FAILED  vc-test-git06-version-diff
    FAILED  vc-test-hg06-version-diff
    FAILED  vc-test-rcs06-version-diff

1 skipped results:
   SKIPPED  vc-test-cvs05-rename-file

make[2]: *** [Makefile:185: lisp/vc/vc-tests/vc-tests.log] Error 1
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/static-checking/test'
make[1]: [Makefile:348: check-doit] Error 2 (ignored)

SUMMARY OF TEST RESULTS
-----------------------
Files examined: 1
Ran 28 tests, 23 results as expected, 4 unexpected, 1 skipped
1 files contained unexpected results:
   lisp/vc/vc-tests/vc-tests.log
make[1]: *** [Makefile:349: check-doit] Error 1
make[1]: Leaving directory '/home/eggert/src/gnu/emacs/static-checking/test'
make: *** [Makefile:315: check] Error 2