On 2024-01-06, at 18:16:31 -0800, Xiyue Deng wrote:
Jeremy Sowden <[email protected]> writes:
On 2024-01-03, at 22:08:32 -0800, Xiyue Deng wrote:
Debian testing autoremoval watch <[email protected]> writes:
emacs-wgrep 3.0.0-1 is marked for autoremoval from testing on 2024-01-18 >> >
It is affected by these RC bugs:
1057559: emacs-wgrep: FTBFS: Error: error ("Test âwgrep-normalâ redefined")
https://bugs.debian.org/1057559
This mail is generated by:
https://salsa.debian.org/release-team/release-tools/-/blob/master/mailer/mail_autoremovals.pl
Autoremoval data is generated by:
https://salsa.debian.org/qa/udd/-/blob/master/udd/testing_autoremovals_gatherer.pl
FYI I have prepared a fix on mentors[1]. Comments and sponsors welcome! >>
[1] https://mentors.debian.net/package/emacs-wgrep/
I tried building the package with gbp-buildpackage in Sid and two of the tests failed. The same things happened when I manually ran:
fakeroot debian/rules binary
in a Sid chroot. It is the two BOM tests that fail. For example:
$ schroot -c sid -- emacs -batch -l wgrep.el -l wgrep-test-helper.el -l wgrep-test.el -eval '(ert-run-tests-batch-and-exit "wgrep-bom-with-unibyte")'
Loading /etc/emacs/site-start.d/00debian.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Running 1 tests (2024-01-06 19:35:50+0000, selector `"wgrep-bom-with-unibyte"')
Grep finished with matches found
Press C-x C-s when finished or C-c C-k to abort changes.
Writing 1 files, 0 files are left...
There is an unapplied change. (0 changed)
No buffer has been saved.
Test wgrep-bom-with-unibyte backtrace:
ert-fail(((should (equal "ABCD\nb\n" (wgrep-test-helper--get-content
(if (unwind-protect (setq value-75 (apply fn-73 args-74)) (setq form
(let (form-description-77) (if (unwind-protect (setq value-75 (apply
(let ((value-75 'ert-form-evaluation-aborted-76)) (let (form-descrip
(let* ((fn-73 #'equal) (args-74 (condition-case err (let ((signal-ho
(lambda (file) (wgrep-test-helper--grep (concat "grep -nH -e 'a' -A
funcall((lambda (file) (wgrep-test-helper--grep (concat "grep -nH -e
(unwind-protect (funcall body-fn file) (wgrep-test-helper--cleanup-f
(let ((file (concat (make-temp-name "test-data") ".txt"))) (cond ((s
(let ((default-directory (file-name-as-directory test-directory))) (
(let ((test-directory (expand-file-name "test-work" default-director
wgrep-test-helper-fixture(("a\nb\n" utf-8-with-signature) (lambda (f
(progn (wgrep-test-helper-fixture '("a\nb\n" utf-8-with-signature) #
(let ((wgrep-change-readonly-file nil) (wgrep-auto-save-buffer nil))
(lambda nil (let ((wgrep-change-readonly-file nil) (wgrep-auto-save-
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name wgrep-bom-with-unibyte :documentation
ert-run-or-rerun-test(#s(ert--stats :selector "wgrep-bom-with-unibyt
ert-run-tests("wgrep-bom-with-unibyte" #f(compiled-function (event-t
ert-run-tests-batch("wgrep-bom-with-unibyte")
ert-run-tests-batch-and-exit("wgrep-bom-with-unibyte")
command-line-1(("-l" "wgrep.el" "-l" "wgrep-test-helper.el" "-l" "wg
command-line()
normal-top-level()
Test wgrep-bom-with-unibyte condition:
(ert-test-failed
((should
(equal "ABCD\nb\n"
(wgrep-test-helper--get-contents file)))
:form
(equal "ABCD\nb\n" "a\nb\n")
:value nil :explanation
(arrays-of-different-length 7 4 "ABCD\nb\n" "a\nb\n" first-mismatch-at 0)))
FAILED 1/1 wgrep-bom-with-unibyte (0.743585 sec) at wgrep-test.el:77
Ran 1 tests, 0 results as expected, 1 unexpected (2024-01-06 19:35:51+0000, 0.908359 sec)
1 unexpected results:
FAILED wgrep-bom-with-unibyte
Changing the test to remove the BOM:
--- a/wgrep-test.el
+++ b/wgrep-test.el
@@ -77,7 +77,7 @@
(ert-deftest wgrep-bom-with-unibyte ()
:tags '(wgrep)
(wgrep-test-helper--default
- (wgrep-test-helper-fixture '("a\nb\n" utf-8-with-signature)
+ (wgrep-test-helper-fixture '("a\nb\n" utf-8)
(lambda (file)
(wgrep-test-helper--grep (concat "grep -nH -e 'a' -A 2 " file))
(wgrep-change-to-wgrep-mode)
causes it to pass.
I am trying to work out what's going wrong, but I suspect that your
Elisp skills (and familiarity with the package) are greater than mine
and you may get there faster. :)
Thanks for the report. However, I cannot reproduce this with my
sbuild or sid docker environment. Also as the test is about BOM I
don't think disabling BOM is the right solution.
Agreed. I was merely observing that the problem seemed directly related
to the presence of the BOM -- removing it caused the tests to pass.
Can you show me a bit more of your system and package info (with dependencies)?
The tests were failing when I ran either:
schroot -c sid -- fakeroot debian/rules clean binary
which runs in an up-to-date Unstable schroot LVM snapshot chroot, or:
gbp buildpackage --git-pbuilder
which runs in an up-to-date Unstable cowbuilder chroot. When I tried an Unstable sbuild chroot that I have on the same host, the tests passed.
They had also passed when I ran the tests in the host system, which is
running Testing. I created a fresh Unstable cowbuilder chroot, but
using that didn't help. Eventually, I tracked the problem down to
locale settings in the environment. In the schroot chroot, `LANG` is
not set; in the cowbuilder chroot it is set to `C`; whereas in the
sbuild chroot, which inherits it from my environment in the host system,
it is `en_GB.UTF-8`.
Compare:
$ schroot -c sid -- env LANG=C.UTF-8 emacs -batch -l wgrep.el \
> -l wgrep-test-helper.el -l wgrep-test.el \
> -eval '(ert-run-tests-batch-and-exit "wgrep-bom-with-unibyte")'
Loading /etc/emacs/site-start.d/00debian.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Running 1 tests (2024-01-07 14:07:46+0000, selector ‘"wgrep-bom-with-unibyte"’)
Grep finished with matches found
Press C-x C-s when finished or C-c C-k to abort changes.
Writing 1 files, 0 files are left...
Successfully finished. (1 changed)
Buffer has been saved.
passed 1/1 wgrep-bom-with-unibyte (0.911896 sec)
Ran 1 tests, 1 results as expected, 0 unexpected (2024-01-07 14:07:46+0000, 0.912041 sec)
and:
$ schroot -c sid -- env LANG=C emacs -batch -l wgrep.el \
> -l wgrep-test-helper.el -l wgrep-test.el \
> -eval '(ert-run-tests-batch-and-exit "wgrep-bom-with-unibyte")'
Loading /etc/emacs/site-start.d/00debian.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Running 1 tests (2024-01-07 14:10:21+0000, selector `"wgrep-bom-with-unibyte"')
Grep finished with matches found
Press C-x C-s when finished or C-c C-k to abort changes.
Writing 1 files, 0 files are left...
There is an unapplied change. (0 changed)
No buffer has been saved.
Test wgrep-bom-with-unibyte backtrace:
[...]
Test wgrep-bom-with-unibyte condition:
(ert-test-failed
((should
(equal "ABCD\nb\n"
(wgrep-test-helper--get-contents file)))
:form
(equal "ABCD\nb\n" "a\nb\n")
:value nil :explanation
(arrays-of-different-length 7 4 "ABCD\nb\n" "a\nb\n" first-mismatch-at 0)))
FAILED 1/1 wgrep-bom-with-unibyte (0.943495 sec) at wgrep-test.el:77
Ran 1 tests, 0 results as expected, 1 unexpected (2024-01-07 14:10:22+0000, 1.124888 sec)
1 unexpected results:
FAILED wgrep-bom-with-unibyte
Not sure what the moral of this tale is yet, but in any case, the
problem is unrelated to your packaging (and I see the same behaviour
using the .orig tar-ball).
J.
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEbB20U2PvQDe9VtUXKYasCr3xBA0FAmWawegACgkQKYasCr3x BA0XWw//T3Q7KVYeEE2PaHtU2Fc7ZsY57Sn3GiF0vfpAiniDGk4jjivfvnfjSQq/ 5aTZxRBTz7mbQSzNmKFmXoai2pUCvvJGIqMoBTEW+ugEjkPEhkg7TK7Tes7yRTiZ t9/wXI3W1C5QzA3vAe6vuqEP+7z3PqIC3d14f79sxsU+w5a1eE31TYAdpmFj2mQ0 4O4tylGzDQwqMrgJgZihFb73OIk7ToBaGSl+nUQFnuXmPXAr9N2mlrgdC3S4FWEL ITnjDrUODaVRwGAI6Ogob5NaKcEbqDH+Fxhs0fAkDCfL1lyFImCNNd88uayp2ytF /eD/bvlfj6OWjQVt/iArsguQ0IQmGrtNTer8fLbtcQVgx9hbpazkXJhz3uIlD7Ja XtWJnDsKDWaY40qcbAO3msgTWP2te6zRGJaNji/4S4pCHKgusRSuhl8b/I2y0fLp IT7/sewMVlH27vRz9UuQxCGCZxPSGxjA//EBij+MyhGs1wBhFL917JCpdRsrdD/O CKPFapLnJzLH3E9mUR6DD15lEqmC9U7x/quH9yfQCkaTcY5oxKQTKG4s/bm1jmuT +dWeOjmJ+cfZy6i0yHGNTXTOhJjpSRl1g2BR5WyAdukuvt1anhuVhB7s+b7ZC4XJ 4lBkV8ESLH8NkCS1x3USHbPUed4KYTXJ5kOF/xXCje91mlp732E=
=xnRB
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)