]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/tcg: add simple record/replay smoke test for aarch64
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 18 Sep 2019 13:31:42 +0000 (14:31 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Thu, 26 Sep 2019 18:00:53 +0000 (19:00 +0100)
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 really 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>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Pavel Dovgalyuk <dovgaluk@ispras.ru>
tests/tcg/aarch64/Makefile.softmmu-target

index 4c4aaf61dd342fee6d1f09c8696d4efb0e75e1f7..b4b39579634ab822ba4ace157b5d9e791d57248e 100644 (file)
@@ -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