From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [PATCH kvm-unit-tests 14/15] README: reserve some environment variables Date: Fri, 13 Jan 2017 19:15:32 +0100 Message-ID: <20170113181533.15145-15-drjones@redhat.com> References: <20170113181533.15145-1-drjones@redhat.com> Cc: rkrcmar@redhat.com, pbonzini@redhat.com, lvivier@redhat.com, thuth@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60382 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbdAMSP6 (ORCPT ); Fri, 13 Jan 2017 13:15:58 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6886C67BC6 for ; Fri, 13 Jan 2017 18:15:59 +0000 (UTC) In-Reply-To: <20170113181533.15145-1-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Andrew Jones --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index b6f011d44568..49fbc9c50bce 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,30 @@ environment variable: QEMU=/tmp/qemu/x86_64-softmmu/qemu-system-x86_64 ./x86-run ./x86/msr.flat +# Unit test inputs + +Unit tests use QEMU's '-append ' parameter for command line +inputs, i.e. all args will be available as argv strings in main(). +Additionally a file of the form + +KEY=VAL +KEY2=VAL +... + +may be passed with '-initrd ' to become the unit test's environ, +which can then be accessed in the usual ways, e.g. VAL = getenv("KEY") +Any key=val strings can be passed, but some have reserved meanings in +the framework. The list of reserved environment variables is below + + QEMU_ACCEL ... either kvm or tcg + QEMU_VERSION_STRING ... string of the form `qemu -h | head -1` + KERNEL_VERSION_STRING ... string of the form `uname -r` + +Additionally these self-explanatory variables are reserved + + QEMU_MAJOR, QEMU_MINOR, QEMU_MICRO, KERNEL_VERSION, KERNEL_PATCHLEVEL, + KERNEL_SUBLEVEL, KERNEL_EXTRAVERSION + # Contributing ## Directory structure -- 2.9.3