All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Yi Sun <yi.sun@intel.com>
Cc: kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH 2/2] x86: Create ISO images according to unittests.cfg
Date: Thu, 3 Jun 2021 20:06:07 -0700	[thread overview]
Message-ID: <30FA4AAE-DBC9-4DB7-8742-079F2B3067C3@gmail.com> (raw)
In-Reply-To: <20210604023453.905512-2-yi.sun@intel.com>



> On Jun 3, 2021, at 7:34 PM, Yi Sun <yi.sun@intel.com> wrote:
> 
> Create ISO image according to the configure file unittests.cfg,
> where describes the parameters of each test case.
> 

Looks cool!

> diff --git a/x86/create_iso.sh b/x86/create_iso.sh
> new file mode 100755
> index 0000000..8486be7
> --- /dev/null
> +++ b/x86/create_iso.sh
> @@ -0,0 +1,71 @@
> +#!/bin/bash
> +set -e
> +config_file=$1
> +
> +opts=
> +extra_params=
> +kernel=
> +smp=
> +testname=
> +
> +
> +grub_cfg() {
> +
> +	kernel_elf=$1
> +	kernel_para=$2
> +
> +	cat << EOF
> +set timeout=0
> +set default=0
> +
> +
> +menuentry "${kernel_elf}" {
> +    multiboot /boot/${kernel_elf} ${kernel_para}

Any chance you can add an optional “module” command here, that
would be configurable as a parameter to create_iso.sh?

I use such a command to provide parameters that kvm-unit-tests
usually gets from the “firmware" (and therefore are not available
in certain environments). 

The “module” can look something like:
	NR_CPUS=56
	MEMSIZE=4096
	TEST_DEVICE=0
	BOOTLOADER=1 

(kvm-unit-tests already knows to use these values)

This “module" would need to be copied into build/isofiles/boot as
well.


  reply	other threads:[~2021-06-04  3:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04  2:34 [kvm-unit-tests PATCH 1/2] x86: Build ISO images from x86/*.elf Yi Sun
2021-06-04  2:34 ` [kvm-unit-tests PATCH 2/2] x86: Create ISO images according to unittests.cfg Yi Sun
2021-06-04  3:06   ` Nadav Amit [this message]
2021-06-04 12:32     ` Sun, Yi
2021-06-04 17:08       ` Nadav Amit
2021-06-04 17:13         ` Sun, Yi

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=30FA4AAE-DBC9-4DB7-8742-079F2B3067C3@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=yi.sun@intel.com \
    /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.