qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/avocado: Allow running user-mode tests
@ 2024-08-21 15:38 Philippe Mathieu-Daudé
  2024-08-22  7:21 ` Thomas Huth
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-21 15:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Beraldo Leal, Cleber Rosa, Thomas Huth

Commit 816d4201ea ("tests/avocado: Move LinuxTest related
code into a separate file") removed the Avocado 'process'
import which is used by the QemuUserTest class, restore it.

Fixes: 816d4201ea ("tests/avocado: Move LinuxTest ...")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Unfortunately the single linux-user test is not run on CI,
and I haven't ran it manually since too long...:
https://gitlab.com/qemu-project/qemu/-/issues/2525
---
 tests/avocado/avocado_qemu/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
index ef935614cf..0d57addfea 100644
--- a/tests/avocado/avocado_qemu/__init__.py
+++ b/tests/avocado/avocado_qemu/__init__.py
@@ -17,7 +17,7 @@
 import uuid
 
 import avocado
-from avocado.utils import ssh
+from avocado.utils import process, ssh
 from avocado.utils.path import find_command
 
 from qemu.machine import QEMUMachine
-- 
2.45.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests/avocado: Allow running user-mode tests
  2024-08-21 15:38 [PATCH] tests/avocado: Allow running user-mode tests Philippe Mathieu-Daudé
@ 2024-08-22  7:21 ` Thomas Huth
  2024-08-22  9:20   ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2024-08-22  7:21 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Wainer dos Santos Moschetta, Beraldo Leal, Cleber Rosa

On 21/08/2024 17.38, Philippe Mathieu-Daudé wrote:
> Commit 816d4201ea ("tests/avocado: Move LinuxTest related
> code into a separate file") removed the Avocado 'process'
> import which is used by the QemuUserTest class, restore it.
> 
> Fixes: 816d4201ea ("tests/avocado: Move LinuxTest ...")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Unfortunately the single linux-user test is not run on CI,
> and I haven't ran it manually since too long...:
> https://gitlab.com/qemu-project/qemu/-/issues/2525
> ---
>   tests/avocado/avocado_qemu/__init__.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
> index ef935614cf..0d57addfea 100644
> --- a/tests/avocado/avocado_qemu/__init__.py
> +++ b/tests/avocado/avocado_qemu/__init__.py
> @@ -17,7 +17,7 @@
>   import uuid
>   
>   import avocado
> -from avocado.utils import ssh
> +from avocado.utils import process, ssh
>   from avocado.utils.path import find_command

Reviewed-by: Thomas Huth <thuth@redhat.com>

... but is the test itself still working for you? When I run it, I get:

  ...
  (074/281) 
tests/avocado/linux_ssh_mips_malta.py:LinuxSSH.test_mips_malta64eb_kernel3_2_0: 
SKIP: Test might timeout
  (075/281) 
tests/avocado/linux_ssh_mips_malta.py:LinuxSSH.test_mips_malta64el_kernel3_2_0: 
SKIP: Test might timeout
  (076/281) tests/avocado/load_bflt.py:LoadBFLT.test_stm32: ERROR: Command 
'./qemu-arm  /bin/busybox ' failed.\nstdout: b''\nstderr: 
b''\nadditional_info: None (0.06 s)
Interrupting job (failfast).

Seem like self.workdir is not set here??

  Thomas



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests/avocado: Allow running user-mode tests
  2024-08-22  7:21 ` Thomas Huth
@ 2024-08-22  9:20   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-22  9:20 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel
  Cc: Wainer dos Santos Moschetta, Beraldo Leal, Cleber Rosa

On 22/8/24 09:21, Thomas Huth wrote:
> On 21/08/2024 17.38, Philippe Mathieu-Daudé wrote:
>> Commit 816d4201ea ("tests/avocado: Move LinuxTest related
>> code into a separate file") removed the Avocado 'process'
>> import which is used by the QemuUserTest class, restore it.
>>
>> Fixes: 816d4201ea ("tests/avocado: Move LinuxTest ...")
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> Unfortunately the single linux-user test is not run on CI,
>> and I haven't ran it manually since too long...:
>> https://gitlab.com/qemu-project/qemu/-/issues/2525
>> ---
>>   tests/avocado/avocado_qemu/__init__.py | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/avocado/avocado_qemu/__init__.py 
>> b/tests/avocado/avocado_qemu/__init__.py
>> index ef935614cf..0d57addfea 100644
>> --- a/tests/avocado/avocado_qemu/__init__.py
>> +++ b/tests/avocado/avocado_qemu/__init__.py
>> @@ -17,7 +17,7 @@
>>   import uuid
>>   import avocado
>> -from avocado.utils import ssh
>> +from avocado.utils import process, ssh
>>   from avocado.utils.path import find_command
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 
> ... but is the test itself still working for you? When I run it, I get:
> 
>   ...
>   (074/281) 
> tests/avocado/linux_ssh_mips_malta.py:LinuxSSH.test_mips_malta64eb_kernel3_2_0: SKIP: Test might timeout
>   (075/281) 
> tests/avocado/linux_ssh_mips_malta.py:LinuxSSH.test_mips_malta64el_kernel3_2_0: SKIP: Test might timeout
>   (076/281) tests/avocado/load_bflt.py:LoadBFLT.test_stm32: ERROR: 
> Command './qemu-arm  /bin/busybox ' failed.\nstdout: b''\nstderr: 
> b''\nadditional_info: None (0.06 s)
> Interrupting job (failfast).
> 
> Seem like self.workdir is not set here??

No clue why... This used to work.

Why self.workdir is indeed not set, this kludge makes it work:

---
diff --git a/tests/avocado/load_bflt.py b/tests/avocado/load_bflt.py
index bb50cec1ee..264489ee25 100644
--- a/tests/avocado/load_bflt.py
+++ b/tests/avocado/load_bflt.py
@@ -41,7 +41,7 @@ def test_stm32(self):
                        'Stm32_mini_rootfs.cpio.bz2')
          rootfs_hash = '9f065e6ba40cce7411ba757f924f30fcc57951e6'
          rootfs_path_bz2 = self.fetch_asset(rootfs_url, 
asset_hash=rootfs_hash)
-        busybox_path = os.path.join(self.workdir, "/bin/busybox")
+        busybox_path = os.path.join(self.workdir, "bin/busybox")

          self.extract_cpio(rootfs_path_bz2)

---

Fetching asset from tests/avocado/load_bflt.py:LoadBFLT.test_stm32
JOB ID     : 020d317281b042f46ad99013530d29df0f1d7eb7
JOB LOG    : tests/results/job-2024-08-22T10.17-020d317/job.log
  (1/1) tests/avocado/load_bflt.py:LoadBFLT.test_stm32: PASS (0.09 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | 
CANCEL 0
JOB TIME   : 0.62 s

So I'll add that and call it a day.

Thanks!


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-22  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-21 15:38 [PATCH] tests/avocado: Allow running user-mode tests Philippe Mathieu-Daudé
2024-08-22  7:21 ` Thomas Huth
2024-08-22  9:20   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).