From: John Cummings <john@rootabega.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 50630@debbugs.gnu.org
Subject: bug#50630: [PATCH] Add tests for insert-directory
Date: Sat, 25 Sep 2021 11:38:08 +0000 [thread overview]
Message-ID: <KCMu-RkC1K53e9eYlde2GN5zAgOGG2vN-nYT812hOxG3ZA1CvjN3OPuIFnk_xyxb3ITy71q4FqyfH2HCaxIEaC-HzJDQ2W5ciiiMP89FPAE=@rootabega.net> (raw)
In-Reply-To: <83a6k1rxrc.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Fri, 24 Sep 2021 19:58:25 +0000
>> From: John Cummings <john@rootabega.net>
>>
>> Along those lines, I also attempted to skip the test when ls-lisp
>> would be used during files-tests.el, which I predict might happen when
>> building on Windows?
>
> Why did you need to skip those tests? Can you elaborate?
ls-lisp has its own implementation of insert-directory, which
duplicates the bug, and which will also duplicate the fix when I
submit it soon. (Let me know if the recipe to confirm the bug is
present in ls-lisp.el attached earlier doesn't work for you.) So if
ls-lisp was "active" during this test, it could be a false
positive/negative for this test, depending on whether ls-lisp had been
fixed yet. (See my reply to your later question in this message for
what I mean when I say ls-lisp is "active", because just requiring the
library isn't enough.)
On my GNU/Linux system, ls-lisp is not active when running this test
from the Makefile, but I don't want to assume that that is true of
every system. Since Windows GNU Emacs uses ls-lisp.el by default when
running, I thought it might be one of those exceptions at build time
as well. I confirmed that it's also true if someone runs this test
interactively after having activated ls-lisp, regardless of the
system. That is, I activated ls-lisp, eval'd files-tests.el, and ran
ert for that file, and the test failed because it used the buggy
insert-directory from ls-lisp. So even if building a Windows Emacs (or
any system) does not use ls-lisp by default, is there any harm in
having this skip condition (other than potentially confusing the
reader)?
I admit I may not correctly or completely understand the way that
ls-lisp could relate to a batch ert run at build time, or how that
varies between architectures. If it's NOT something to worry about
during a 'make', would I still need to worry about someone who ran
this test after enabling ls-lisp manually? Perhaps I could fail the
test so the user knows what they did didn't make sense?
Also, note that this is only true for the 50630 regression test. That
may have been the wrong choice. Perhaps it would make sense to run any
test of insert-directory's implementation if and only if ls-lisp.el is
not active?
>> + ;;Try to verify that insert-directory will come from files.el,
>> + ;;not ls-lisp.el. Windows builds will probably use ls-lisp.el
>> + ;;by default, which will invalidate some tests.
>> + (insert-directory-program-used (or (not (featurep 'ls-lisp))
>> + ls-lisp-use-insert-directory-program)))
> I guess this is part of the same question I asked above? Because I
> don't think I understand what you are trying to do here and why.
Yes, my logic was that this being non-nil means the test will be using
the Emacs-default insert-directory implementation from files.el, and
not the ls-lisp.el one. In order to use the ls-lisp one (what I've
referred to as ls-lisp being "active" previously), the ls-lisp library
needs to be loaded, and the variable on the second line needs to be
nil, otherwise ls-lisp will just delegate back to files.el for
insert-directory. I personally find the variable a little confusing,
and think that negating its name and meaning would be more natural,
but the documentation does make it clear, even if I have to think
about it for a bit every time I set it.
next prev parent reply other threads:[~2021-09-25 11:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 23:00 bug#50630: 28.0.50; list-directory shows free space for current directory, not the specified one John Cummings
2021-09-17 7:07 ` Eli Zaretskii
2021-09-17 10:24 ` John Cummings
2021-09-17 10:36 ` Eli Zaretskii
2021-09-17 17:38 ` bug#50630: [External] : " Drew Adams
2021-09-17 18:04 ` Eli Zaretskii
2021-09-17 20:32 ` John Cummings
2021-09-18 5:56 ` Eli Zaretskii
2021-09-18 10:04 ` John Cummings
2021-09-21 10:57 ` bug#50630: Confirmation of instances in ls-lisp.el and tramp-sh.el John Cummings
2021-09-24 19:58 ` bug#50630: [PATCH] Add tests for insert-directory John Cummings
2021-09-25 1:47 ` Lars Ingebrigtsen
2021-09-25 10:45 ` John Cummings
2021-09-25 11:38 ` Michael Albinus
2021-09-25 12:13 ` John Cummings
2021-09-25 6:10 ` Eli Zaretskii
2021-09-25 11:38 ` John Cummings [this message]
2021-09-25 12:30 ` John Cummings
2021-09-25 13:06 ` Eli Zaretskii
2021-09-25 14:29 ` John Cummings
2021-09-25 14:55 ` Eli Zaretskii
2021-09-25 17:15 ` John Cummings
2021-09-25 17:26 ` Eli Zaretskii
2021-09-25 17:37 ` John Cummings
2021-09-25 17:44 ` Eli Zaretskii
2021-09-25 18:01 ` John Cummings
2021-09-25 18:44 ` Eli Zaretskii
2021-09-25 19:00 ` John Cummings
2021-09-25 19:07 ` Eli Zaretskii
2021-09-25 19:58 ` John Cummings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='KCMu-RkC1K53e9eYlde2GN5zAgOGG2vN-nYT812hOxG3ZA1CvjN3OPuIFnk_xyxb3ITy71q4FqyfH2HCaxIEaC-HzJDQ2W5ciiiMP89FPAE=@rootabega.net' \
--to=john@rootabega.net \
--cc=50630@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.