From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#19657: 25.0.50; Test failures in Emacs master, can't figure out what I'm doing wrong Date: Thu, 22 Jan 2015 19:50:30 -0500 Message-ID: <1i7fweuxpl.fsf@fencepost.gnu.org> References: <87sif24p4c.fsf@loki.jorgenschaefer.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1421974273 21446 80.91.229.3 (23 Jan 2015 00:51:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2015 00:51:13 +0000 (UTC) Cc: 19657@debbugs.gnu.org To: Jorgen Schaefer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 23 01:51:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YESSq-0002VV-4k for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jan 2015 01:51:08 +0100 Original-Received: from localhost ([::1]:56665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YESSp-00089w-7i for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Jan 2015 19:51:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YESSk-000884-Vx for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 19:51:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YESSk-0002U7-0I for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 19:51:02 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YESSj-0002U3-T9 for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 19:51:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YESSj-0000Ae-J3 for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 19:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jan 2015 00:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19657 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19657-submit@debbugs.gnu.org id=B19657.1421974237622 (code B ref 19657); Fri, 23 Jan 2015 00:51:01 +0000 Original-Received: (at 19657) by debbugs.gnu.org; 23 Jan 2015 00:50:37 +0000 Original-Received: from localhost ([127.0.0.1]:53322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YESSJ-00009x-IR for submit@debbugs.gnu.org; Thu, 22 Jan 2015 19:50:36 -0500 Original-Received: from fencepost.gnu.org ([208.118.235.10]:41119 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YESSF-00009m-FF for 19657@debbugs.gnu.org; Thu, 22 Jan 2015 19:50:32 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YESSE-0002ww-Ae; Thu, 22 Jan 2015 19:50:30 -0500 X-Spook: Nazi propaganda mania NATO interception Blowpipe Glock X-Ran: VRmL=B5<_}>,% (Glenn Morris's message of "Thu, 22 Jan 2015 14:38:30 -0500") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98609 Archived-At: Glenn Morris wrote: > mkdir $HOME/foo > TMPDIR=$HOME/foo make package-test # fails I think this is due to with-package-test's manipulation of HOME in process-environment. The problem can be summarized as: (file-truename (abbreviate-file-name "/home/rgm/foo")) -> "/home/rgm/foo" (let ((process-environment (cons "HOME=/home/rgm/bar" process-environment))) (file-truename (abbreviate-file-name "/home/rgm/foo"))) -> "/home/rgm/bar/foo" Because abbreviated-home-dir is cached the first time it is used. And find-file-noselect does various cycles of abbreviate/expand/truename. So calling find-file-noselect after changing HOME will mess up for files under the new HOME. So basically if you want to change HOME, remember to reset abbreviated-home-dir as well, else get various odd problems. Yuck. Anyway, the following patch seems to fix this specific case. (Maybe abbreviated-home-dir should either be removed, or check that HOME hasn't changed since it was set.) *** a/test/automated/package-test.el --- b/test/automated/package-test.el *************** *** 91,96 **** --- 91,97 ---- `(let* ((package-test-user-dir (make-temp-file "pkg-test-user-dir-" t)) (process-environment (cons (format "HOME=%s" package-test-user-dir) process-environment)) + (abbreviated-home-dir) (package-user-dir package-test-user-dir) (package-archives `(("gnu" . ,package-test-data-dir))) (old-yes-no-defn (symbol-function 'yes-or-no-p)) *************** *** 340,346 **** (should (search-forward "simple-single is an installed package." nil t)) (should (search-forward (format "Status: Installed in `%s/' (unsigned)." ! (expand-file-name "simple-single-1.3" package-user-dir)) nil t)) (should (search-forward "Version: 1.3" nil t)) (should (search-forward "Summary: A single-file package with no dependencies" --- 341,348 ---- (should (search-forward "simple-single is an installed package." nil t)) (should (search-forward (format "Status: Installed in `%s/' (unsigned)." ! (abbreviate-file-name ! (expand-file-name "simple-single-1.3" package-user-dir))) nil t)) (should (search-forward "Version: 1.3" nil t)) (should (search-forward "Summary: A single-file package with no dependencies" *************** *** 410,416 **** (should (search-forward "signed-good is an installed package." nil t)) (should (search-forward (format "Status: Installed in `%s/'." ! (expand-file-name "signed-good-1.0" package-user-dir)) nil t)))))) --- 412,419 ---- (should (search-forward "signed-good is an installed package." nil t)) (should (search-forward (format "Status: Installed in `%s/'." ! (abbreviate-file-name ! (expand-file-name "signed-good-1.0" package-user-dir))) nil t))))))