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

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

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

Stefan Kangas
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



Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Stefan Kangas <[hidden email]>
> Date: Thu, 10 Sep 2020 10:55:41 -0700
>
> 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/

Doesn't happen here.

Which version of bzr do you have installed?



Reply | Threaded
Open this post in threaded view
|

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

Stefan Kangas
Eli Zaretskii <[hidden email]> writes:

>> From: Stefan Kangas <[hidden email]>
>> Date: Thu, 10 Sep 2020 10:55:41 -0700
>>
>> 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/
>
> Doesn't happen here.
>
> Which version of bzr do you have installed?

$ bzr --version
Breezy (brz) 3.1.0
  Python interpreter: /usr/bin/python3 3.8.5
  Python standard library: /usr/lib/python3.8
  Platform: Linux-5.7.0-1-amd64-x86_64-with-glibc2.29
  breezy: /usr/lib/python3/dist-packages/breezy
  Breezy configuration: /home/skangas/.bazaar
  Breezy log file: /home/skangas/.cache/breezy/brz.log

Copyright 2005-2012 Canonical Ltd.
Copyright 2017-2020 Breezy developers



Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Stefan Kangas <[hidden email]>
> Date: Thu, 10 Sep 2020 11:58:18 -0700
> Cc: [hidden email]
>
> >> 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/
> >
> > Doesn't happen here.
> >
> > Which version of bzr do you have installed?
>
> $ bzr --version
> Breezy (brz) 3.1.0

This isn't bzr, that's brz, its evolving fork.  Maybe the test needs
to be adapted to brz?



Reply | Threaded
Open this post in threaded view
|

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

Stefan Kangas
Eli Zaretskii <[hidden email]> writes:

> This isn't bzr, that's brz, its evolving fork.  Maybe the test needs
> to be adapted to brz?

Looks like it.

It also seems like Bazaar has been replaced with Breezy in Debian
testing/bullseye:  https://packages.debian.org/bullseye/bzr

(I just ran "apt install bzr" and got Breezy.)



Reply | Threaded
Open this post in threaded view
|

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

Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Is there someone here who can tell me by phone what's happening with BZR
and BRZ?

--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
In reply to this post by Stefan Kangas
> From: Stefan Kangas <[hidden email]>
> Date: Thu, 10 Sep 2020 12:50:20 -0700
> Cc: [hidden email]
>
> Eli Zaretskii <[hidden email]> writes:
>
> > This isn't bzr, that's brz, its evolving fork.  Maybe the test needs
> > to be adapted to brz?
>
> Looks like it.
>
> It also seems like Bazaar has been replaced with Breezy in Debian
> testing/bullseye:  https://packages.debian.org/bullseye/bzr

Well, maybe you should then report this problem to Debian.



Reply | Threaded
Open this post in threaded view
|

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

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

> Well, maybe you should then report this problem to Debian.

Well, shouldn't Emacs also support brz?  

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



Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Lars Ingebrigtsen <[hidden email]>
> Cc: Stefan Kangas <[hidden email]>,  [hidden email]
> Date: Fri, 11 Sep 2020 11:39:53 +0200
>
> Eli Zaretskii <[hidden email]> writes:
>
> > Well, maybe you should then report this problem to Debian.
>
> Well, shouldn't Emacs also support brz?  

That's a separate issue.  The problem here was caused by brz
installing itself as bzr, but acting in (so it seems) an incompatible
ways.



Reply | Threaded
Open this post in threaded view
|

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

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

>> Well, shouldn't Emacs also support brz?  
>
> That's a separate issue.  The problem here was caused by brz
> installing itself as bzr, but acting in (so it seems) an incompatible
> ways.

I'm just saying: If brz is the modern version of bzr, then it doesn't
seem like very productive to complain to distributors that they're
packing it this way, and the will probably not stop doing so.

So a more productive way forward is to investigate whether brz is very
incompatible by looking at the failing tests and see whether it's just
some detail that can be easily fixed.

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



Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Lars Ingebrigtsen <[hidden email]>
> Cc: [hidden email],  [hidden email]
> Date: Fri, 11 Sep 2020 12:31:58 +0200
>
> Eli Zaretskii <[hidden email]> writes:
>
> >> Well, shouldn't Emacs also support brz?  
> >
> > That's a separate issue.  The problem here was caused by brz
> > installing itself as bzr, but acting in (so it seems) an incompatible
> > ways.
>
> I'm just saying

And I said "maybe", which means it was a suggestion.  So if people
disagree, there's no need to argue, just do what you think is best.

If we want to fix the test, then the first step would be to understand
what does brz do differently in this scenario.



Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
In reply to this post by Richard Stallman
> From: Richard Stallman <[hidden email]>
> Cc: [hidden email], [hidden email]
> Date: Fri, 11 Sep 2020 00:17:17 -0400
>
> Is there someone here who can tell me by phone what's happening with BZR
> and BRZ?

There isn't much to tell, at least IMO and AFAIK.

brz is Breezy, a dVCS that is a descendant of Bazaar.  Bazaar is no
longer being developed, and brz supports the Bazaar file formats and
network protocols, so it is a natural continuation of Bazaar.

The license of Breezy is GPL v2+.  Quoting from the end of
https://www.breezy-vcs.org/developers/:

  Copyright 2005-2011 Canonical Ltd. Copyright 2018 Breezy Developers

  Breezy is free software, and you may use, modify and redistribute
  both Breezy and this document under the terms of the GNU General
  Public License version 2 or later. See <http://www.gnu.org/licenses/>.



Reply | Threaded
Open this post in threaded view
|

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

Glenn Morris-3
In reply to this post by Stefan Kangas
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



Reply | Threaded
Open this post in threaded view
|

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

Stefan Kangas-2
Glenn Morris <[hidden email]> writes:

> 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)

Thanks, tested and the fix works here too.



Reply | Threaded
Open this post in threaded view
|

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

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

> Thanks, tested and the fix works here too.

Hm...  I'm still getting the following bug.  This is on Debian bullseye.

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-testpVtgrn/bzr/ed to open trace file: [Errno 13] Permission denied: '/nonexistent' in state nil clashes with /tmp/vc-bzr-testpVtgrn/bzr/file in state edited")
   FAILED  2/3  vc-bzr-test-bug9781 (0.697655 sec)
Falling back on "slow" status detection ((file-missing "Opening input file" "No such file or directory" "/tmp/vc-bzr-testKWpaNU/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''


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



Reply | Threaded
Open this post in threaded view
|

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

Stefan Kangas-2
Lars Ingebrigtsen <[hidden email]> writes:

> Hm...  I'm still getting the following bug.  This is on Debian bullseye.

Did you run the test on master or emacs-27?



Reply | Threaded
Open this post in threaded view
|

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

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

> Lars Ingebrigtsen <[hidden email]> writes:
>
>> Hm...  I'm still getting the following bug.  This is on Debian bullseye.
>
> Did you run the test on master or emacs-27?

On master.

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



Reply | Threaded
Open this post in threaded view
|

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

Stefan Kangas-2
Lars Ingebrigtsen <[hidden email]> writes:

>>> Hm...  I'm still getting the following bug.  This is on Debian bullseye.
>>
>> Did you run the test on master or emacs-27?
>
> On master.

Did you cherry-pick the relevant commit bf75c5c9732fc from emacs-27?



Reply | Threaded
Open this post in threaded view
|

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

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

> Did you cherry-pick the relevant commit bf75c5c9732fc from emacs-27?

Ah, no, I didn't notice that the fix went into emacs-27; sorry for the
confusion.

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