bug#42537: 28.0.50; wdired-test-bug34915 test failing on macOS

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#42537: 28.0.50; wdired-test-bug34915 test failing on macOS

Philipp Stephani

This is yet another follow-up tp bug#30700, reporting each failing test
case individually.

(Shell command succeeded with no output)
Connection file "/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/test-dir-gPZnuj/server" deleted
Press C-c C-c when finished or C-c ESC to abort changes
1 rename actions failed--type ? for details
Connection file "/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/test-dir-gPZnuj/server" deleted
Test wdired-test-bug34915 backtrace:
  signal(ert-test-failed (((should (equal dir (pop names))) :form (equ
  ert-fail(((should (equal dir (pop names))) :form (equal "bar@" "wbar
  #f(compiled-function () #<bytecode 0xdfa3f2ccdbd9c18>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name wdired-test-bug34915 :documentation "
  ert-run-or-rerun-test(#s(ert--stats :selector (not (or ... ...)) :te
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/wdired-tests" "--eva
  command-line()
  normal-top-level()
Test wdired-test-bug34915 condition:
    (ert-test-failed
     ((should
       (equal dir
              (pop names)))
      :form
      (equal "bar@" "wbar@")
      :value nil :explanation
      (arrays-of-different-length 4 5 "bar@" "wbar@" first-mismatch-at 0)))
   FAILED  3/5  wdired-test-bug34915 (0.353864 sec)

(Crystal ball says this might be related to macOS filename
normalization/case-insensitivity.)


In GNU Emacs 28.0.50 (build 67, x86_64-apple-darwin19.5.0, NS appkit-1894.50 Version 10.15.5 (Build 19F101))
 of 2020-07-25
Repository revision: 3b44829823f43d3736b8ec9db2258eeff7f6c16a
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.5

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-modules --without-xml2 --without-pop --with-mailutils
 --enable-gcc-warnings=warn-only --enable-checking=all
 --enable-check-lisp-object-type 'CFLAGS=-ggdb3 -O0''

Configured features:
JPEG TIFF GIF PNG NOTIFY KQUEUE ACL GNUTLS ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS JSON PDUMPER LCMS2

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

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs rfc822
mml easymenu mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils phst skeleton derived edmacro
kmacro pcase ffap thingatpt url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars mailcap subr-x rx gnutls puny seq
byte-opt gv bytecomp byte-compile cconv dbus xml compile comint
ansi-color ring cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 69709 6701)
 (symbols 48 8650 1)
 (strings 32 23543 1226)
 (string-bytes 1 768591)
 (vectors 16 14147)
 (vector-slots 8 172535 9084)
 (floats 8 26 29)
 (intervals 56 206 0)
 (buffers 992 10))



Reply | Threaded
Open this post in threaded view
|

bug#42537: 28.0.50; wdired-test-bug34915 test failing on macOS

Lars Ingebrigtsen
Philipp <[hidden email]> writes:

>       :form
>       (equal "bar@" "wbar@")
>       :value nil :explanation
>       (arrays-of-different-length 4 5 "bar@" "wbar@" first-mismatch-at 0)))
>    FAILED  3/5  wdired-test-bug34915 (0.353864 sec)
>
> (Crystal ball says this might be related to macOS filename
> normalization/case-insensitivity.)

There's something very odd going on here.

If I create a file /tmp/bar and then say

(make-symbolic-link "bar" "foo")

I get, as expected

  -rw-r--r--  1 larsi  wheel    0 Aug  4 14:09 bar
  lrwxr-xr-x  1 larsi  wheel    3 Aug  4 14:09 foo -> bar

However, if I do something similar in the test director, dired insists
on adding a "@" to the end of the file name, which messes up everything:
 
  /var/folders/l6/0kf2px5j7tz_wbp9lf_hgfwm0000gn/T/test-dir-iRvcaN:

  -rw-r--r--  1 larsi  staff   1 Aug  4 14:12 zot
  lrwxr-xr-x  1 larsi  staff   3 Aug  4 14:14 zotlink@ -> zot

Uhm...  Oh, that's the entire point of the test.  :-)  "ls -F" adds the
"@".

So the error is a real bug, because

 (dired-get-filename 'no-dir t)
 => "zotlink@"

And that's because dired-ls-F-marks-symlinks is nil...

;; 1. For dired to work on a host which marks symlinks with a trailing @ in
;;    an ls -alF listing, you need to (setq dired-ls-F-marks-symlinks t).
;;    Most UNIX systems do not do this, but ULTRIX does.

And Macos is another:

larsi@space /tmp % ls -alF /tmp/
total 0
drwxrwxrwt  8 root   wheel  256 Aug  4 14:12 ./
drwxr-xr-x  6 root   wheel  192 Aug  2 18:53 ../
-rw-r--r--  1 larsi  wheel    0 Aug  4 14:09 bar
lrwxr-xr-x  1 larsi  wheel    3 Aug  4 14:09 foo@ -> bar
lrwxr-xr-x  1 larsi  wheel    3 Aug  4 14:10 foo3@ -> bar
lrwxr-xr-x  1 larsi  wheel    3 Aug  4 14:12 foo4@ -> bar

OK, I've now adjusted the test and fixed the doc string to
dired-ls-F-marks-symlinks in Emacs 28.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



Reply | Threaded
Open this post in threaded view
|

bug#42537: 28.0.50; wdired-test-bug34915 test failing on macOS

Robert Pluim
>>>>> On Tue, 04 Aug 2020 14:32:13 +0200, Lars Ingebrigtsen <[hidden email]> said:
    Lars> ;; 1. For dired to work on a host which marks symlinks with a trailing @ in
    Lars> ;;    an ls -alF listing, you need to (setq dired-ls-F-marks-symlinks t).
    Lars> ;;    Most UNIX systems do not do this, but ULTRIX does.

    Lars> And Macos is another:

    Lars> larsi@space /tmp % ls -alF /tmp/
    Lars> total 0
    Lars> drwxrwxrwt  8 root   wheel  256 Aug  4 14:12 ./
    Lars> drwxr-xr-x  6 root   wheel  192 Aug  2 18:53 ../
    Lars> -rw-r--r--  1 larsi  wheel    0 Aug  4 14:09 bar
    Lars> lrwxr-xr-x  1 larsi  wheel    3 Aug  4 14:09 foo@ -> bar
    Lars> lrwxr-xr-x  1 larsi  wheel    3 Aug  4 14:10 foo3@ -> bar
    Lars> lrwxr-xr-x  1 larsi  wheel    3 Aug  4 14:12 foo4@ -> bar

    Lars> OK, I've now adjusted the test and fixed the doc string to
    Lars> dired-ls-F-marks-symlinks in Emacs 28.

Ah, this explains why the test wasn╩╝t failing for me: I installed GNU
ls :-)

Robert



Reply | Threaded
Open this post in threaded view
|

bug#42537: 28.0.50; wdired-test-bug34915 test failing on macOS

Lars Ingebrigtsen
Lars Ingebrigtsen <[hidden email]> writes:

> There seems to be further bugs with dired-ls-F-marks-symlinks  -- it
> doesn't work when in editing mode...

The bug is in wdired--restore-dired-filename-prop, which calculates the
end of the file name wrong in this case.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



Reply | Threaded
Open this post in threaded view
|

bug#42537: 28.0.50; wdired-test-bug34915 test failing on macOS

Lars Ingebrigtsen
Lars Ingebrigtsen <[hidden email]> writes:

> Lars Ingebrigtsen <[hidden email]> writes:
>
>> There seems to be further bugs with dired-ls-F-marks-symlinks  -- it
>> doesn't work when in editing mode...
>
> The bug is in wdired--restore-dired-filename-prop, which calculates the
> end of the file name wrong in this case.

OK; think I've got it now...

I really dislike how dired (and wdired) works -- it's just hack upon
hack...

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



Reply | Threaded
Open this post in threaded view
|

bug#42537: 28.0.50; wdired-test-bug34915 test failing on macOS

Philipp Stephani
Am Di., 4. Aug. 2020 um 15:57 Uhr schrieb Lars Ingebrigtsen <[hidden email]>:

>
> Lars Ingebrigtsen <[hidden email]> writes:
>
> > Lars Ingebrigtsen <[hidden email]> writes:
> >
> >> There seems to be further bugs with dired-ls-F-marks-symlinks  -- it
> >> doesn't work when in editing mode...
> >
> > The bug is in wdired--restore-dired-filename-prop, which calculates the
> > end of the file name wrong in this case.
>
> OK; think I've got it now...

It's working now for me, thanks.