GNU bug report logs - #27880
25.2; elisp-mode-tests may downcase too aggressively

Previous Next

Package: emacs;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Sun, 30 Jul 2017 16:22:02 UTC

Severity: normal

Merged with 25534

Found in versions 25.2, 26.0

Fixed in version 26.2

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27880 in the body.
You can then email your comments to 27880 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#27880; Package emacs. (Sun, 30 Jul 2017 16:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rob Browning <rlb <at> defaultvalue.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 30 Jul 2017 16:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; elisp-mode-tests may downcase too aggressively
Date: Sun, 30 Jul 2017 11:21:40 -0500
[Refiling as a bug report from a list thread.]

It looks like (in 25.2, and perhaps master too) elisp-mode-tests.el
downcases the xref path (location) for comparison in
xref-elisp-test-run, but that seems to also affect the filesystem lookup
lower down (in xref--goto-location) such that a handful of tests fail if
the build path contains uppercase characters.  i.e. it tries to read the
downcased path, which of course (on ext4) doesn't exist.

In any case, I've hacked up a temporary fix by keeping the original as
"real-xref" and cloning that (and copying the location) to produce the
xref used by the modification and comparison.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27880; Package emacs. (Sun, 30 Jul 2017 20:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 27880 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 27880 <at> debbugs.gnu.org
Subject: Re: bug#27880: 25.2; elisp-mode-tests may downcase too aggressively
Date: Sun, 30 Jul 2017 16:41:08 -0400
merge 27880 25534
quit

Rob Browning <rlb <at> defaultvalue.org> writes:

> [Refiling as a bug report from a list thread.]
>
> It looks like (in 25.2, and perhaps master too) elisp-mode-tests.el
> downcases the xref path (location) for comparison in
> xref-elisp-test-run, but that seems to also affect the filesystem lookup
> lower down (in xref--goto-location) such that a handful of tests fail if
> the build path contains uppercase characters.  i.e. it tries to read the
> downcased path, which of course (on ext4) doesn't exist.
>
> In any case, I've hacked up a temporary fix by keeping the original as
> "real-xref" and cloning that (and copying the location) to produce the
> xref used by the modification and comparison.
>
> Thanks

This is the same as Bug#25534 "xref ERT tests fail when the source path
is mixed case", right?




Merged 25534 27880. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 30 Jul 2017 20:40:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27880; Package emacs. (Sun, 30 Jul 2017 23:18:01 GMT) Full text and rfc822 format available.

Message #13 received at 27880 <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: npostavs <at> users.sourceforge.net
Cc: 27880 <at> debbugs.gnu.org
Subject: Re: bug#27880: 25.2; elisp-mode-tests may downcase too aggressively
Date: Sun, 30 Jul 2017 18:17:00 -0500
npostavs <at> users.sourceforge.net writes:

> This is the same as Bug#25534 "xref ERT tests fail when the source path
> is mixed case", right?

Looks likely.  And at least for Debian, something like this fixes it:

  +++ b/test/automated/elisp-mode-tests.el
  @@ -179,11 +179,15 @@ xref-elisp-test-descr-to-target
   (defun xref-elisp-test-run (xrefs expected-xrefs)
     (should (= (length xrefs) (length expected-xrefs)))
     (while xrefs
  -    (let* ((xref (pop xrefs))
  +    (let* ((real-xref (pop xrefs))
  +           (xref (clone real-xref))
              (expected (pop expected-xrefs))
              (expected-xref (or (when (consp expected) (car expected)) expected))
              (expected-source (when (consp expected) (cdr expected))))

  +      (setf (oref xref location)
  +            (copy-xref-elisp-location (oref xref location)))
  +
         ;; Downcase the filenames for case-insensitive file systems.
         (setf (xref-elisp-location-file (oref xref location))
               (downcase (xref-elisp-location-file (oref xref location))))
  @@ -193,7 +197,7 @@ xref-elisp-test-run

         (should (equal xref expected-xref))

  -      (xref--goto-location (xref-item-location xref))
  +      (xref--goto-location (xref-item-location real-xref))
         (back-to-indentation)
         (should (looking-at (or expected-source
                                 (xref-elisp-test-descr-to-target expected)))))

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Jan 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.