unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Ken Brown <kbrown@cornell.edu>
Cc: 20117@debbugs.gnu.org
Subject: bug#20117: 25.0.50; Tramp tests failing on Cygwin
Date: Tue, 17 Mar 2015 20:16:53 +0100	[thread overview]
Message-ID: <87pp87v3h6.fsf@gmx.de> (raw)
In-Reply-To: <5506F003.1070201@cornell.edu>

Ken Brown <kbrown@cornell.edu> writes:

> In case it helps, here's the complete list of Tramp tests that
> currently abort on Cygwin:
>
> tramp-test19-directory-files-and-attributes
> tramp-test30-special-characters
> tramp-test30-special-characters-with-stat
> tramp-test31-utf8
> tramp-test31-utf8-with-stat
>
> I've instrumented all of them and can make the traces available to you
> if it would help.  The four new ones come to more than 9MB, after
> tarring and compressing.

Likely, all of them are caused by the same problem. The traces you have
sent to me for tramp-test19-directory-files-and-attributes indicate a
problem with the marker I have introduced in order to handle apostrophs
in file names properly. I could reproduce it locally with bash and zsh;
other bournish shells like ksh and dash work properly.

The following patch let the construct work in all four investigated
shells for me, could you pls check?

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/tramp/lisp/tramp-sh.el.~master~	2015-03-17 20:12:48.781125579 +0100
--- /home/albinus/src/tramp/lisp/tramp-sh.el	2015-03-17 20:05:35.432048823 +0100
***************
*** 1719,1730 ****
       ;; "-"; this would confuse xargs.  "ls -aQ" might be a solution,
       ;; but it does not work on all remote systems.  Therefore, we
       ;; use \000 as file separator.
!      ;; Apostrophes in the stat output are masked as \037 characters, in
       ;; order to make a proper shell escape of them in file names.
       "cd %s && echo \"(\"; (%s %s -a | "
       "xargs %s -c "
!      "'(\037%%n\037 (\037%%N\037) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \037%%A\037 t %%ie0 -1)'"
!      " -- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/\037/\"/g'); echo \")\"")
      (tramp-shell-quote-argument localname)
      (tramp-get-ls-command vec)
      ;; On systems which have no quoting style, file names with
--- 1719,1730 ----
       ;; "-"; this would confuse xargs.  "ls -aQ" might be a solution,
       ;; but it does not work on all remote systems.  Therefore, we
       ;; use \000 as file separator.
!      ;; Apostrophes in the stat output are masked as \006 characters, in
       ;; order to make a proper shell escape of them in file names.
       "cd %s && echo \"(\"; (%s %s -a | "
       "xargs %s -c "
!      "'(\006%%n\006 (\006%%N\006) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \006%%A\006 t %%ie0 -1)'"
!      " -- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/\006/\"/g'); echo \")\"")
      (tramp-shell-quote-argument localname)
      (tramp-get-ls-command vec)
      ;; On systems which have no quoting style, file names with
***************
*** 1732,1739 ****
      (if (tramp-get-ls-command-with-quoting-style vec)
  	"--quoting-style=shell" "")
      (tramp-get-remote-stat vec)
!     (if (eq id-format 'integer) "%ue0" "\037%U\037")
!     (if (eq id-format 'integer) "%ge0" "\037%G\037"))))
  
  ;; This function should return "foo/" for directories and "bar" for
  ;; files.
--- 1732,1739 ----
      (if (tramp-get-ls-command-with-quoting-style vec)
  	"--quoting-style=shell" "")
      (tramp-get-remote-stat vec)
!     (if (eq id-format 'integer) "%ue0" "\006%U\006")
!     (if (eq id-format 'integer) "%ge0" "\006%G\006"))))
  
  ;; This function should return "foo/" for directories and "bar" for
  ;; files.
--8<---------------cut here---------------end--------------->8---

> Ken

Best regards, Michael.





  reply	other threads:[~2015-03-17 19:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 15:00 bug#20117: 25.0.50; Tramp tests failing on Cygwin Ken Brown
2015-03-16 18:16 ` Achim Gratz
2015-03-16 19:00   ` Michael Albinus
2015-03-16 20:36     ` Achim Gratz
2015-03-17 19:04     ` Achim Gratz
2015-03-17 19:20       ` Michael Albinus
2015-03-16 18:48 ` Michael Albinus
2015-03-16 20:57   ` Ken Brown
2015-03-17 18:04     ` Ken Brown
2015-03-17 19:16       ` Michael Albinus [this message]
2015-03-17 21:44         ` Ken Brown
2015-03-18 12:37           ` Michael Albinus
2015-03-18 17:26             ` Ken Brown
2015-03-18 19:34               ` 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=87pp87v3h6.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=20117@debbugs.gnu.org \
    --cc=kbrown@cornell.edu \
    /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).