unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: eggert@cs.ucla.edu, stefan@marxist.se, 36940@debbugs.gnu.org
Subject: bug#36940: tests slowness and failure after recent Tramp changes
Date: Mon, 26 Aug 2019 13:47:02 +0200	[thread overview]
Message-ID: <877e70w3m1.fsf@gmx.de> (raw)
In-Reply-To: <83lfvgfdru.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Aug 2019 12:59:33 +0300")

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> The error happens while searching in a process buffer, which is set properly:
>>
>> 14:40:39.573073 tramp-open-connection-setup-interactive-shell (5) #
>> Setting coding system to `utf-8-hfs' and `utf-8-hfs-mac'
>>
>> But the search string needs to be normalized as proposed by you. Will do.
>
> Sorry for bothering you, but now I am confused.  If the process
> buffer's contents is decoded with utf-8-hfs, then decoding should have
> composed the characters back, I believe.  So the text to be searched
> in the buffer should use the precomposed character U+03AF GREEK SMALL
> LETTER IOTA WITH TONOS.  Is that so?  And if so, is the problem with
> the regexp you pass to re-search-forward?  Then where did that regexp
> come from -- maybe the problem happens while you produce that regexp?

Now I start to understand what happens. In tramp--test-check-files,
there is a loop over the test strings, which are used for different test
purposes. At the very end, an environment variable is set as

		  (setenv envvar elt)

When the failing regexp search is applied, the original string is not
taken, but the set environment variable

		    (should
		     (re-search-forward
		      (format
		       "^%s=%s$"
		       (regexp-quote envvar)
		       (regexp-quote (getenv envvar))))))))))

Likely, (getenv envvar) returns the encoded string, which fails. Using
the original string shall work.

> Feel free to ignore my questions if they are just a distraction, due
> to my unfamiliarity with the text internals.

No, you're very helpful as usual! Thanks!

Stefan, does the following patch solves the problem for you?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 466 bytes --]

diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 557536a0eb..6ce1afa4a7 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -5288,7 +5288,7 @@ tramp--test-check-files
 		      (format
 		       "^%s=%s$"
 		       (regexp-quote envvar)
-		       (regexp-quote (getenv envvar))))))))))
+		       (regexp-quote elt)))))))))

 	;; Cleanup.
 	(ignore-errors (delete-directory tmp-name1 'recursive))

[-- Attachment #3: Type: text/plain, Size: 24 bytes --]


Best regards, Michael.

  reply	other threads:[~2019-08-26 11:47 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06  0:28 bug#36940: tests slowness and failure after recent Tramp changes Paul Eggert
2019-08-06 12:59 ` Michael Albinus
2019-08-06 16:13   ` Paul Eggert
2019-08-06 19:16     ` Michael Albinus
2019-08-06 19:54     ` Michael Albinus
2019-08-06 23:27       ` Paul Eggert
2019-08-07 15:20         ` Michael Albinus
2019-08-07 19:36           ` Paul Eggert
2019-08-08 14:14             ` Michael Albinus
2019-08-07 21:42           ` Glenn Morris
2019-08-08 13:52             ` Michael Albinus
2019-08-10  1:39               ` Paul Eggert
2019-08-10  9:43                 ` Michael Albinus
2019-08-10 20:24                   ` Paul Eggert
2019-08-11 10:12                     ` Michael Albinus
2019-08-14 10:31                       ` Michael Albinus
2019-08-15  4:26                         ` Paul Eggert
2019-08-24  1:51                         ` Stefan Kangas
2019-08-24  8:08                           ` Michael Albinus
2019-08-24 12:51                             ` Stefan Kangas
     [not found]                               ` <CADwFkmnZ1D-t3BchTSuUrkbkOpKG=yCH9c1ZJbkyGr9mUZrAUg@mail.gmail.com>
2019-08-25  9:27                                 ` Michael Albinus
2019-08-25  9:51                                   ` Eli Zaretskii
2019-08-25 10:07                                     ` Eli Zaretskii
2019-08-25 11:26                                       ` Michael Albinus
2019-08-25 11:39                                         ` Eli Zaretskii
2019-08-25 11:46                                           ` Michael Albinus
2019-08-25 11:58                                             ` Eli Zaretskii
2019-08-26  9:22                                               ` Michael Albinus
2019-08-26  9:59                                                 ` Eli Zaretskii
2019-08-26 11:47                                                   ` Michael Albinus [this message]
2019-08-26 12:54                                                     ` Stefan Kangas
2019-08-26 14:19                                                       ` Michael Albinus
2019-08-26 14:36                                                         ` Stefan Kangas
2019-08-26 15:09                                                           ` Michael Albinus
2019-08-26 15:46                                                             ` Stefan Kangas
2019-08-26 16:43                                                               ` Michael Albinus
2019-08-26 17:46                                                                 ` Stefan Kangas
2019-08-26 19:47                                                                   ` Michael Albinus
2019-08-27 16:34                                                                     ` Stefan Kangas
2019-08-27 16:56                                                                       ` Michael Albinus
2019-08-28  0:23                                                                         ` Stefan Kangas
2019-08-25 11:28                                     ` Michael Albinus
2019-08-25 11:48                             ` Michael Albinus
2019-08-25 15:39                               ` Paul Eggert
2019-08-25 16:34                                 ` Michael Albinus
2019-08-25 20:36                                   ` Paul Eggert
2019-08-26  8:44                                     ` Michael Albinus
2019-08-27  2:17                                       ` Paul Eggert
2019-08-27 11:03                             ` Michael Albinus

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877e70w3m1.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=36940@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=stefan@marxist.se \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).