Subject: tramp-test04-substitute-in-file-name failure on RHEL 7.8

From: Paul Eggert <[email-masked]>
Date: Tue, 25 Aug 2020 18:49:48 -0700

Found via 'make check'. tramp-tests.log says this:

Test tramp-test04-substitute-in-file-name backtrace:
   signal(ert-test-failed (((should (string-equal (substitute-in-file-n
   ert-fail(((should (string-equal (substitute-in-file-name "/method:ho
   #f(compiled-function () #<bytecode 0x102d86f262b5727f>)()
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name tramp-test04-substitute-in-file-name
   ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
   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/net/tramp-tests" "--
   command-line()
   normal-top-level()
Test tramp-test04-substitute-in-file-name condition:
     (ert-test-failed
      ((should
        (string-equal
	(substitute-in-file-name "/method:host://~foo")
	"/~foo"))
       :form
       (string-equal "~foo" "/~foo")
       :value nil))
    FAILED   7/47  tramp-test04-substitute-in-file-name (0.011468 sec)

This is Emacs master on RHEL 7.8 x86-64, atop an NFS filesystem. The same test 
works OK on Fedora 31 x86-64 atop a local filesystem. Here are more details 
about the failing system.

In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo 
version 1.15.12)
  of 2020-08-25 built on lnxsrv10.seas.ucla.edu
Repository revision: d4b5dff48297faec67291c95f8831a3d84f87460
Repository branch: master
System Description: Red Hat Enterprise Linux

Configured using:
  'configure --enable-gcc-warnings --with-gif=ifavailable'

Configured features:
XPM JPEG TIFF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS PDUMPER

Important settings:
   value of $LC_ALL: en_US.utf8
   value of $LC_COLLATE: en_US.UTF-8
   value of $LC_CTYPE: en_US.UTF-8
   value of $LC_MESSAGES: en_US.UTF-8
   value of $LANG: C
   locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
   shell-dirtrack-mode: t
   global-whitespace-mode: t
   tooltip-mode: t
   global-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
   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 puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils eieio-opt cl-extra
speedbar ezimage dframe find-func help-fns radix-tree help-mode
tramp-cache tramp-sh thingatpt grep compile misearch multi-isearch
bug-reference tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat shell pcomplete comint ansi-color ring parse-time iso8601
time-date ls-lisp format-spec auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map seq vc-git
diff-mode easymenu easy-mmode cl-loaddefs cl-lib term/xterm xterm
byte-opt gv bytecomp byte-compile cconv whitespace tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd 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 dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 93111 8832)
  (symbols 48 10020 1)
  (strings 32 30564 1862)
  (string-bytes 1 1082475)
  (vectors 16 15247)
  (vector-slots 8 175491 6476)
  (floats 8 53 475)
  (intervals 56 1693 128)
  (buffers 992 16)
  (heap 1024 6704 893))