GNU bug report logs -
#25534
26.0; xref ERT tests fail when the source path is mixed case
Previous Next
Reported by: Wilfred Hughes <me <at> wilfred.me.uk>
Date: Wed, 25 Jan 2017 22:00:02 UTC
Severity: normal
Merged with 27880
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 25534 in the body.
You can then email your comments to 25534 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25534
; Package
emacs
.
(Wed, 25 Jan 2017 22:00:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Wilfred Hughes <me <at> wilfred.me.uk>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 25 Jan 2017 22:00:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The xref tests fail on case sensitive filesystems if the source directory
is not all lower case.
For example, if I have Emacs checked out in /home/wilfred/src/EMACS, I get
the following test failure:
Test xref-elisp-test-find-defs-defalias-defun-el condition:
(error "Can't find library /home/wilfred/src/emacs/lisp/buff-menu.el")
FAILED 12/36 xref-elisp-test-find-defs-defalias-defun-el
Note that the path is incorrectly converted from ~/src/EMACS to
~/src/emacs, which doesn't exist.
This causes the following tests to fail:
FAILED xref-elisp-test-find-defs-constructor
FAILED xref-elisp-test-find-defs-defalias-defun-el
FAILED xref-elisp-test-find-defs-defgeneric-co-located-default
FAILED xref-elisp-test-find-defs-defgeneric-el
FAILED xref-elisp-test-find-defs-defgeneric-implicit-generic
FAILED xref-elisp-test-find-defs-defgeneric-no-default
FAILED xref-elisp-test-find-defs-defgeneric-no-methods
FAILED xref-elisp-test-find-defs-defgeneric-separate-default
FAILED xref-elisp-test-find-defs-define-overload-co-located-default
FAILED xref-elisp-test-find-defs-define-overload-no-default
FAILED xref-elisp-test-find-defs-define-overload-no-methods
FAILED xref-elisp-test-find-defs-define-overload-separate-default
FAILED xref-elisp-test-find-defs-defun-defvar-el
FAILED xref-elisp-test-find-defs-defun-el
FAILED xref-elisp-test-find-defs-defun-el-defvar-c
FAILED xref-elisp-test-find-defs-defvar-el
FAILED xref-elisp-test-find-defs-face-el
FAILED xref-elisp-test-find-defs-feature-el
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25534
; Package
emacs
.
(Mon, 30 Jan 2017 22:44:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 25534 <at> debbugs.gnu.org (full text, mbox):
Wilfred Hughes wrote:
> The xref tests fail on case sensitive filesystems if the source directory
> is not all lower case.
I guess this is due to the explicit downcasing added for the
huge-and-still-open bug #21816.
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.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 19 Dec 2018 02:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Wilfred Hughes <me <at> wilfred.me.uk>
:
bug acknowledged by developer.
(Wed, 19 Dec 2018 02:22:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 25534-done <at> debbugs.gnu.org (full text, mbox):
Version: 26.2
In an effort to reduce the number of distropatches in Debian, specifically
https://sources.debian.org/patches/emacs/1:26.1+1-1/0008-Don-t-downcase-real-xref-in-elisp-mode-tests.patch/
I have applied the following:
commit 4c6c327
Date: Tue Dec 18 21:18:31 2018 -0500
Restrict downcasing in elisp xref tests (bug#25534)
The tests happen to not fail at the moment because find-library-name
now has an extra feature, find-library--from-load-history, which
happens to do a case-insensitive regexp match; but still it seems
better not to rely on this.
* test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive):
New variable.
(xref-elisp-test-run, emacs-test-dir): Only downcase if the
filesystem seems to be case-insensitive.
diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el
index 941e85b..97148ef 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -298,6 +298,16 @@ xref-elisp-test-descr-to-target
)))
+;; tmp may be on a different filesystem to the tests, but, ehh.
+(defvar xref--case-insensitive
+ (let ((dir (make-temp-file "xref-test" t)))
+ (unwind-protect
+ (progn
+ (with-temp-file (expand-file-name "hElLo" dir) "hello")
+ (file-exists-p (expand-file-name "HELLO" dir)))
+ (delete-directory dir t)))
+ "Non-nil if file system seems to be case-insensitive.")
+
(defun xref-elisp-test-run (xrefs expected-xrefs)
(should (= (length xrefs) (length expected-xrefs)))
(while xrefs
@@ -307,11 +317,13 @@ xref-elisp-test-run
(expected-source (when (consp expected) (cdr expected))))
;; Downcase the filenames for case-insensitive file systems.
- (setf (xref-elisp-location-file (oref xref location))
- (downcase (xref-elisp-location-file (oref xref location))))
+ (when xref--case-insensitive
+ (setf (xref-elisp-location-file (oref xref location))
+ (downcase (xref-elisp-location-file (oref xref location))))
- (setf (xref-elisp-location-file (oref expected-xref location))
- (downcase (xref-elisp-location-file (oref expected-xref location))))
+ (setf (xref-elisp-location-file (oref expected-xref location))
+ (downcase (xref-elisp-location-file
+ (oref expected-xref location)))))
(should (equal xref expected-xref))
@@ -346,10 +358,10 @@ xref-elisp-deftest
;; `load-path' has the correct case, so this causes the expected test
;; values to have the wrong case). This is handled in
;; `xref-elisp-test-run'.
-(defconst emacs-test-dir
- (downcase
- (file-truename (file-name-directory
- (or load-file-name (buffer-file-name))))))
+(defvar emacs-test-dir
+ (funcall (if xref--case-insensitive 'downcase 'identity)
+ (file-truename (file-name-directory
+ (or load-file-name (buffer-file-name))))))
;; alphabetical by test name
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 19 Dec 2018 02:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Rob Browning <rlb <at> defaultvalue.org>
:
bug acknowledged by developer.
(Wed, 19 Dec 2018 02:22:03 GMT)
Full text and
rfc822 format available.
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 6 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.