Hi, I ended up here after realizing that a bunch of Emacs packages I use got removed from testing due to this bug.
Lucas Nussbaum (2022-09-18): > During a rebuild of all packages in sid, your package failed to build > on amd64. > > > Relevant part (hopefully): >> make[2]: Entering directory '/<<PKGBUILDDIR>>' >> Loading /<<PKGBUILDDIR>>/t/magit-tests.el (source)... >> Debugger entered--Lisp error: (error "Cannot find suitable directory for >> output in ‘nati...") >> error("Cannot find suitable directory for output in `nati...") >> comp-trampoline-compile(abort-recursive-edit) I can reproduce this with sbuild, but not with pbuilder. It seems to belong the same class of errors that was fixed in dh-elpa with https://salsa.debian.org/emacsen-team/dh-elpa/-/commit/d80ee7a8a159f20316640ec9e6a928e3c57d3f6e But magit's debian/rule has override_dh_elpa_test, so we don't benefit from the dh-elpa fix. The attached patch replicates the dh-elpa fix in t/magit-tests.el, which fixes the problem allows running the test suite. Unfortunately, 2/20 tests fail, so the attached patch won't fit the FTBFS (which is why I'm not tagging this "patch"): Loading /<<PKGBUILDDIR>>/t/magit-tests.el (source)... Cannot determine Magit’s version (error "/<<PKGBUILDDIR>>/lisp/magit.el" repo static elpa dirname hash) Running 20 tests (2022-11-22 08:13:25+0000, selector ‘t’) passed 1/20 magit--with-safe-default-directory (0.015131 sec) Keeping test directory: /tmp/magit-TDFbME/ Test magit-get backtrace: signal(magit-git-error ("clone of '/tmp/magit-TDFbME/remote' into su (condition-case err (let* ((vnew #'(lambda (&rest _))) (old (symbol- (let ((dir (file-name-as-directory (make-temp-file "magit-" t))) (pr (let ((lexical-binding nil)) (let ((dir (file-name-as-directory (mak (lambda nil (let ((lexical-binding nil)) (let ((dir (file-name-as-di ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name magit-get :documentation nil :body (l ert-run-or-rerun-test(#s(ert--stats :selector t :tests [... ... ... ert-run-tests(t #f(compiled-function (event-type &rest event-args) # ert-run-tests-batch(nil) ert-run-tests-batch-and-exit() (progn (load-file "t/magit-tests.el") (ert-run-tests-batch-and-exit) command-line-1(("-L" "./lisp" "-L" "/usr/share/emacs/site-lisp/elpa- command-line() normal-top-level() Test magit-get condition: (magit-git-error "clone of '/tmp/magit-TDFbME/remote' into submodule path '/tmp/magit-TDFbME/super/repo' failed (in /tmp/magit-TDFbME/super/)") FAILED 2/20 magit-get (0.708641 sec) passed 3/20 magit-get-boolean (0.199891 sec) passed 4/20 magit-get-{current|next}-tag (0.749619 sec) passed 5/20 magit-in-bare-repo (0.071072 sec) passed 6/20 magit-in-non-bare-repo (0.080570 sec) passed 7/20 magit-list-{|local-|remote-}branch-names (0.366282 sec) passed 8/20 magit-process:match-prompt-match-non-first-prompt (0.000091 sec) passed 9/20 magit-process:match-prompt-nil-when-no-match (0.000065 sec) passed 10/20 magit-process:match-prompt-non-nil-when-match (0.000061 sec) passed 11/20 magit-process:match-prompt-preserves-match-group (0.000111 sec) passed 12/20 magit-process:match-prompt-suffixes-prompt (0.000098 sec) passed 13/20 magit-process:password-prompt (0.000111 sec) passed 14/20 magit-process:password-prompt-observed (0.001084 sec) passed 15/20 magit-status:file-sections (0.868935 sec) passed 16/20 magit-status:log-sections (0.907880 sec) passed 17/20 magit-toplevel:basic (0.245211 sec) Keeping test directory: /tmp/magit-6jLVvi/ Test magit-toplevel:submodule backtrace: signal(magit-git-error ("clone of '/tmp/magit-6jLVvi/remote' into su (condition-case err (let* ((vnew #'(lambda (&rest _))) (old (symbol- (let ((dir (file-name-as-directory (make-temp-file "magit-" t))) (pr (let ((find-file-visit-truename nil)) (let ((dir (file-name-as-direc (let ((lexical-binding nil)) (let ((find-file-visit-truename nil)) ( (lambda nil (let ((lexical-binding nil)) (let ((find-file-visit-true ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name magit-toplevel:submodule :documentati ert-run-or-rerun-test(#s(ert--stats :selector t :tests ... :test-map ert-run-tests(t #f(compiled-function (event-type &rest event-args) # ert-run-tests-batch(nil) ert-run-tests-batch-and-exit() (progn (load-file "t/magit-tests.el") (ert-run-tests-batch-and-exit) command-line-1(("-L" "./lisp" "-L" "/usr/share/emacs/site-lisp/elpa- command-line() normal-top-level() Test magit-toplevel:submodule condition: (magit-git-error "clone of '/tmp/magit-6jLVvi/remote' into submodule path '/tmp/magit-6jLVvi/super/repo' failed (in /tmp/magit-6jLVvi/super/)") FAILED 18/20 magit-toplevel:submodule (0.249347 sec) passed 19/20 magit-toplevel:tramp (1.286620 sec) passed 20/20 magit-utils:add-face-text-property (0.000050 sec) Ran 20 tests, 18 results as expected, 2 unexpected (2022-11-22 08:13:31+0000, 6.072702 sec) 2 unexpected results: FAILED magit-get FAILED magit-toplevel:submodule I feel I'm out of my depth to investigate this further. Cheers, -- intrigeri
--- a/t/magit-tests.el +++ b/t/magit-tests.el @@ -6,6 +6,8 @@ ;;; Code: +(setq native-comp-deferred-compilation nil comp-enable-subr-trampolines nil) + (require 'cl-lib) (require 'dash) (require 'ert)