From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#36940: tests slowness and failure after recent Tramp changes Date: Mon, 26 Aug 2019 19:17:01 -0700 Organization: UCLA Computer Science Department Message-ID: <2e74c9bc-64c7-4e72-c88c-939fe8b2e167@cs.ucla.edu> References: <57e233fe-19e9-6eac-7fd5-7e181879d4df@cs.ucla.edu> <87h86uh2l6.fsf@gmx.de> <1bec46f5-01e7-5ea4-5562-501185d80ecf@cs.ucla.edu> <87v9vaf4sk.fsf@gmx.de> <87r25xf1dn.fsf@gmx.de> <8736ibkbne.fsf@gmx.de> <87mughfj96.fsf@gmx.de> <470b50ab-6658-e3cb-cd59-916c398c442f@cs.ucla.edu> <87h86of1tm.fsf@gmx.de> <87v9v0avhm.fsf@gmx.de> <8736hryoi1.fsf@gmx.de> <8736hpxy87.fsf@gmx.de> <661631ef-57ff-a907-d69c-b78aebfa68b9@cs.ucla.edu> <87y2zhw6eq.fsf@gmx.de> <87k1b0wc2x.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------788129672871A9B3E8100F37" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="35167"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cc: Stefan Kangas , 36940@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 27 04:18:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i2R3l-00090o-8T for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Aug 2019 04:18:13 +0200 Original-Received: from localhost ([::1]:46048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2R3j-0003z5-IH for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Aug 2019 22:18:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48353) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2R3b-0003yn-9f for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2019 22:18:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2R3a-0001nb-4R for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2019 22:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2R3a-0001nU-0E for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2019 22:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i2R3Z-0000W9-PO for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2019 22:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Aug 2019 02:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36940 X-GNU-PR-Package: emacs Original-Received: via spool by 36940-submit@debbugs.gnu.org id=B36940.15668722311931 (code B ref 36940); Tue, 27 Aug 2019 02:18:01 +0000 Original-Received: (at 36940) by debbugs.gnu.org; 27 Aug 2019 02:17:11 +0000 Original-Received: from localhost ([127.0.0.1]:47426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2R2l-0000V5-Aj for submit@debbugs.gnu.org; Mon, 26 Aug 2019 22:17:11 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2R2i-0000Us-QZ for 36940@debbugs.gnu.org; Mon, 26 Aug 2019 22:17:09 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2E150160056; Mon, 26 Aug 2019 19:17:03 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7UCiURXDwRXW; Mon, 26 Aug 2019 19:17:02 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4ED391600C6; Mon, 26 Aug 2019 19:17:02 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pkFI6b2Hpdbk; Mon, 26 Aug 2019 19:17:02 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 209F1160056; Mon, 26 Aug 2019 19:17:02 -0700 (PDT) In-Reply-To: <87k1b0wc2x.fsf@gmx.de> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165934 Archived-At: This is a multi-part message in MIME format. --------------788129672871A9B3E8100F37 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------788129672871A9B3E8100F37 Content-Type: text/x-patch; name="0001-Fix-Tramp-rounding-of-file-sizes-and-inode-numbers.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Fix-Tramp-rounding-of-file-sizes-and-inode-numbers.patc"; filename*1="h" >From 0e2d559daf43a04024ceaacfc8844839af2d50df Mon Sep 17 00:00:00 2001 From: Paul Eggert 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 --------------788129672871A9B3E8100F37--