Subject: bug#43314: closed (Re: bug#43314: vc-bzr-test-bug9726 test fails on master)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 12 Sep 2020 16:54:02 +0000

Your bug report

#43314: vc-bzr-test-bug9726 test fails on master

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
43314: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43314
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#43314: vc-bzr-test-bug9726 test fails on master
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Sat, 12 Sep 2020 12:53:46 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 27.2

commit 184a497 (HEAD, origin/emacs-27, emacs-27)
Date:   Sat Sep 12 09:51:32 2020 -0700

    Make vc-bzr tests work with brz 3.1 (bug#43314)
    
    * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726)
    (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads):
    Make them work with brz 3.1.

diff --git a/test/lisp/vc/vc-bzr-tests.el b/test/lisp/vc/vc-bzr-tests.el
index f738da7..b68a694 100644
--- a/test/lisp/vc/vc-bzr-tests.el
+++ b/test/lisp/vc/vc-bzr-tests.el
@@ -38,13 +38,26 @@
   ;; 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.
   ;; http://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?
   (let* ((homedir (make-temp-file "vc-bzr-test" t))
          (bzrdir (expand-file-name "bzr" homedir))
          (ignored-dir (progn
                         (make-directory bzrdir)
                         (expand-file-name "ignored-dir" bzrdir)))
          (default-directory (file-name-as-directory bzrdir))
-         (process-environment (cons (format "BZR_HOME=%s" homedir)
+         (process-environment (cons (format "HOME=%s" homedir)
                                     process-environment)))
     (unwind-protect
         (progn
@@ -81,7 +94,7 @@
                    (expand-file-name "subdir" bzrdir)))
          (file (expand-file-name "file" bzrdir))
          (default-directory (file-name-as-directory bzrdir))
-         (process-environment (cons (format "BZR_HOME=%s" homedir)
+         (process-environment (cons (format "HOME=%s" homedir)
                                     process-environment)))
     (unwind-protect
         (progn
@@ -119,7 +132,7 @@
                  (expand-file-name "foo.el" bzrdir)))
          (default-directory (file-name-as-directory bzrdir))
          (generated-autoload-file (expand-file-name "loaddefs.el" bzrdir))
-         (process-environment (cons (format "BZR_HOME=%s" homedir)
+         (process-environment (cons (format "HOME=%s" homedir)
                                     process-environment)))
     (unwind-protect
         (progn

Subject: vc-bzr-test-bug9726 test fails on master
From: Stefan Kangas <[email-masked]>
To: [email-masked]
Date: Thu, 10 Sep 2020 10:55:41 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

After installing bzr, I am seeing a failing test on current master:

Running 3 tests (2020-09-10 19:35:38+0200, selector `(not (or (tag
:expensive-test) (tag :unstable)))')
   passed  1/3  vc-bzr-test-bug9726 (1.965520 sec)
Test vc-bzr-test-bug9781 backtrace:
  signal(error ("When applying VC operations to multiple files, the...
  error("When applying VC operations to multiple files, the..." "/tmp/
  vc-dir-deduce-fileset(state-model-only-files)
  vc-deduce-fileset(nil t state-model-only-files)
  vc-next-action(nil)
  #f(compiled-function () #<bytecode -0xc5c612cb2d05650>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name vc-bzr-test-bug9781 :documentation "T
  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/vc/vc-bzr-tests" "--
  command-line()
  normal-top-level()
Test vc-bzr-test-bug9781 condition:
    (error "When applying VC operations to multiple files, the files
are required
to  be in similar VC states.
/tmp/vc-bzr-testNYcjpH/bzr/ed to open trace file: [Errno 13]
Permission denied: '/nonexistent' in state nil clashes with
/tmp/vc-bzr-testNYcjpH/bzr/file in state edited")
   FAILED  2/3  vc-bzr-test-bug9781 (1.704149 sec)
Falling back on "slow" status detection ((file-missing "Opening input
file" "No such file or directory"
"/tmp/vc-bzr-testSiTKvP/bzr/.bzr/checkout/dirstate"))
Error: (error "Failed (status 3): bzr status --no-classify loaddefs.el")
Warnings in `bzr' output: failed to open trace file: [Errno 13]
Permission denied: '/nonexistent'
brz: ERROR: invalid header line: b''

Error: (error "Failed (status 3): bzr status --no-classify loaddefs.el")
Warnings in `bzr' output: failed to open trace file: [Errno 13]
Permission denied: '/nonexistent'
brz: ERROR: invalid header line: b''

  INFO     Scraping files for loaddefs.el...
  INFO     Scraping files for loaddefs.el...done
   passed  3/3  vc-bzr-test-faulty-bzr-autoloads (1.247783 sec)

Ran 3 tests, 2 results as expected, 1 unexpected (2020-09-10
19:35:44+0200, 5.880488 sec)

1 unexpected results:
   FAILED  vc-bzr-test-bug9781

make[3]: *** [Makefile:183: lisp/vc/vc-bzr-tests.log] Error 1

In GNU Emacs 28.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version
3.24.22, cairo version 1.16.0)
 of 2020-09-10 built on joffe
Repository revision: be4c4a7389cf0a47bc2c3e2896d4d0e2f09daa16
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid

Configured using:
 'configure --enable-checking=yes --enable-check-lisp-object-type
 'CFLAGS=-O0 -g3'
 PKG_CONFIG_PATH=/home/skangas/usr/lib/pkgconfig:/home/skangas/usr/lib/pkgconfig:'

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