Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle via buildroot <buildroot@buildroot.org>
To: Julien Olivain <ju.o@free.fr>, buildroot@buildroot.org
Cc: "Vincent Stehlé" <vincent.stehle@laposte.net>
Subject: Re: [Buildroot] [PATCH 1/1] support/testing: test_xen: fix runtime test
Date: Wed, 4 Jun 2025 20:25:10 +0200	[thread overview]
Message-ID: <591f6fdf-1027-4668-8361-3d6ae2ab59b4@rnout.be> (raw)
In-Reply-To: <20250520174435.1385934-1-ju.o@free.fr>



On 20/05/2025 19:44, Julien Olivain wrote:
> The test_xen.py runtime test, introduced in [1] and improved in [2],
> is calling a "stty raw" command, just after the emulated machine
> login, to avoid double-cooking the consoles. This double-cooking
> prevents the test controller to correctly get the command error codes.
> 
> Buildroot commit [3] "support/testing: set date in emulated machine"
> introduced an invocation of the date command to set time on the
> emulated machine, just after the login. The returned error code is also
> checked. Since this commit [3], the test_xen runtime test is failing
> while attempting to set the date. This is because it is invoked before
> the test script executes this "stty raw" command.
> 
> The need of executing a command just after the login, and just
> before we set the emulated machine date is very limited. It is almost
> specific to this test. So, rather than changing the test
> infrastructure, this commit simply moves this "stty raw" invocation
> from the runtime test script to a custom /etc/profile.d/stty-raw.sh
> file on target rootfs overlay, to do this call just at the login.
> 
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/10000011350
> 
> [1] https://gitlab.com/buildroot.org/buildroot/-/commit/055f82ebbd07b582c992eed30ef5191f18873ba4
> [2] https://gitlab.com/buildroot.org/buildroot/-/commit/cd0ffd598cf94b9d15c489f2429602825a18753c
> [3] https://gitlab.com/buildroot.org/buildroot/-/commit/cf8641b73e7f1577637bfef0ece78dd519b25d19
> 
> Cc: Vincent Stehlé <vincent.stehle@laposte.net>
> Signed-off-by: Julien Olivain <ju.o@free.fr>

  Applied to 2025.02.x, thanks.

  Regards,
  Arnout

> ---
> Patch tested in:
> https://gitlab.com/jolivain/buildroot/-/jobs/10090263362
> ---
>   support/testing/tests/package/test_xen.py                  | 7 -------
>   .../package/test_xen/overlay/etc/profile.d/stty-raw.sh     | 3 +++
>   2 files changed, 3 insertions(+), 7 deletions(-)
>   create mode 100644 support/testing/tests/package/test_xen/overlay/etc/profile.d/stty-raw.sh
> 
> diff --git a/support/testing/tests/package/test_xen.py b/support/testing/tests/package/test_xen.py
> index f680187db0..e5eaf3c115 100644
> --- a/support/testing/tests/package/test_xen.py
> +++ b/support/testing/tests/package/test_xen.py
> @@ -73,10 +73,6 @@ class TestXen(infra.basetest.BRTest):
>           self.emulator.boot(arch="aarch64", options=qemu_opts)
>           self.emulator.login()
>   
> -        # Avoid double-cooking the terminal, otherwise the test infrastructure
> -        # would not be able to retrieve e.g. return codes properly.
> -        self.assertRunOk("stty raw")
> -
>           # Verify that we are indeed running under Xen.
>           self.assertRunOk("xl info")
>   
> @@ -92,9 +88,6 @@ class TestXen(infra.basetest.BRTest):
>           self.emulator.qemu.sendline("xl create -c /etc/xen/dom1.cfg")
>           self.emulator.login()
>   
> -        # Avoid double-cooking the terminal for dom1, too.
> -        self.assertRunOk("stty raw")
> -
>           # Check that we are not talking to dom0 anymore.
>           uuid = self.get_dom_uuid()
>           self.assertNotEqual(uuid, dom0_uuid, "Unexpected dom0 UUID")
> diff --git a/support/testing/tests/package/test_xen/overlay/etc/profile.d/stty-raw.sh b/support/testing/tests/package/test_xen/overlay/etc/profile.d/stty-raw.sh
> new file mode 100644
> index 0000000000..3502579d80
> --- /dev/null
> +++ b/support/testing/tests/package/test_xen/overlay/etc/profile.d/stty-raw.sh
> @@ -0,0 +1,3 @@
> +# Avoid double-cooking the terminal, otherwise the test infrastructure
> +# would not be able to retrieve return codes properly.
> +stty raw

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2025-06-04 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 17:44 [Buildroot] [PATCH 1/1] support/testing: test_xen: fix runtime test Julien Olivain
2025-05-20 21:40 ` Vincent Stehlé via buildroot
2025-05-21 17:41   ` Julien Olivain
2025-06-04 18:25 ` Arnout Vandecappelle via buildroot [this message]

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=591f6fdf-1027-4668-8361-3d6ae2ab59b4@rnout.be \
    --to=buildroot@buildroot.org \
    --cc=arnout@rnout.be \
    --cc=ju.o@free.fr \
    --cc=vincent.stehle@laposte.net \
    /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