Subject: bug#76187: vc-git-test-dir-branch-headers failure on Fedora

From: Dmitry Gutov <[email-masked]>
Date: Mon, 17 Feb 2025 05:07:36 +0200

Hi!

On 16/02/2025 12:18, Kévin Le Gouguec wrote:
> Paul Eggert<[email-masked]> writes:
> 
>> On 2025-02-15 14:17, Kévin Le Gouguec wrote:
>>> Either fixes the issue, as far as I can validate.  I still have a slight
>>> preference for the second one
>> ... and the second one tests faster, so that's a good argument for going with it.
> Right.
> 
> Waiting on Dmitry's thoughts before installing; OT1H I have no qualms
> about this testcase invoking backend functions directly (just noticed
> that there is a precedent, e.g. vc-git-test-annotate-time), OTOH maybe
> this is not a practice we want to encourage.

Thanks for the investigation, and I agree that the patch that "ditches 
vc-dir entirely" is TRT.

The vc-<backend>-tests.el files are supposed (or at least are allowed) 
to test backend-specific functionality.

We currently call vc-dir from vc-bzr-tests as well (helps with code 
coverage) - which BTW has this workaround:

       (while (vc-dir-busy)
         (sit-for 0.1))

If/when we decide to make the bzr tests similarly more isolated, we 
should try to create 1-2 cases in vc-tests.el that exercise the general 
code path. But that's a future problem.