diff mbox

[kvm-unit-tests,6/8] arm/arm64: Add support for migration tests

Message ID 20180207190334.16516-7-drjones@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Jones Feb. 7, 2018, 7:03 p.m. UTC
We only need to implement getchar() and pass the test command
line to run_migration when the unittests.cfg file tells us to.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 arm/run      | 2 +-
 lib/arm/io.c | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/arm/run b/arm/run
index fd280ee19837..1dd11b950447 100755
--- a/arm/run
+++ b/arm/run
@@ -57,6 +57,6 @@  fi
 M+=",accel=$ACCEL"
 command="$qemu -nodefaults $M -cpu $processor $chr_testdev $pci_testdev"
 command+=" -display none -serial stdio -kernel"
-command="$(timeout_cmd) $command"
+command="$(migration_cmd) $(timeout_cmd) $command"
 
 run_qemu $command "$@"
diff --git a/lib/arm/io.c b/lib/arm/io.c
index a111530f4802..f6b9a9012776 100644
--- a/lib/arm/io.c
+++ b/lib/arm/io.c
@@ -77,6 +77,11 @@  void puts(const char *s)
 	spin_unlock(&uart_lock);
 }
 
+int getchar(void)
+{
+	return readb(uart0_base);
+}
+
 void exit(int code)
 {
 	chr_testdev_exit(code);