Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: buildroot@buildroot.org
Cc: Julien Olivain <ju.o@free.fr>
Subject: Re: [Buildroot] [PATCH] support/runtime-test: fix weston test
Date: Sat, 30 Sep 2023 11:00:51 +0200	[thread overview]
Message-ID: <20230930090051.GA2579@scaer> (raw)
In-Reply-To: <20230926154703.160448-1-yann.morin.1998@free.fr>

All,

On 2023-09-26 17:47 +0200, Yann E. MORIN spake thusly:
> The weston runtime test uses the CRC of the framebuffer to detect that
> "something" is being drawned on the framebuffer. This requires that the
> sampling of the CRC happens does not happen too early after trigerring
> an action, or the rendering may be not be finishe, either:
> 
>   - weston may not have had time to initialise, or
>   - the test application may not have started rednering,
> 
> The sequence of rendering that has been observed yields this sequence of
> CRCs (elided for brevity):
> 
>   - boot:
>     - alternating between 0x4c4126bf and 0x5d2f9aa5: console cursor
>       blinking
> 
>   - start weston:
>     - 0x4c4126bf: weston switches to an clearted vt)
>       ...
>     - 0xe54b7895: weston is starting
>       ...
>     - 0xe54b7895: wayland socket appears!
>       ...
>     - 0x6bf28bdf: weston is ready
>       ...
> 
>   - start weston-simple-egl:
>     - 0x6bf28bdf: application is starting
>       ...
>     - 0xNNNNNNNN: random CRCs while the application renders
>       ...
> 
>   - stop weston-simple-egl:
>     - 0xNNNNNNNN: izero, one, or two random CRCs while the application
>         renders before it handles SIGTERM
>     - 0x6bf28bdf: application is stopped
>       ...
> 
>   - stop weston:
>     - 0x6bf28bdf: a few CRC identical to when weston was started, while
>         weston is processing SIGTERM
>     - ocillating between 0x4c4126bf and 0x5d2f9aa5: console cursor
>         blinking, back to initial vt, weston dead.
> 
> So, we need to wait "enough" after each action. Moreover, when the
> wayland socket appears, weston may not have stabilised yet, so we also
> need to wait after the socket appears.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Julien Olivain <ju.o@free.fr>

Applied to master after fixing the typoes, thanks.

Regards,
Yann E. MORIN.

> ---
>  support/testing/tests/package/test_weston.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/support/testing/tests/package/test_weston.py b/support/testing/tests/package/test_weston.py
> index 276788c649..df1b7a4135 100644
> --- a/support/testing/tests/package/test_weston.py
> +++ b/support/testing/tests/package/test_weston.py
> @@ -78,6 +78,7 @@ class TestWeston(infra.basetest.BRTest):
>          wayland_socket = "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}"
>          cmd = f"while [ ! -e \"{wayland_socket}\" ] ; do sleep 1 ; done"
>          self.assertRunOk(cmd, timeout=10)
> +        time.sleep(4)
>  
>      def stop_weston(self):
>          cmd = "killall weston && sleep 3"
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-09-30  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 15:47 [Buildroot] [PATCH] support/runtime-test: fix weston test Yann E. MORIN
2023-09-30  9:00 ` Yann E. MORIN [this message]
2023-10-06 20:09 ` Julien Olivain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230930090051.GA2579@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox