all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Stefan Kangas <stefan@marxist.se>, 36940@debbugs.gnu.org
Subject: bug#36940: tests slowness and failure after recent Tramp changes
Date: Mon, 26 Aug 2019 19:17:01 -0700	[thread overview]
Message-ID: <2e74c9bc-64c7-4e72-c88c-939fe8b2e167@cs.ucla.edu> (raw)
In-Reply-To: <87k1b0wc2x.fsf@gmx.de>

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

Michael Albinus wrote:
> You might install the patch, and also adapt the templates in
> `tramp-do-file-attributes-with-stat and'
> `tramp-do-directory-files-and-attributes-with-stat'.

Thanks, I missed those templates. I adapted them too and installed the attached 
combined patch into master.

[-- Attachment #2: 0001-Fix-Tramp-rounding-of-file-sizes-and-inode-numbers.patch --]
[-- Type: text/x-patch, Size: 2732 bytes --]

From 0e2d559daf43a04024ceaacfc8844839af2d50df Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 26 Aug 2019 18:57:56 -0700
Subject: [PATCH] Fix Tramp rounding of file sizes and inode numbers

* lisp/net/tramp-sh.el (tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-do-file-attributes-with-stat)
(tramp-do-directory-files-and-attributes-with-stat):
Format file sizes and inode numbers without trailing ".0",
to avoid rounding errors when absolute values exceed 2**53
(Bug#36940#94).  This fixes the problem for Emacs 27 and later,
and doesn't hurt in earlier Emacs.
---
 lisp/net/tramp-sh.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 1f7c8f6e49..217e73a24b 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -669,7 +669,7 @@ tramp-perl-file-attributes
 $uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . \"\\\"\";
 $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . \"\\\"\";
 printf(
-    \"(%%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u.0 %%u t %%u.0 -1)\\n\",
+    \"(%%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u %%u t %%u -1)\\n\",
     $type,
     $stat[3],
     $uid,
@@ -719,7 +719,7 @@ tramp-perl-directory-files-and-attributes
     $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . \"\\\"\";
     $filename =~ s/\"/\\\\\"/g;
     printf(
-        \"(\\\"%%s\\\" %%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u.0 %%u t %%u.0 -1)\\n\",
+        \"(\\\"%%s\\\" %%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u %%u t %%u -1)\\n\",
         $filename,
         $type,
         $stat[3],
@@ -1353,7 +1353,7 @@ tramp-do-file-attributes-with-stat
        ;; `tramp-stat-marker', in order to make a proper shell escape
        ;; of them in file names.
        "( (%s %s || %s -h %s) && (%s -c "
-       "'((%s%%N%s) %%h %s %s %%X %%Y %%Z %%s.0 %s%%A%s t %%i.0 -1)' "
+       "'((%s%%N%s) %%h %s %s %%X %%Y %%Z %%s %s%%A%s t %%i -1)' "
        "%s | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g') || echo nil)"))
     (tramp-get-file-exists-command vec)
     (tramp-shell-quote-argument localname)
@@ -1764,7 +1764,7 @@ tramp-do-directory-files-and-attributes-with-stat
        ;; of them in file names.
        "cd %s && echo \"(\"; (%s %s -a | "
        "xargs %s -c "
-       "'(%s%%n%s (%s%%N%s) %%h %s %s %%X %%Y %%Z %%s.0 %s%%A%s t %%i.0 -1)' "
+       "'(%s%%n%s (%s%%N%s) %%h %s %s %%X %%Y %%Z %%s %s%%A%s t %%i -1)' "
        "-- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g'); echo \")\""))
     (tramp-shell-quote-argument localname)
     (tramp-get-ls-command vec)
-- 
2.17.1


  reply	other threads:[~2019-08-27  2:17 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
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 [this message]
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

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

  git send-email \
    --in-reply-to=2e74c9bc-64c7-4e72-c88c-939fe8b2e167@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=36940@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    --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 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.