From patchwork Wed Feb 7 19:03:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 10205871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B6AA96056E for ; Wed, 7 Feb 2018 19:04:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A84AF290BB for ; Wed, 7 Feb 2018 19:04:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CC7A290C2; Wed, 7 Feb 2018 19:04:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57486290BB for ; Wed, 7 Feb 2018 19:04:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754421AbeBGTEF (ORCPT ); Wed, 7 Feb 2018 14:04:05 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:45530 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754469AbeBGTDm (ORCPT ); Wed, 7 Feb 2018 14:03:42 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 419384075171 for ; Wed, 7 Feb 2018 19:03:42 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.43.2.160]) by smtp.corp.redhat.com (Postfix) with ESMTP id 850592024CA5; Wed, 7 Feb 2018 19:03:41 +0000 (UTC) From: Andrew Jones To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, rkrcmar@redhat.com Subject: [PATCH kvm-unit-tests 6/8] arm/arm64: Add support for migration tests Date: Wed, 7 Feb 2018 20:03:32 +0100 Message-Id: <20180207190334.16516-7-drjones@redhat.com> In-Reply-To: <20180207190334.16516-1-drjones@redhat.com> References: <20180207190334.16516-1-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 07 Feb 2018 19:03:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 07 Feb 2018 19:03:42 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'drjones@redhat.com' RCPT:'' Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- arm/run | 2 +- lib/arm/io.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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);