qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Cc: Huacai Chen <chenhuacai@kernel.org>,
	Wainer dos Santos Moschetta <wainersm@redhat.com>,
	Cleber Rosa <crosa@redhat.com>
Subject: Re: [PATCH] tests/acceptance: Test PMON with Loongson-3A1000 CPU
Date: Tue, 12 Jan 2021 13:10:24 +0100	[thread overview]
Message-ID: <0cf6ab15-f976-39ad-ad9c-df48aaa8d1ec@amsat.org> (raw)
In-Reply-To: <20210112020708.62922-1-jiaxun.yang@flygoat.com>

Hi Jiaxun, Alex,

On 1/12/21 3:07 AM, Jiaxun Yang wrote:
> Test booting of PMON bootloader on loongson3-virt platform.
> 
> $ (venv) AVOCADO_ALLOW_UNTRUSTED_CODE=1 \
>     avocado --show=app,console \
>       run -t machine:loongson3-virt tests/acceptance
> Fetching asset from tests/acceptance/machine_mips_loongson3v.py:MipsLoongson3v.test_pmon_serial_console
> JOB ID     : 8e202b3727847c9104d0d3d6546ed225d35f6706
> JOB LOG    : /home/flygoat/avocado/job-results/job-2021-01-12T10.02-8e202b3/job.log
...
> console: This software may be redistributed under the BSD copyright.
> console: Copyright 2000-2002, Opsycon AB, Sweden.
> console: Copyright 2005, ICT CAS.
> console: CPU GODSON3 BogoMIPS: 1327
> PASS (3.89 s)
> RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
> JOB TIME   : 4.38 s
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>  MAINTAINERS                                 |  1 +
>  tests/acceptance/machine_mips_loongson3v.py | 39 +++++++++++++++++++++
>  2 files changed, 40 insertions(+)
>  create mode 100644 tests/acceptance/machine_mips_loongson3v.py
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 4be087b88e..f38882f997 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1164,6 +1164,7 @@ F: hw/intc/loongson_liointc.c
>  F: hw/mips/loongson3_bootp.c
>  F: hw/mips/loongson3_bootp.h
>  F: hw/mips/loongson3_virt.c
> +F: tests/acceptance/machine_mips_loongson3v.py
>  
>  Boston
>  M: Paul Burton <paulburton@kernel.org>
> diff --git a/tests/acceptance/machine_mips_loongson3v.py b/tests/acceptance/machine_mips_loongson3v.py
> new file mode 100644
> index 0000000000..17a85de69f
> --- /dev/null
> +++ b/tests/acceptance/machine_mips_loongson3v.py
> @@ -0,0 +1,39 @@
> +# Functional tests for the Generic Loongson-3 Platform.
> +#
> +# Copyright (c) 2020 Philippe Mathieu-Daudé <f4bug@amsat.org>

2021 Jiaxun Yang <jiaxun.yang@flygoat.com>? :D

> +#
> +# This work is licensed under the terms of the GNU GPL, version 2 or later.
> +# See the COPYING file in the top-level directory.
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +import os
> +import time
> +
> +from avocado import skipUnless
> +from avocado_qemu import Test
> +from avocado_qemu import wait_for_console_pattern
> +
> +class MipsLoongson3v(Test):
> +    @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code')

The source code is published [1], you provided reproducible
workflow [2] and a tag [3] with a public build artifacts [4],
so my understanding is this is "trustable" binary.

Alex, would it be OK to add this test without the UNTRUSTED tag
(amending the links in the commit description)?

[1] https://github.com/loongson-community/pmon/
[2]
https://github.com/loongson-community/pmon/blob/master/.github/workflows/compile.yml
[3] https://github.com/loongson-community/pmon/releases/tag/20210112
[4] https://github.com/loongson-community/pmon/actions/runs/479132723

> +    def test_pmon_serial_console(self):
> +        """
> +        :avocado: tags=arch:mips64el
> +        :avocado: tags=endian:little
> +        :avocado: tags=machine:loongson3-virt
> +        :avocado: tags=cpu:Loongson-3A1000
> +        :avocado: tags=device:liointc
> +        :avocado: tags=device:goldfish_rtc
> +        """
> +
> +        pmon_hash = '7c8b45dd81ccfc55ff28f5aa267a41c3'
> +        pmon_path = self.fetch_asset('https://github.com/loongson-community/pmon/'
> +                                    'releases/download/20210112/pmon-3avirt.bin',
> +                                     asset_hash=pmon_hash, algorithm='md5')
> +
> +        self.vm.set_console()
> +        self.vm.add_args('-bios', pmon_path)
> +        self.vm.launch()
> +        wait_for_console_pattern(self, 'PMON2000 MIPS Initializing. Standby...')
> +        wait_for_console_pattern(self, 'Copy PMON to execute location done.')
> +        wait_for_console_pattern(self, 'CPU GODSON3 BogoMIPS:')
> 



  reply	other threads:[~2021-01-12 12:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12  2:07 [PATCH] tests/acceptance: Test PMON with Loongson-3A1000 CPU Jiaxun Yang
2021-01-12 12:10 ` Philippe Mathieu-Daudé [this message]
2021-01-18 16:54   ` Alex Bennée
2021-01-19  5:57     ` Philippe Mathieu-Daudé
2021-01-19  6:59       ` Jiaxun Yang
2021-01-19  7:19         ` Philippe Mathieu-Daudé
2021-01-12 14:05 ` Wainer dos Santos Moschetta
2021-01-13 23:26   ` Philippe Mathieu-Daudé
  -- strict thread matches above, loose matches on Subject: below --
2020-12-16 18:17 Philippe Mathieu-Daudé
2020-12-17  0:08 ` Jiaxun Yang
2020-12-17  3:36 ` Jiaxun Yang
2020-12-18 15:21   ` Philippe Mathieu-Daudé
2020-12-18 15:27 ` Wainer dos Santos Moschetta
2020-12-18 20:51 ` Willian Rampazzo
2020-12-21 12:51   ` Huacai Chen
2020-12-21 15:34     ` Philippe Mathieu-Daudé
2020-12-22  0:40       ` Jiaxun Yang

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=0cf6ab15-f976-39ad-ad9c-df48aaa8d1ec@amsat.org \
    --to=f4bug@amsat.org \
    --cc=alex.bennee@linaro.org \
    --cc=chenhuacai@kernel.org \
    --cc=crosa@redhat.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).