Subject: bug#56712: 29.0.50; x-dnd-tests-do-direct-save fails on Cygwin

From: Ken Brown <[email-masked]>
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