[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
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
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Ihor Radchenko, 2023/01/02
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects,
Leo Butler <=
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Ihor Radchenko, 2023/01/06
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Leo Butler, 2023/01/06
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Leo Butler, 2023/01/10
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Ihor Radchenko, 2023/01/11
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Leo Butler, 2023/01/11
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Ihor Radchenko, 2023/01/12
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Ihor Radchenko, 2023/01/13
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Leo Butler, 2023/01/14
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Ihor Radchenko, 2023/01/14
- Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects, Max Nikulin, 2023/01/14