[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix some failing tests in BSD systems

From: Eli Zaretskii
Subject: Re: [PATCH] Fix some failing tests in BSD systems
Date: Mon, 04 Jan 2021 17:52:18 +0200

> Cc: mardani29@yahoo.es, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Mon, 4 Jan 2021 15:10:40 +0200
> >> On 03.01.2021 19:35, Eli Zaretskii wrote:
> >>> Why are we producing file names by concatenation, instead of calling
> >>> expand-file-name?  Wouldn't using the latter solve the problem?  Or
> >>> what did I miss?
> >>
> >> While we sometimes do that (expand-file-name is not free, and for
> >> certain uses its overhead counts), that doesn't seem to be the case here.
> > 
> > Not sure what you mean: I clearly saw calls to concat in the patch,
> > both in the old and the new code.  What did I miss?
> The changes you are referring to are both in the test code. There's 
> nothing inherently wrong in using concat in such code, as long as we 
> test what we want to test.

There's nothing wrong with that, sure, but you risk false failures due
to issues like the one here.  However, if you are okay with that, I
don't mind.  It just was strange to see such code.

> If you actually meant to suggest an alternative comparison strategy 
> (like in Daniel's latest patch), then I think the test becomes 
> unnecessarily lax. After all, we want to also check how the string 
> "looks" (because the user will see it verbatim), not just what file it 
> points at.

I don't think you can reliably know how the file name will be
formatted by a particular variety of 'find', not IME.  But I'm not
going to argue about this.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]