From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
keithp@keithp.com, qemu-arm@nongnu.org,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v3 6/6] tests/tcg: add user version of dumb-as-bricks semiconsole test
Date: Wed, 08 Jan 2020 19:55:58 +0000 [thread overview]
Message-ID: <87a76xk9ip.fsf@linaro.org> (raw)
In-Reply-To: <20200108150252.6216-7-alex.bennee@linaro.org>
Alex Bennée <alex.bennee@linaro.org> writes:
> There are linux-user users of semihosting so we'd better check things
> work for them as well.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> v3
> - include aarch64 version
> v4
> - use common semicall.h, test thumb & arm
> ---
> tests/tcg/arm/semiconsole.c | 27 +++++++++++++++++++++++++++
> tests/tcg/aarch64/Makefile.target | 7 +++++++
> tests/tcg/arm/Makefile.target | 19 +++++++++++++++++++
> 3 files changed, 53 insertions(+)
> create mode 100644 tests/tcg/arm/semiconsole.c
>
> diff --git a/tests/tcg/arm/semiconsole.c b/tests/tcg/arm/semiconsole.c
> new file mode 100644
> index 00000000000..6ef0bd24500
> --- /dev/null
> +++ b/tests/tcg/arm/semiconsole.c
> @@ -0,0 +1,27 @@
> +/*
> + * linux-user semihosting console
> + *
> + * Copyright (c) 2019
> + * Written by Alex Bennée <alex.bennee@linaro.org>
> + *
> + * SPDX-License-Identifier: GPL-3.0-or-later
> + */
> +
> +#include <stdio.h>
> +#include <stdint.h>
> +#include "semicall.h"
> +
> +int main(void)
> +{
> + char c;
> +
> + printf("Semihosting Console Test\n");
> + printf("hit X to exit:");
> +
> + do {
> + c = __semi_call(SYS_READC, 0);
> + printf("got '%c'\n", c);
> + } while (c != 'X');
> +
> + return 0;
> +}
> diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
> index 96d2321045a..4281c766419 100644
> --- a/tests/tcg/aarch64/Makefile.target
> +++ b/tests/tcg/aarch64/Makefile.target
> @@ -32,4 +32,11 @@ run-plugin-semihosting-with-%:
> $(call strip-plugin,$<) 2> $<.err, \
> "$< on $(TARGET_NAME) with $*")
>
> +AARCH64_TESTS += semiconsole
> +run-semiconsole: semiconsole
> + $(call skip-test, $<, "MANUAL ONLY")
> +
> +run-semiconsole-with-%:
this should be run-plugin-semiconsole-with-%
<snip>
> +run-semiconsole-with-%:
<snip>
> +run-semiconsole-arm-with-%:
ditto for these
--
Alex Bennée
next prev parent reply other threads:[~2020-01-08 19:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 15:02 [PATCH v3 0/6] semihosting read console support Alex Bennée
2020-01-08 15:02 ` [PATCH v3 1/6] target/arm: remove unused EXCP_SEMIHOST leg Alex Bennée
2020-01-08 15:02 ` [PATCH v3 2/6] target/arm: only update pc after semihosting completes Alex Bennée
2020-01-08 15:02 ` [PATCH v3 3/6] semihosting: add qemu_semihosting_console_inc for SYS_READC Alex Bennée
2020-01-08 15:02 ` [PATCH v3 4/6] tests/tcg: add a dumb-as-bricks semihosting console test Alex Bennée
2020-01-08 15:02 ` [PATCH v3 5/6] tests/tcg: extract __semi_call into a header and expand Alex Bennée
2020-01-08 20:48 ` Richard Henderson
2020-01-08 15:02 ` [PATCH v3 6/6] tests/tcg: add user version of dumb-as-bricks semiconsole test Alex Bennée
2020-01-08 19:55 ` Alex Bennée [this message]
2020-01-08 20:56 ` Richard Henderson
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=87a76xk9ip.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=keithp@keithp.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).