emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with s


From: Leo Butler
Subject: Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects
Date: Thu, 5 Jan 2023 20:08:56 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

On Mon, Jan 02 2023, Ihor Radchenko <yantar92@posteo.net> wrote:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Ihor Radchenko <yantar92@posteo.net> writes:
>>
>>>> There is a race condition between writing the contents of the graphics
>>>> file to disk and emacs checking the file size. My guess is that this is
>>>> causing the problem (and that the same failure applies for emacs-2{6,7},
>>>> since only the emacs-28 reports the exact test failure).
>>>
>>> Maybe we can just add several `sleep-for' calls to the test?
>>
>> I just did this. Let's see if CI errs again.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e5c45358a
>
> Apparently, `sleep-for' 1 second was not enough, and I decided to remove
> checking file size completely.

Hello Ihor,

Is there an environment variable that could be used to determine is the
tests are being run on sourcehut? This would let us cut out that test on
sourcehut, while still keeping it elsewhere.

>
> Upon doing this, another failure popped up. This time, it looks like an
> actual Elisp issue:
>
> https://builds.sr.ht/~bzg/job/914954
> 2 unexpected results:
>    FAILED  ob-octave/graphics-file  ((should-not (get-buffer "*Org-Babel
>    Error Output*")) :form (get-buffer "*Org-Babel Error Output*") :value
>    #<killed buffer>) 
>    FAILED  ob-octave/graphics-file-space  ((should-not (get-buffer
>    "*Org-Babel Error Output*")) :form (get-buffer "*Org-Babel Error
>    Output*") :value #<killed buffer>) 
>
> As you can see *Org-Babel Error Output* buffer does not exist when
> running the test.
>
> Leo, could you please take a look?

An earlier test is creating that *Org Babel Error Output* buffer. That
is killed on the first test, before the test is actually run. But
GET-BUFFER behaves in an undocumented way: it returns a non-nil value,
#<killed buffer>. To remedy that, I have wrapped the calls in
BUFFER-LIVE-P.

See the attached patch.

Leo

Attachment: 0001-test-ob-octave.el-wrap-get-buffer-in-buffer-live-p.patch
Description: 0001-test-ob-octave.el-wrap-get-buffer-in-buffer-live-p.patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]