Subject: bug#65026: 30.0.50; c-ts-mode-test-indentation-bsd fails

From: Yuan Fu <[email-masked]>
Date: Fri, 15 Sep 2023 15:57:04 -0700

> On Sep 15, 2023, at 10:42 AM, Michael Albinus <[email-masked]> wrote:
> 
> Yuan Fu <[email-masked]> writes:
> 
>> Hi Michael,
> 
> Hi Yuan,
> 
>> I fixed the tree-sitter test a while ago, but didn’t check EMBA. It
>> seems they are skipped right now? (Sorry for taking so long.)
> 
> They are skipped in all test jobs except job "test-tree-sitter" on the
> master branch. And that job is skipped, if the corresponding
> "build-image-tree-sitter" job didn't succeed.
> 
>> I’m also seeing the build-image-tree-sitter build failing [1]. But I
>> can’t tell what’s causing it. The pipeline was pushing something and
>> it timed out?
>> 
>> [1] https://emba.gnu.org/emacs/emacs/-/jobs/73909
> 
> There are problems with the gitlab docker registry these days, so not
> all jobs go through.
> 
> However, <https://emba.gnu.org/emacs/emacs/-/jobs/74104> has finished in
> time. And the test job, <https://emba.gnu.org/emacs/emacs/-/jobs/74107>,
> has failed:
> 
> --8<---------------cut here---------------start------------->8---
> Test treesit-defun-navigation-nested-3 backtrace:
>  signal(ert-test-failed (((should (equal (cons name (cdr record)) (co
>  ert-fail(((should (equal (cons name (cdr record)) (cons name poss)))
>  (if (unwind-protect (setq value-623 (apply fn-621 args-622)) (setq f
>  (let (form-description-625) (if (unwind-protect (setq value-623 (app
>  (let ((value-623 'ert-form-evaluation-aborted-624)) (let (form-descr
>  (let* ((fn-621 #'equal) (args-622 (condition-case err (let ((signal-
>  (while (and (consp --cl-var--) (progn (setq record (car --cl-var--))
>  (let* ((--cl-var-- decoded-master) (record nil) (--cl-var-- master) 
>  (let* ((opening (or opening "[")) (closing (or closing "]")) (marker
>  (progn (funcall init) (let* ((opening (or opening "[")) (closing (or
>  (unwind-protect (progn (funcall init) (let* ((opening (or opening "[
>  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
>  (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
>  treesit--ert-test-defun-navigation((closure (t) nil (treesit-parser-
>  (closure (t) nil (let* ((fn-636 #'treesit-language-available-p) (arg
>  ert--run-test-internal(#s(ert--test-execution-info :test ... :result
>  ert-run-test(#s(ert-test :name treesit-defun-navigation-nested-3 :do
>  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
>  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
>  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
>  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
>  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
>  command-line-1(("-L" ":." "-l" "ert" "-l" "src/treesit-tests.el" "--
>  command-line()
>  normal-top-level()
> Test treesit-defun-navigation-nested-3 condition:
>    (ert-test-failed
>     ((should (equal (cons name ...) (cons name poss))) :form
>      (equal ("marker 0" 18 71 17 31) ("marker 0" 18 71 nil 31)) :value
>      nil :explanation (list-elt 3 (different-types 17 nil))))
>   FAILED   6/25  treesit-defun-navigation-nested-3 (0.039924 sec) at src/treesit-tests.el:1109
> --8<---------------cut here---------------end--------------->8---
> 
> But this is another error. Do you want to trace it in this bug report,
> or shall I write a new one?

Thanks Michael. This test failure is cause by a (kind of) regression introduced by ec4d29c4494 on emacs-29. Only the latest tree-sitter-bash grammar will trigger the tree-sitter bug that activates the regression introduced in that commit, so the test passed locally on my machine.

I’ve pushed a fix for that regression a few days ago to emacs-29. Once emacs-29 is merged into master, the failure should go away. I’ll check the CI to see if that indeed happens.

Yuan