All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Pavel Dovgalyuk <dovgaluk@ispras.ru>
Cc: qemu-devel@nongnu.org, 'Peter Maydell' <peter.maydell@linaro.org>,
	"'open list\:ARM TCG CPUs'" <qemu-arm@nongnu.org>
Subject: Re: [PATCH] tests/tcg: add simple record/replay smoke test for aarch64
Date: Thu, 19 Sep 2019 11:07:55 +0100	[thread overview]
Message-ID: <87sgoszjic.fsf@linaro.org> (raw)
In-Reply-To: <001801d56ec7$d80940d0$881bc270$@ru>


Pavel Dovgalyuk <dovgaluk@ispras.ru> writes:

> Thanks!
>
> This seem to correctly run record and replay command lines.
> When I break the replay correctness, then the test reports a timeout error.
>
> However, we need some kind of a manual for tcg testing. I had to dig through makefile and configure
> scripts to undestand that testing needs the cross compilers to be installed.
> Then I installed a random cross compiler and everything worked
> normally.

I shall add a section to the testing.rst documentation.

>
> Pavel Dovgalyuk
>
>> -----Original Message-----
>> From: Alex Bennée [mailto:alex.bennee@linaro.org]
>> Sent: Wednesday, September 18, 2019 6:34 PM
>> To: qemu-devel@nongnu.org
>> Cc: Alex Bennée; Pavel Dovgalyuk; Peter Maydell; open list:ARM TCG CPUs
>> Subject: [PATCH] tests/tcg: add simple record/replay smoke test for aarch64
>>
>> This adds two new tests that re-use the memory test to check basic
>> record replay functionality is still working. We have to define our
>> own runners rather than using the default pattern as we want to change
>> the test name but re-use the memory binary.
>>
>> We declare the test binaries as PHONY as they don't rely exist.
>>
>> [AJB: A better test would output some sort of timer value or other
>> otherwise variable value so we could compare the record and replay
>> outputs and ensure they match]
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Cc: Pavel Dovgalyuk <dovgaluk@ispras.ru>
>> ---
>>  tests/tcg/aarch64/Makefile.softmmu-target | 21 +++++++++++++++++++++
>>  1 file changed, 21 insertions(+)
>>
>> diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-
>> target
>> index 4c4aaf61dd3..b4b39579634 100644
>> --- a/tests/tcg/aarch64/Makefile.softmmu-target
>> +++ b/tests/tcg/aarch64/Makefile.softmmu-target
>> @@ -32,3 +32,24 @@ memory: CFLAGS+=-DCHECK_UNALIGNED=1
>>
>>  # Running
>>  QEMU_OPTS+=-M virt -cpu max -display none -semihosting-config
>> enable=on,target=native,chardev=output -kernel
>> +
>> +# Simple Record/Replay Test
>> +.PHONY: memory-record
>> +run-memory-record: memory-record memory
>> +	$(call run-test, $<, \
>> +	  $(QEMU) -monitor none -display none \
>> +		  -chardev file$(COMMA)path=$<.out$(COMMA)id=output \
>> +		  -icount shift=5$(COMMA)rr=record$(COMMA)rrfile=record.bin \
>> +	   	  $(QEMU_OPTS) memory, \
>> +	  "$< on $(TARGET_NAME)")
>> +
>> +.PHONY: memory-replay
>> +run-memory-replay: memory-replay run-memory-record
>> +	$(call run-test, $<, \
>> +	  $(QEMU) -monitor none -display none \
>> +		  -chardev file$(COMMA)path=$<.out$(COMMA)id=output \
>> +		  -icount shift=5$(COMMA)rr=replay$(COMMA)rrfile=record.bin \
>> +	   	  $(QEMU_OPTS) memory, \
>> +	  "$< on $(TARGET_NAME)")
>> +
>> +TESTS+=memory-record memory-replay
>> --
>> 2.20.1


--
Alex Bennée

WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Pavel Dovgalyuk <dovgaluk@ispras.ru>
Cc: 'Peter Maydell' <peter.maydell@linaro.org>,
	"'open list:ARM TCG CPUs'" <qemu-arm@nongnu.org>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] tests/tcg: add simple record/replay smoke test for aarch64
Date: Thu, 19 Sep 2019 11:07:55 +0100	[thread overview]
Message-ID: <87sgoszjic.fsf@linaro.org> (raw)
In-Reply-To: <001801d56ec7$d80940d0$881bc270$@ru>


Pavel Dovgalyuk <dovgaluk@ispras.ru> writes:

> Thanks!
>
> This seem to correctly run record and replay command lines.
> When I break the replay correctness, then the test reports a timeout error.
>
> However, we need some kind of a manual for tcg testing. I had to dig through makefile and configure
> scripts to undestand that testing needs the cross compilers to be installed.
> Then I installed a random cross compiler and everything worked
> normally.

I shall add a section to the testing.rst documentation.

>
> Pavel Dovgalyuk
>
>> -----Original Message-----
>> From: Alex Bennée [mailto:alex.bennee@linaro.org]
>> Sent: Wednesday, September 18, 2019 6:34 PM
>> To: qemu-devel@nongnu.org
>> Cc: Alex Bennée; Pavel Dovgalyuk; Peter Maydell; open list:ARM TCG CPUs
>> Subject: [PATCH] tests/tcg: add simple record/replay smoke test for aarch64
>>
>> This adds two new tests that re-use the memory test to check basic
>> record replay functionality is still working. We have to define our
>> own runners rather than using the default pattern as we want to change
>> the test name but re-use the memory binary.
>>
>> We declare the test binaries as PHONY as they don't rely exist.
>>
>> [AJB: A better test would output some sort of timer value or other
>> otherwise variable value so we could compare the record and replay
>> outputs and ensure they match]
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Cc: Pavel Dovgalyuk <dovgaluk@ispras.ru>
>> ---
>>  tests/tcg/aarch64/Makefile.softmmu-target | 21 +++++++++++++++++++++
>>  1 file changed, 21 insertions(+)
>>
>> diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-
>> target
>> index 4c4aaf61dd3..b4b39579634 100644
>> --- a/tests/tcg/aarch64/Makefile.softmmu-target
>> +++ b/tests/tcg/aarch64/Makefile.softmmu-target
>> @@ -32,3 +32,24 @@ memory: CFLAGS+=-DCHECK_UNALIGNED=1
>>
>>  # Running
>>  QEMU_OPTS+=-M virt -cpu max -display none -semihosting-config
>> enable=on,target=native,chardev=output -kernel
>> +
>> +# Simple Record/Replay Test
>> +.PHONY: memory-record
>> +run-memory-record: memory-record memory
>> +	$(call run-test, $<, \
>> +	  $(QEMU) -monitor none -display none \
>> +		  -chardev file$(COMMA)path=$<.out$(COMMA)id=output \
>> +		  -icount shift=5$(COMMA)rr=record$(COMMA)rrfile=record.bin \
>> +	   	  $(QEMU_OPTS) memory, \
>> +	  "$< on $(TARGET_NAME)")
>> +
>> +.PHONY: memory-replay
>> +run-memory-replay: memory-replay run-memory-record
>> +	$(call run-test, $<, \
>> +	  $(QEMU) -monitor none -display none \
>> +		  -chardev file$(COMMA)path=$<.out$(COMMA)id=output \
>> +		  -icount shift=5$(COMMA)rr=replay$(COMMA)rrfile=record.bin \
>> +	   	  $(QEMU_OPTS) memory, \
>> +	  "$< on $(TARGET_NAME)")
>> +
>> +TESTS+=memory-record memory-replay
>> --
>> 2.20.1


--
Alex Bennée


  reply	other threads:[~2019-09-19 10:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18 15:33 [PATCH] tests/tcg: add simple record/replay smoke test for aarch64 Alex Bennée
2019-09-18 15:33 ` [Qemu-devel] " Alex Bennée
2019-09-18 16:58 ` [RFC PATCH] tests/tcg: add time counter to memory test (WIP, aarch64 only) Alex Bennée
2019-09-18 16:58   ` [Qemu-devel] " Alex Bennée
2019-09-19  8:54 ` [PATCH] tests/tcg: add simple record/replay smoke test for aarch64 Pavel Dovgalyuk
2019-09-19  8:54   ` [Qemu-devel] " Pavel Dovgalyuk
2019-09-19 10:07   ` Alex Bennée [this message]
2019-09-19 10:07     ` Alex Bennée

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=87sgoszjic.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=dovgaluk@ispras.ru \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.