Developing tests for the KVM autotest framework



Similar documents
RED HAT ENTERPRISE VIRTUALIZATION

RCL: Software Prototype

Real-Time KVM for the Masses Unrestricted Siemens AG All rights reserved

RCL: Design and Open Specification

Enterprise-Class Virtualization with Open Source Technologies

ovirt Introduction James Rankin Product Manager Red Hat Virtualization Management the ovirt way

Migration and Building of Data Centers in IBM SoftLayer with the RackWare Management Module

SPICE and desktop virtualization

The Virtualization Practice

KVM on S390x. Revolutionizing the Mainframe

Migration and Building of Data Centers in IBM SoftLayer with the RackWare Management Module

GitLab as an Alternative Development Platform for Github.com

ovirt self-hosted engine seamless deployment

Solution for private cloud computing

ovirt: Open Your Virtual Data Center

Introduction to Virtualization & KVM

Deployment of Private, Hybrid & Public Clouds with OpenNebula

Virtualization Management the ovirt way

CS312 Solutions #6. March 13, 2015

Linux/Open Source and Cloud computing Wim Coekaerts Senior Vice President, Linux and Virtualization Engineering

Satish Mohan. Head Engineering. AMD Developer Conference, Bangalore

High-Availability Using Open Source Software

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

PERFORMANCE ANALYSIS OF KERNEL-BASED VIRTUAL MACHINE

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

IBM Cloud Manager with OpenStack

2972 Linux Options and Best Practices for Scaleup Virtualization

Panoramica su Cloud Computing targata Red Hat AIPSI Meeting 2010

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

STeP-IN SUMMIT June 18 21, 2013 at Bangalore, INDIA. Performance Testing of an IAAS Cloud Software (A CloudStack Use Case)

Cloud Computing with Red Hat Solutions. Sivaram Shunmugam Red Hat Asia Pacific Pte Ltd.

Upgrade Guide. Product Version: Publication Date: 02/11/2015

Open Source Datacenter Conference 2011 System Management with RHN Satellite. Dirk Herrmann, Solution Architect, Red Hat

virtio-vsock Zero-configuration host/guest communication Stefan Hajnoczi KVM Forum 2015 KVM FORUM 2015 STEFAN HAJNOCZI

OGF25/EGEE User Forum Catania, Italy 2 March 2009

Using GitHub for Rally Apps (Mac Version)

Software configuration management

Options in Open Source Virtualization and Cloud Computing. Andrew Hadinyoto Republic Polytechnic

SUSE Linux uutuudet - kuulumiset SUSECon:sta

Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.

Zabbix for Hybrid Cloud Management

2) Xen Hypervisor 3) UEC

Red Hat enterprise virtualization 3.0 feature comparison

Security. Environments. Dave Shackleford. John Wiley &. Sons, Inc. s j}! '**»* t i j. l:i. in: i««;

Splunk for VMware Virtualization. Marco Bizzantino Vmug - 05/10/2011

OpenNebula Open Souce Solution for DC Virtualization

In order to upload a VM you need to have a VM image in one of the following formats:

CHOOSING THE RIGHT RED HAT ENTERPRISE LINUX SUBSCRIPTION. Gerry Riveros Senior Manager Server Solutions, Red Hat May 6, 2011

Continuous Integration. CSC 440: Software Engineering Slide #1

Stratusphere Solutions

RISC-V Software Ecosystem. Andrew Waterman UC Berkeley

<Insert Picture Here> Oracle Database Support for Server Virtualization Updated December 7, 2009

Introduction to ovirt

Intel Cloud Builder Guide: Cloud Design and Deployment on Intel Platforms

Platform as a Service and Container Clouds

KVM Security Comparison

Deploying Dell OpenManage Server Administrator on VMware ESXi Using Dell Online Depot and VMware Update Manager

Operating System Structures

RED HAT ENTERPRISE VIRTUALIZATION & CLOUD COMPUTING

Deploying Red Hat Enterprise Virtualization On Tintri VMstore Systems Best Practices Guide

APPLICATION OF SERVER VIRTUALIZATION IN PLATFORM TESTING

Operating Systems Virtualization mechanisms

OpenNebula Open Souce Solution for DC Virtualization

Cloud Operating Systems for Servers

KVM, OpenStack, and the Open Cloud

SUSE Manager. A Comprehensive Linux Server Management the Linux Way. Name. Title

ALERT installation setup

Example of Standard API

KVM, OpenStack, and the Open Cloud

EXPLORING LINUX KERNEL: THE EASY WAY!

OpenNebula Cloud Platform for Data Center Virtualization

Next Generation Now: Red Hat Enterprise Linux 6 Virtualization A Unique Cloud Approach. Jeff Ruby Channel Manager jruby@redhat.com

OPEN CLOUD INFRASTRUCTURE BUILT FOR THE ENTERPRISE

Mirantis

Mobile Cloud Computing T Open Source IaaS

Efficient Load Balancing using VM Migration by QEMU-KVM

GoAnywhere Director to GoAnywhere MFT Upgrade Guide. Version: Publication Date: 07/09/2015

IBM Cloud Manager with OpenStack. Administrator Guide, version 4.1

An Intro to OpenStack. Ian Lawson Senior Solution Architect, Red Hat

Symantec NetBackup 7.1 What s New and Version Comparison Matrix

Best Practices for Deploying and Managing Linux with Red Hat Network

Windows Server 2008 R2 Hyper V. Public FAQ

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

Virtualizare sub Linux: avantaje si pericole. Dragos Manac

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Cloud Computing for Control Systems CERN Openlab Summer Student Program 9/9/2011 ARSALAAN AHMED SHAIKH

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Server Virtualization and Consolidation

Source Control Guide: Git

Develop a process for applying updates to systems, including verifying properties of the update. Create File Systems

Virtualization Technologies

<Insert Picture Here> Private Cloud with Fusion Middleware

Using Git for Project Management with µvision

Transcription:

Lucas Meneghel Rodrigues lmr@redhat.com KVM Forum 2010 August 9, 2010

1 Automated testing Autotest The wonders of virtualization testing 2 How KVM autotest solves the original problem? Features Test structure 3 Anatomy of a KVM autotest subtest Getting started with the framework

Goals Describe how KVM autotest was created, what problems it tries to solve. Present the features provided by the test framework and API. Present how the tests are structured and how to run your first test sets. Develop a simple test, showing some of the high level utilities that KVM autotest provides to test writers.

Automated testing Autotest The wonders of virtualization testing Test automation Test automation consists in using software to control the execution of tests in another software, that otherwise would have to be executed manually. With automation we have: Reduced execution time Reproducible, reliable tests Consistent test schedule

Automated testing Autotest The wonders of virtualization testing Autotest in a nutshell Autotest (http://autotest.kernel.org/) is a set of libraries and programs used to automate regression and performance tests on the linux platform. Composed by: Client: Engine that executes tests in test machines Server: Copies client code to the test machines, triggers test execution, monitors machine/test status and brings back test results to the server machine Scheduler: Schedules test jobs according to user input, creating server processes for each job, and stores results on autotest s test database Frontends: Allows users to run jobs and visualize test results conveniently

Automated testing Autotest The wonders of virtualization testing Autotest in a nutshell Web Interface Command Line Interface Client Frontend MySQL DB Autoserv Autoserv Client Results MySQL DB Server Scheduler Autoserv Autoserv Autoserv Client Client Client Cluster Results Repository Analysis Backend Client Client

Automated testing Autotest The wonders of virtualization testing The wonders of virtualization testing Virtualization presents a range of technical challenges to be resolved when it comes to effective automated testing: Large test matrices - Hypervisors usually take a lot of parameters Image format type and disk controllers Number of CPUs Network cards Virtual machines can run a wide range of Operating systems, which need to be installed and controlled We need fine grained control for the userspace parts of the stack Test of different branches of the code base is required

Automated testing Autotest The wonders of virtualization testing KVM, meet autotest! A bit of history Developers started to work on a set of automated tests for KVM, a project known as KVM autotest For over a year, it was maintained as an autotest fork. During this period, different test architectures were tried until some agreement was reached on kvm runtest 2 Maintenance of forks is clearly not desirable, due to smaller mindshare. An upstream merge was necessary Merge happened and now the tests are maintained upstream, and several improvements and cleanups were made since them

Automated testing Autotest The wonders of virtualization testing KVM autotest today KVM autotest is the infrastructure used to develop functional and performance tests of KVM It is implemented as a client side test of autotest, (kvm) It is by far the most substantial and complex autotest test. A large number of libraries and infrastructure code was developed to solve the problems aforementioned Currently being used by: KVM developers at IBM and Red Hat Internal Red Hat test servers KVM QA team at Red Hat, IBM QA teams

How KVM autotest solves the original problem? Features Test structure KVM autotest: APIs and features How does KVM autotest solve some of the virtualization testing problems presented? Define large test matrices: A new config file format was developed, in order to easily define a large matrix by generating parameters based on a cartesian product of variants How to reuse processes between tests: An environment file is kept, with pickled instances of python objects, that allows processes to persist between tests How to get fine grained control over userspace processes: An expect-like library to control qemu processes, that also makes it possible for VM processes to persist between tests and even test jobs

How KVM autotest solves the original problem? Features Test structure KVM autotest: APIs and features Ability to build and install KVM from several methods (release tarballs, git, brew/koji rpms) Fully automated install of several breeds of Linux, and all supported versions of Windows (WinXP Win7) Serial output collection and login, so it s easier to capture guest kernel panics and other abnormalities Infrastructure to capture and do some level of core dump analysis on qemu segmentation faults Mechanism to run the latest qemu-kvm unittests Ways to install virtio drivers and run WHQL Microsoft certification suite

How KVM autotest solves the original problem? Features Test structure Main files inside the KVM test folder kvm.py: KVM test main entry point. It is a simple loader of the subtests kvm config.py: Parser of the configuration file format kvm preprocessing.py: Functions to modify the environment kvm subprocess.py: Expect like library kvm utils.py and kvm test utils.py: Utility functions kvm vm.py: The modeling of a KVM virtual machine. Implements its methods by spawning kvm subprocess instances of qemu

Anatomy of a KVM autotest subtest Getting started with the framework Anatomy of a KVM autotest subtest A KVM autotest test implementation boils down to implementing a python function using the test API to accomplish what you need to do, which is usually something along the lines: Get a living VM from the test environment Stablish remote sessions to the VMs Send commands to the remote sessions on the VMs, verify their return codes, capture their outputs Send commands to the qemu monitor, verify their return codes, capture their outputs Determine whether the test has passed or failed based on this info

Anatomy of a KVM autotest subtest Getting started with the framework Getting started with the framework: git clone git://github.com/ehabkost/autotest.git /path/to/autotest/client/tests/kvm/get started.py this script will give you some hints on getting a basic KVM autotest setup going. Follow the instructions

Anatomy of a KVM autotest subtest Getting started with the framework Steps to create a new test: Create a python file with your test name inside the subfolder tests. Ex: guest info.py Implement a function run test name. Ex: run guest info Add test parameters to tests base.cfg.sample, on the test parameters section, creating a variant with an arbitrary name and your test name as the test type Modify one of the test sets under tests.cfg in order to include your test there Run your test, and keep developing until you re satisfied

Anatomy of a KVM autotest subtest Getting started with the framework Steps to create a new test: Create a python file with your test name inside the subfolder tests. Ex: guest info.py Implement a function run test name. Ex: run guest info Add test parameters to tests base.cfg.sample, on the test parameters section, creating a variant with an arbitrary name and your test name as the test type Modify one of the test sets under tests.cfg in order to include your test there Run your test, and keep developing until you re satisfied Hands on time, boys and girls!

Anatomy of a KVM autotest subtest Getting started with the framework How to contribute git clone git://github.com/ehabkost/autotest.git /path/to/autotest/client/tests/kvm/get started.py Hack :) Send patches to autotest@test.kernel.org (post allowed only to subscribers)

Anatomy of a KVM autotest subtest Getting started with the framework Contact lmr@redhat.com and mgoldish@redhat.com http://www.linux-kvm.org/page/kvm-autotest KVM mailing list (kvm@vger.kernel.org), autotest mailing list (autotest@test.kernel.org)