From: Richard Henderson <richard.henderson@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
keithp@keithp.com, qemu-arm@nongnu.org
Subject: Re: [PATCH v3 6/6] tests/tcg: add user version of dumb-as-bricks semiconsole test
Date: Thu, 9 Jan 2020 07:56:10 +1100 [thread overview]
Message-ID: <6c53d17c-d8a6-b356-e481-b34e4fbbcae8@linaro.org> (raw)
In-Reply-To: <87a76xk9ip.fsf@linaro.org>
On 1/9/20 6:55 AM, Alex Bennée wrote:
>
> 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
With these,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
prev parent reply other threads:[~2020-01-08 20:57 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
2020-01-08 20:56 ` Richard Henderson [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=6c53d17c-d8a6-b356-e481-b34e4fbbcae8@linaro.org \
--to=richard.henderson@linaro.org \
--cc=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).