From: Michael Albinus <michael.albinus@gmx.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Stefan Kangas <stefan@marxist.se>, 37202@debbugs.gnu.org
Subject: bug#37202: shadowfile-tests: two failures on macOS
Date: Fri, 20 Sep 2019 14:35:52 +0200 [thread overview]
Message-ID: <871rwbqh5j.fsf@gmx.de> (raw)
In-Reply-To: <CADwFkmmmtoxKqsg4J-tZMY4E-MmjOATPDXvxx-Stod9e+DbAxQ@mail.gmail.com>
Paul Eggert <eggert@cs.ucla.edu> writes:
Hi Paul,
> Could you explain how the backtrace implicates file-attributes? I see
> the following in the backtrace, but I don't see file-attributes listed
> there, and when I look at the tramp-handle-file-modes source it
> appears that file-attributes returned nil which is what I think you
> expected.
>
> Test shadow-test08-shadow-todo backtrace:
> signal(args-out-of-range ("([] 1)"))
> tramp-signal-hook-function(args-out-of-range ([] 1))
> tramp-mode-string-to-int(nil)
>
> tramp-handle-file-modes(#("/mock:localhost:/build/shadowfile-tests75GTBI"
> 6 15 (tramp-default t)))
Right, `file-attributes' does not seem to have raised an error. But it
still seems to behave differently. The code is
--8<---------------cut here---------------start------------->8---
(defun tramp-handle-file-modes (filename)
"Like `file-modes' for Tramp files."
(let ((truename (or (file-truename filename) filename)))
(when (file-exists-p truename)
(tramp-mode-string-to-int
(tramp-compat-file-attribute-modes (file-attributes truename))))))
--8<---------------cut here---------------end--------------->8---
That means, (file-attributes truename) returns nil although
(file-exists-p truename) returns non-nil. That seems to be a changed
behaviour to me, I don't remember having seen this before.
Arguably, the test shall better use `access-file' but
`file-exists-p'. But anyway, such subtle differences could break Tramp.
I still use conditional wording, because I cannot debug on hydra. And I
cannot say for sure that your changes have caused the problem.
For the time being, I'll adapt `tramp-handle-file-modes' in order to
unbreak the errors on hydra.
Best regards, Michael.
next prev parent reply other threads:[~2019-09-20 12:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 0:41 bug#37202: shadowfile-tests: two failures on macOS Stefan Kangas
2019-08-28 8:18 ` Michael Albinus
2019-08-29 13:51 ` Michael Albinus
[not found] ` <CADwFkmkxp+NhTTuUg_kja-768nskD4JhbhTwTMKkwh4=QxfKjw@mail.gmail.com>
2019-09-03 12:12 ` Michael Albinus
2019-09-03 13:13 ` Stefan Kangas
2019-09-03 15:04 ` Michael Albinus
2019-09-04 12:16 ` Michael Albinus
2019-09-05 15:07 ` Stefan Kangas
2019-09-07 10:33 ` Michael Albinus
2019-09-07 12:45 ` Stefan Kangas
2019-09-08 8:21 ` Michael Albinus
2019-09-08 20:23 ` Stefan Kangas
2019-09-13 12:29 ` Michael Albinus
2019-09-14 16:39 ` Stefan Kangas
2019-09-15 14:56 ` Michael Albinus
2019-09-16 2:07 ` Stefan Kangas
2019-09-16 13:13 ` Michael Albinus
2019-09-16 19:52 ` Glenn Morris
2019-09-19 11:09 ` Michael Albinus
2019-09-20 0:19 ` Paul Eggert
2019-09-20 12:35 ` Michael Albinus [this message]
2019-09-20 19:04 ` Paul Eggert
2019-09-20 19:13 ` Michael Albinus
2019-09-21 7:55 ` Michael Albinus
2019-10-03 13:50 ` 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=871rwbqh5j.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=37202@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--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).