qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Joel Stanley" <joel@jms.id.au>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Laurent Vivier" <lvivier@redhat.com>
Cc: Andrew Jeffery <andrew@aj.id.au>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v2 3/3] tests/qtest: Add test for Aspeed HACE
Date: Fri, 12 Mar 2021 06:53:33 +0100	[thread overview]
Message-ID: <ee8d96c5-fc66-79f5-7ac7-f3bb443eb724@redhat.com> (raw)
In-Reply-To: <20210311234726.437676-4-joel@jms.id.au>

On 12/03/2021 00.47, Joel Stanley wrote:
> This adds a test for the Aspeed Hash and Crypto (HACE) engine. It tests
> the currently implemented behavior of the hash functionality.
> 
> The tests are similar, but are cut/pasted instead of broken out into a
> common function so the assert machinery produces useful output when a
> test fails.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>   tests/qtest/aspeed_hace-test.c | 215 +++++++++++++++++++++++++++++++++
>   MAINTAINERS                    |   1 +
>   tests/qtest/meson.build        |   3 +
>   3 files changed, 219 insertions(+)
>   create mode 100644 tests/qtest/aspeed_hace-test.c
> 
> diff --git a/tests/qtest/aspeed_hace-test.c b/tests/qtest/aspeed_hace-test.c
> new file mode 100644
> index 000000000000..52501ee37afb
> --- /dev/null
> +++ b/tests/qtest/aspeed_hace-test.c
> @@ -0,0 +1,215 @@
> +/*
> + * QTest testcase for the ASPEED Hash and Crypto Engine
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + * Copyright 2021 IBM Corp.
> + */
> +
> +#include "qemu/osdep.h"
> +
> +#include "libqtest-single.h"

Bonus points for writing the test without "libqtest-single.h" and using only 
"libqtest.h" instead. We should try to avoid libqtest-single.h in new code 
since such code can not be shared with tests that run multiple instances of 
QEMU. But if it's too cumbersome, I do not insist.

> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index 2688e1bfad7f..2eec06b10094 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -156,12 +156,15 @@ qtests_npcm7xx = \
>      'npcm7xx_timer-test',
>      'npcm7xx_watchdog_timer-test'] + \
>      (slirp.found() ? ['npcm7xx_emc-test'] : [])
> +qtests_aspeed = \
> +  ['aspeed_hace-test']

Do you plan to add more aspeed tests later? If not, I think you could simply 
do it without this variable and use ['aspeed_hace-test'] below.

>   qtests_arm = \
>     (config_all_devices.has_key('CONFIG_MPS2') ? ['sse-timer-test'] : []) + \
>     (config_all_devices.has_key('CONFIG_CMSDK_APB_DUALTIMER') ? ['cmsdk-apb-dualtimer-test'] : []) + \
>     (config_all_devices.has_key('CONFIG_CMSDK_APB_TIMER') ? ['cmsdk-apb-timer-test'] : []) + \
>     (config_all_devices.has_key('CONFIG_CMSDK_APB_WATCHDOG') ? ['cmsdk-apb-watchdog-test'] : []) + \
>     (config_all_devices.has_key('CONFIG_PFLASH_CFI02') ? ['pflash-cfi02-test'] : []) +         \
> +  (config_all_devices.has_key('CONFIG_ASPEED_SOC') ? qtests_aspeed : []) + \
>     (config_all_devices.has_key('CONFIG_NPCM7XX') ? qtests_npcm7xx : []) + \
>     ['arm-cpu-features',
>      'microbit-test',
> 

  Thomas



  reply	other threads:[~2021-03-12  5:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 23:47 [PATCH v2 0/3] hw/misc: Model ASPEED hash and crpyto engine Joel Stanley
2021-03-11 23:47 ` [PATCH v2 1/3] hw: Model ASPEED's Hash and Crypto Engine Joel Stanley
2021-03-11 23:47 ` [PATCH v2 2/3] aspeed: Integrate HACE Joel Stanley
2021-03-11 23:47 ` [PATCH v2 3/3] tests/qtest: Add test for Aspeed HACE Joel Stanley
2021-03-12  5:53   ` Thomas Huth [this message]
2021-03-12  6:33     ` Joel Stanley

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=ee8d96c5-fc66-79f5-7ac7-f3bb443eb724@redhat.com \
    --to=thuth@redhat.com \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).