GNU bug report logs - #56712
29.0.50; x-dnd-tests-do-direct-save fails on Cygwin

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Fri, 22 Jul 2022 21:11:02 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56712 in the body.
You can then email your comments to 56712 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to luangruo <at> yahoo.com, bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Fri, 22 Jul 2022 21:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Brown <kbrown <at> cornell.edu>:
New bug report received and forwarded. Copy sent to luangruo <at> yahoo.com, bug-gnu-emacs <at> gnu.org. (Fri, 22 Jul 2022 21:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Fri, 22 Jul 2022 17:10:16 -0400
The test in the subject fails as follows on Cygwin:

Test x-dnd-tests-do-direct-save backtrace:
  ert--should-signal-hook(ert-test-failed (((should (equal (x-dnd-test
  signal(ert-test-failed (((should (equal (x-dnd-tests-call-xds-conver
  ert-fail(((should (equal (x-dnd-tests-call-xds-converter) '(STRING .
  (if (unwind-protect (setq value-19 (apply fn-17 args-18)) (setq form
  (let (form-description-21) (if (unwind-protect (setq value-19 (apply
  (let ((value-19 'ert-form-evaluation-aborted-20)) (let (form-descrip
  (let* ((fn-17 #'equal) (args-18 (condition-case err (let ((signal-ho
  (prog1 'XdndActionDirectSave (let* ((fn-10 #'eq) (args-11 (condition
  x-begin-drag(("XdndDirectSave0" "text/uri-list") XdndActionDirectSav
  x-dnd-do-direct-save("/tmp/x-dnd-test7T4xoz" "x-dnd-test-targetDdUAT
  (list (x-dnd-do-direct-save original-file x-dnd-tests-xds-name nil n
  (let ((signal-hook-function #'ert--should-signal-hook)) (list (x-dnd
  (condition-case err (let ((signal-hook-function #'ert--should-signal
  (let* ((fn-47 #'eq) (args-48 (condition-case err (let ((signal-hook-
  (progn (if (file-exists-p original-file) nil (write-region "" 0 orig
  (unwind-protect (progn (if (file-exists-p original-file) nil (write-
  (progn (unwind-protect (progn (if (file-exists-p original-file) nil
  (let* ((--cl-gui-set-selection-- #'ignore)) (progn (unwind-protect (
  (let ((x-dnd-tests-xds-include-hostname include-hostname) (x-dnd-tes
  x-dnd-tests-do-direct-save-internal(nil)
  (closure (t) nil (x-dnd-tests-do-direct-save-internal nil) (x-dnd-te
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name x-dnd-tests-do-direct-save :documenta
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":../../master/test" "-l" "ert" "-l" "lisp/x-dn
  command-line()
  normal-top-level()
Test x-dnd-tests-do-direct-save condition:
    (ert-test-failed
     ((should
       (equal
        (x-dnd-tests-call-xds-converter)
        '(STRING . "S")))
      :form
      (equal
       (STRING . "E")
       (STRING . "S"))
      :value nil :explanation
      (cdr
       (array-elt 0
                  (different-atoms ... ...)))))

The failure first occurred in the commit that introduced the test.  Let me know 
what I can do to help debug this.

Ken


In GNU Emacs 29.0.50 (build 42, x86_64-pc-cygwin, GTK+ Version 3.22.28, cairo 
version 1.17.4)
 of 2022-07-22 built on moufang2
Repository revision: 3534a8e15c971d4dc901e029f8c0f6ba68fcecd5
Repository branch: master
Windowing system distributor 'The Cygwin/X Project', version 11.0.12101003
Configured using:
 'configure 'CFLAGS=-g3 -O0''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBXML2 M17N_FLT MODULES NOTIFY GFILENOTIFY PDUMPER PNG
RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2
XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sat, 23 Jul 2022 01:12:03 GMT) Full text and rfc822 format available.

Message #8 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sat, 23 Jul 2022 09:10:56 +0800
Ken Brown <kbrown <at> cornell.edu> writes:

> The failure first occurred in the commit that introduced the test.
> Let me know what I can do to help debug this.

Thanks.  That means this code in x-dnd.el has failed:

          (progn
            (copy-file x-dnd-xds-current-file
                       local-name t)
            (when (equal x-dnd-xds-current-file
                         dnd-last-dragged-remote-file)
              (dnd-remove-last-dragged-remote-file)))

So it would be good to get the detailed error message from that progn.




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 23 Jul 2022 05:54:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sat, 23 Jul 2022 17:31:02 GMT) Full text and rfc822 format available.

Message #13 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sat, 23 Jul 2022 13:30:03 -0400
On 7/22/2022 9:10 PM, Po Lu wrote:
> Ken Brown <kbrown <at> cornell.edu> writes:
> 
>> The failure first occurred in the commit that introduced the test.
>> Let me know what I can do to help debug this.
> 
> Thanks.  That means this code in x-dnd.el has failed:
> 
>            (progn
>              (copy-file x-dnd-xds-current-file
>                         local-name t)
>              (when (equal x-dnd-xds-current-file
>                           dnd-last-dragged-remote-file)
>                (dnd-remove-last-dragged-remote-file)))
> 
> So it would be good to get the detailed error message from that progn.

Sorry, I'm not immediately seeing how to do this in the context of the test. 
Could you be more explicit?

In the meantime, I tried

   make -C test x-dnd-tests TEST_INTERACTIVE=yes

and the *ert* buffer reported

F x-dnd-tests-do-direct-save
    (error "Invalid selection type: XdndSelection")

Does that help?

By the way, I should have said in my original report that I do an out-of-tree 
build.  I'll try an in-tree build after sending this message to see if I still 
get the test failure.

Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sat, 23 Jul 2022 17:42:02 GMT) Full text and rfc822 format available.

Message #16 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sat, 23 Jul 2022 13:41:39 -0400
On 7/23/2022 1:30 PM, Ken Brown wrote:
> On 7/22/2022 9:10 PM, Po Lu wrote:
>> Ken Brown <kbrown <at> cornell.edu> writes:
>>
>>> The failure first occurred in the commit that introduced the test.
>>> Let me know what I can do to help debug this.
>>
>> Thanks.  That means this code in x-dnd.el has failed:
>>
>>            (progn
>>              (copy-file x-dnd-xds-current-file
>>                         local-name t)
>>              (when (equal x-dnd-xds-current-file
>>                           dnd-last-dragged-remote-file)
>>                (dnd-remove-last-dragged-remote-file)))
>>
>> So it would be good to get the detailed error message from that progn.
> 
> Sorry, I'm not immediately seeing how to do this in the context of the test. 
> Could you be more explicit?
> 
> In the meantime, I tried
> 
>     make -C test x-dnd-tests TEST_INTERACTIVE=yes
> 
> and the *ert* buffer reported
> 
> F x-dnd-tests-do-direct-save
>      (error "Invalid selection type: XdndSelection")
> 
> Does that help?
> 
> By the way, I should have said in my original report that I do an out-of-tree 
> build.  I'll try an in-tree build after sending this message to see if I still 
> get the test failure.

That wasn't the problem.  I get the same failure with an in-tree build.

Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 02:27:02 GMT) Full text and rfc822 format available.

Message #19 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 10:26:30 +0800
Ken Brown <kbrown <at> cornell.edu> writes:

> Sorry, I'm not immediately seeing how to do this in the context of the
> test. Could you be more explicit?

I suggest adding some code here, in x-dnd.el:

      (condition-case nil
          (progn
            (copy-file x-dnd-xds-current-file
                       local-name t)
            (when (equal x-dnd-xds-current-file
                         dnd-last-dragged-remote-file)
              (dnd-remove-last-dragged-remote-file)))
        (:success '(STRING . "S"))
        (error '(STRING . "E")) <--- add code here

to print out the error that is causing it to reply with "E".

> Does that help?

No, unfortunately not.  The test is not useful interactively.

> By the way, I should have said in my original report that I do an
> out-of-tree build.  I'll try an in-tree build after sending this
> message to see if I still get the test failure.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 05:51:02 GMT) Full text and rfc822 format available.

Message #22 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 56712 <at> debbugs.gnu.org, kbrown <at> cornell.edu
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 08:50:17 +0300
> Cc: 56712 <at> debbugs.gnu.org
> Date: Sun, 24 Jul 2022 10:26:30 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Ken Brown <kbrown <at> cornell.edu> writes:
> 
> > Sorry, I'm not immediately seeing how to do this in the context of the
> > test. Could you be more explicit?
> 
> I suggest adding some code here, in x-dnd.el:
> 
>       (condition-case nil
>           (progn
>             (copy-file x-dnd-xds-current-file
>                        local-name t)
>             (when (equal x-dnd-xds-current-file
>                          dnd-last-dragged-remote-file)
>               (dnd-remove-last-dragged-remote-file)))
>         (:success '(STRING . "S"))
>         (error '(STRING . "E")) <--- add code here
> 
> to print out the error that is causing it to reply with "E".

Maybe it is worth our while to convert this to a debugging code which
would collect the information given some variable setting?  Similar to
what other packages do, like Tramp?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 07:24:02 GMT) Full text and rfc822 format available.

Message #25 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56712 <at> debbugs.gnu.org, kbrown <at> cornell.edu
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 15:23:06 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>>       (condition-case nil
>>           (progn
>>             (copy-file x-dnd-xds-current-file
>>                        local-name t)
>>             (when (equal x-dnd-xds-current-file
>>                          dnd-last-dragged-remote-file)
>>               (dnd-remove-last-dragged-remote-file)))
>>         (:success '(STRING . "S"))
>>         (error '(STRING . "E")) <--- add code here
>> 
>> to print out the error that is causing it to reply with "E".
>
> Maybe it is worth our while to convert this to a debugging code which
> would collect the information given some variable setting?  Similar to
> what other packages do, like Tramp?

I'm not sure what you mean by that.  Could you explain which part of the
Tramp code has such debug functionality?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 07:44:01 GMT) Full text and rfc822 format available.

Message #28 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: Po Lu <luangruo <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>,
 56712 <at> debbugs.gnu.org, kbrown <at> cornell.edu
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 09:42:47 +0200
Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>>       (condition-case nil
>>>           (progn
>>>             (copy-file x-dnd-xds-current-file
>>>                        local-name t)
>>>             (when (equal x-dnd-xds-current-file
>>>                          dnd-last-dragged-remote-file)
>>>               (dnd-remove-last-dragged-remote-file)))
>>>         (:success '(STRING . "S"))
>>>         (error '(STRING . "E")) <--- add code here
>>>
>>> to print out the error that is causing it to reply with "E".
>>
>> Maybe it is worth our while to convert this to a debugging code which
>> would collect the information given some variable setting?  Similar to
>> what other packages do, like Tramp?
>
> I'm not sure what you mean by that.  Could you explain which part of the
> Tramp code has such debug functionality?

All the calls of `tramp-message' and `tramp-error', controlled by the
debug level in `tramp-verbose'.

> Thanks.

Best regars, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 07:44:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 08:56:01 GMT) Full text and rfc822 format available.

Message #34 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 56712 <at> debbugs.gnu.org, kbrown <at> cornell.edu
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 11:55:49 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: kbrown <at> cornell.edu,  56712 <at> debbugs.gnu.org
> Date: Sun, 24 Jul 2022 15:23:06 +0800
> 
> > Maybe it is worth our while to convert this to a debugging code which
> > would collect the information given some variable setting?  Similar to
> > what other packages do, like Tramp?
> 
> I'm not sure what you mean by that.  Could you explain which part of the
> Tramp code has such debug functionality?

I meant the concept: the user sets some variable, and that causes
debug information to be collected in some buffer.  The variable could
be a boolean, or it could allow specifying different levels of debug
info to collect.  See tramp-verbose for an example.  (I'm sure Michael
can describe these Tramp facilities in more detail if needed.)

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 10:56:01 GMT) Full text and rfc822 format available.

Message #37 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56712 <at> debbugs.gnu.org, kbrown <at> cornell.edu
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 18:55:33 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> I meant the concept: the user sets some variable, and that causes
> debug information to be collected in some buffer.  The variable could
> be a boolean, or it could allow specifying different levels of debug
> info to collect.  See tramp-verbose for an example.  (I'm sure Michael
> can describe these Tramp facilities in more detail if needed.)
>
> Thanks.

Sure, I will arrange that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 13:34:02 GMT) Full text and rfc822 format available.

Message #40 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56712 <at> debbugs.gnu.org, kbrown <at> cornell.edu
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 21:33:21 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> I meant the concept: the user sets some variable, and that causes
> debug information to be collected in some buffer.  The variable could
> be a boolean, or it could allow specifying different levels of debug
> info to collect.  See tramp-verbose for an example.  (I'm sure Michael
> can describe these Tramp facilities in more detail if needed.)
>
> Thanks.

Now done.  Ken, could you please re-run the test and show the detailed
error that is signalled?

Thanks in advance.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Sun, 24 Jul 2022 15:42:01 GMT) Full text and rfc822 format available.

Message #43 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Po Lu <luangruo <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 11:40:51 -0400
On 7/24/2022 9:33 AM, Po Lu wrote:
> Now done.  Ken, could you please re-run the test and show the detailed
> error that is signalled?

Thanks.  The error is now clear:

Test x-dnd-tests-do-direct-save condition:
    (file-missing "Opening output file" "No such file or directory" 
"//tmp/x-dnd-testvZQUCZ/x-dnd-test-targetKiqqPT")

According to POSIX, the meaning of exactly 2 slashes at the beginning of a path 
name is system dependent.  On Cygwin it's interpreted as a UNC path.  That 
explains the error, but I don't immediately see where the extra slash comes 
from.  (There are plenty of references to UNC paths and to "file://" and 
"file:///" in dnd.el, so maybe there's some code in there that incorrectly 
assumes that MS-Windows is the only platform on which exactly 2 initial slashes 
has a special meaning.)

Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Mon, 25 Jul 2022 01:03:01 GMT) Full text and rfc822 format available.

Message #46 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Mon, 25 Jul 2022 09:02:28 +0800
Ken Brown <kbrown <at> cornell.edu> writes:

> On 7/24/2022 9:33 AM, Po Lu wrote:
>> Now done.  Ken, could you please re-run the test and show the detailed
>> error that is signalled?
>
> Thanks.  The error is now clear:
>
> Test x-dnd-tests-do-direct-save condition:
>     (file-missing "Opening output file" "No such file or directory"
>     "//tmp/x-dnd-testvZQUCZ/x-dnd-test-targetKiqqPT")
>
> According to POSIX, the meaning of exactly 2 slashes at the beginning
> of a path name is system dependent.  On Cygwin it's interpreted as a
> UNC path.  That explains the error, but I don't immediately see where
> the extra slash comes from.  (There are plenty of references to UNC
> paths and to "file://" and "file:///" in dnd.el, so maybe there's some
> code in there that incorrectly assumes that MS-Windows is the only
> platform on which exactly 2 initial slashes has a special meaning.)
>
> Ken

Unless system-type can be windows-nt on Cygwin, I don't think that can
happen.  I will look into this, thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Mon, 25 Jul 2022 01:43:01 GMT) Full text and rfc822 format available.

Message #49 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Sun, 24 Jul 2022 21:42:26 -0400
On 7/24/2022 9:02 PM, Po Lu wrote:
> Ken Brown <kbrown <at> cornell.edu> writes:
> 
>> On 7/24/2022 9:33 AM, Po Lu wrote:
>>> Now done.  Ken, could you please re-run the test and show the detailed
>>> error that is signalled?
>>
>> Thanks.  The error is now clear:
>>
>> Test x-dnd-tests-do-direct-save condition:
>>      (file-missing "Opening output file" "No such file or directory"
>>      "//tmp/x-dnd-testvZQUCZ/x-dnd-test-targetKiqqPT")
>>
>> According to POSIX, the meaning of exactly 2 slashes at the beginning
>> of a path name is system dependent.  On Cygwin it's interpreted as a
>> UNC path.  That explains the error, but I don't immediately see where
>> the extra slash comes from.  (There are plenty of references to UNC
>> paths and to "file://" and "file:///" in dnd.el, so maybe there's some
>> code in there that incorrectly assumes that MS-Windows is the only
>> platform on which exactly 2 initial slashes has a special meaning.)
>>
>> Ken
> 
> Unless system-type can be windows-nt on Cygwin, I don't think that can
> happen.

No, system-type is cygwin on Cygwin.

>  I will look into this, thanks.

Thanks.

Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Mon, 25 Jul 2022 02:11:01 GMT) Full text and rfc822 format available.

Message #52 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Mon, 25 Jul 2022 10:10:23 +0800
Ken Brown <kbrown <at> cornell.edu> writes:

> Thanks.

It's a bug in the test, which I (hopefully) fixed.  Please give it
another try.




Reply sent to Ken Brown <kbrown <at> cornell.edu>:
You have taken responsibility. (Mon, 25 Jul 2022 16:25:02 GMT) Full text and rfc822 format available.

Notification sent to Ken Brown <kbrown <at> cornell.edu>:
bug acknowledged by developer. (Mon, 25 Jul 2022 16:25:02 GMT) Full text and rfc822 format available.

Message #57 received at 56712-done <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 56712-done <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Mon, 25 Jul 2022 12:24:21 -0400
On 7/24/2022 10:10 PM, Po Lu wrote:
> It's a bug in the test, which I (hopefully) fixed.  Please give it
> another try.

It's fixed, thanks.  So I guessed right about there being a "file:///" that 
should have been "file://", but I didn't see it staring me in the face in the 
test file!

Closing.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Mon, 25 Jul 2022 16:55:02 GMT) Full text and rfc822 format available.

Message #60 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: luangruo <at> yahoo.com, 56712 <at> debbugs.gnu.org
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Mon, 25 Jul 2022 19:53:58 +0300
> Date: Mon, 25 Jul 2022 12:24:21 -0400
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 56712-done <at> debbugs.gnu.org
> From: Ken Brown <kbrown <at> cornell.edu>
> 
> On 7/24/2022 10:10 PM, Po Lu wrote:
> > It's a bug in the test, which I (hopefully) fixed.  Please give it
> > another try.
> 
> It's fixed, thanks.  So I guessed right about there being a "file:///" that 
> should have been "file://", but I didn't see it staring me in the face in the 
> test file!

FTR: if that test should ever run on native MS-Windows, we'd need that
third slash, because file://c:/foo/bar is not valid on Windows, you
must say file:///c:/foo/bar.

So from my POV, it is best to make that code system-dependent, with
windows-nt using 3 slashes, not 2.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Tue, 26 Jul 2022 02:12:01 GMT) Full text and rfc822 format available.

Message #63 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56712 <at> debbugs.gnu.org, Ken Brown <kbrown <at> cornell.edu>
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Tue, 26 Jul 2022 10:10:49 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> FTR: if that test should ever run on native MS-Windows, we'd need that
> third slash, because file://c:/foo/bar is not valid on Windows, you
> must say file:///c:/foo/bar.
>
> So from my POV, it is best to make that code system-dependent, with
> windows-nt using 3 slashes, not 2.

The code is specific to X -- as evidenced by the name.  Doesn't Cygwin
(the only way I know of to get an X server on MS Windows) use Unix-style
file names everywhere?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Tue, 26 Jul 2022 02:39:02 GMT) Full text and rfc822 format available.

Message #66 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 56712 <at> debbugs.gnu.org, kbrown <at> cornell.edu
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Tue, 26 Jul 2022 05:38:53 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: Ken Brown <kbrown <at> cornell.edu>,  56712 <at> debbugs.gnu.org
> Date: Tue, 26 Jul 2022 10:10:49 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > FTR: if that test should ever run on native MS-Windows, we'd need that
> > third slash, because file://c:/foo/bar is not valid on Windows, you
> > must say file:///c:/foo/bar.
> >
> > So from my POV, it is best to make that code system-dependent, with
> > windows-nt using 3 slashes, not 2.
> 
> The code is specific to X -- as evidenced by the name.  Doesn't Cygwin
> (the only way I know of to get an X server on MS Windows) use Unix-style
> file names everywhere?

Yes, thus my "if this test should ever run" condition.

IOW, the code produces 3 slashes by concatenating 2 strings, but the
results are only correct on Posix filesystems.  So at least a comment
is in order there, because how long would it take, you think, for
someone to copy/paste that code into an entirely different context?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56712; Package emacs. (Tue, 26 Jul 2022 02:53:01 GMT) Full text and rfc822 format available.

Message #69 received at 56712 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56712 <at> debbugs.gnu.org, kbrown <at> cornell.edu
Subject: Re: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin
Date: Tue, 26 Jul 2022 10:52:09 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> Yes, thus my "if this test should ever run" condition.
>
> IOW, the code produces 3 slashes by concatenating 2 strings, but the
> results are only correct on Posix filesystems.  So at least a comment
> is in order there, because how long would it take, you think, for
> someone to copy/paste that code into an entirely different context?

I see, I'll add a comment there.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Aug 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.