Re: [PATCH KVM-AUTOTEST] KVM test: generate netdev ids that newer qemu can consume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-06-22 at 12:29 +0300, Avi Kivity wrote:
> Newer qemu restricts identifiers to starting with a letter.

Applied, thanks Avi!

> Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
> ---
>  client/tests/kvm/kvm_utils.py |    6 ++++++
>  client/tests/kvm/kvm_vm.py    |    2 +-
>  2 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
> index 12508b6..0372565 100644
> --- a/client/tests/kvm/kvm_utils.py
> +++ b/client/tests/kvm/kvm_utils.py
> @@ -815,6 +815,12 @@ def generate_random_string(length):
>          length -= 1
>      return str
>  
> +def generate_random_id():
> +    """
> +    Return a random string suitable for use as a qemu id.
> +    """
> +    return "id" + generate_random_string(6)
> +
>  
>  def generate_tmp_file_name(file, ext=None, dir='/tmp/'):
>      """
> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
> index 0643bca..966fb3c 100755
> --- a/client/tests/kvm/kvm_vm.py
> +++ b/client/tests/kvm/kvm_vm.py
> @@ -119,7 +119,7 @@ class VM:
>          self.address_cache = address_cache
>          self.netdev_id = []
>          for nic in params.get("nics").split():
> -            self.netdev_id.append(kvm_utils.generate_random_string(4))
> +            self.netdev_id.append(kvm_utils.generate_random_id())
>  
>          # Find a unique identifier for this VM
>          while True:


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux