GNU bug report logs - #70195
30.0.50; vc-test-bzr02-state fails

Previous Next

Package: emacs;

Reported by: Michael Albinus <michael.albinus <at> gmx.de>

Date: Thu, 4 Apr 2024 13:34:03 UTC

Severity: minor

Tags: patch

Found in version 30.0.50

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70195 <at> debbugs.gnu.org
Subject: bug#70195: 30.0.50; vc-test-bzr02-state fails
Date: Sat, 1 Mar 2025 16:00:59 -0800
Michael Albinus <michael.albinus <at> gmx.de> writes:

> --8<---------------cut here---------------start------------->8---
> # make -C test vc-tests
> Ran 42 tests, 40 results as expected, 1 unexpected, 1 skipped (2025-03-01 10:15:59+0100, 18.968494 sec)
>
> 1 unexpected results:
>    FAILED  vc-test-bzr02-state
> --8<---------------cut here---------------end--------------->8---

Hmm, we have this comment in vc-bzr-tests.el:

  ;; Bzr wants to access HOME, e.g. to write ~/.bzr.log.
  ;; This is a problem on hydra, where HOME is non-existent.
  ;; You can disable logging with BZR_LOG=/dev/null, but then some
  ;; commands (eg `bzr status') want to access ~/.bazaar, and will
  ;; abort if they cannot.  I could not figure out how to stop bzr
  ;; doing that, so just give it a temporary homedir for the duration.
  ;; https://bugs.launchpad.net/bzr/+bug/137407 ?
  ;;
  ;; Note that with bzr 2.x, this works:
  ;; mkdir /tmp/bzr
  ;; HOME=/nonexistent BZR_HOME=/tmp/bzr bzr status
  ;; but with brz 3.1, it complains:
  ;; "failed to open trace file: [Errno 13] Permission denied: '/nonexistent'"
  ;; which confuses vc-dir.
  ;; We can quieten brz by adding either BRZ_LOG=/dev/null, or
  ;; XDG_CACHE_HOME=/tmp/bzr (log defaults to XDG_CACHE_HOME/breezy/brz.log),
  ;; but it seems simpler to just set HOME to a newly created
  ;; temporary directory.
  ;; TODO does this means tests should be setting XDG_ variables (not
  ;; just HOME) to temporary values too?

Maybe the below patch would fix it?

diff --git a/test/lisp/vc/vc-tests.el b/test/lisp/vc/vc-tests.el
index 62938c41227..1c17756ed31 100644
--- a/test/lisp/vc/vc-tests.el
+++ b/test/lisp/vc/vc-tests.el
@@ -324,8 +324,9 @@ vc-test--state
           (process-environment process-environment)
           vc-test--cleanup-hook)
       (when (eq backend 'Bzr)
-        (setq process-environment (cons (format "BZR_HOME=%s" tempdir)
-                                        process-environment)))
+        ;; See the comment in `vc-bzr-test-bug9726'.
+        (push (format "BZR_HOME=%s" tempdir) process-environment)
+        (push (format "HOME=%s" tempdir) process-environment ))
       (unwind-protect
           (progn
             ;; Cleanup.




This bug report was last modified 137 days ago.

Previous Next


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