From nobody Sat Feb 7 08:54:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1657812907; cv=none; d=zohomail.com; s=zohoarc; b=SIieIaDyngNMEJniiUiEG82csaqdufxgbfzl0mqgc5ovb3q7nrRvwBwYXm2dVayroBW+HjO1oOGuHUXVXVxGRiWxSXaovOrHL2z9JMCgGFuLEFay2DIzZHyq+bg+O7KBNY480L2mdiR7pM4afSqIcN73OhCw83qz77ChJM/ZUjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657812907; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BBbsctCcW2ZxGY4yuCbacu5XC54m7CLq7K0K8w3T9pI=; b=P7frrpHd8xt2tbx3L7RUL9vHTL64Lj6qulaXQMmARGAx2QL+zpb2qOjoY6mOFCteYumIqOPigZqhyr0ZXho8wJnZPqCT7QB7T8EmbH+nWcKf9f3RBD80uuPX90yEYw/ViJO0+L8y7+loR1PMyIWCy1IaO4vvta9WqtT6Zz5hVB0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1657812907942121.72806094202554; Thu, 14 Jul 2022 08:35:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-42-JaILXIHGPamOhY0TCMs0Iw-1; Thu, 14 Jul 2022 11:34:59 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5CCC885A58B; Thu, 14 Jul 2022 15:34:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48AFC40CF8EE; Thu, 14 Jul 2022 15:34:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 59FEF1947079; Thu, 14 Jul 2022 15:34:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A467B194706D for ; Thu, 14 Jul 2022 15:34:38 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6D9B440E80E5; Thu, 14 Jul 2022 15:34:38 +0000 (UTC) Received: from nautilus.home.lan (unknown [10.40.192.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCB8440E80E0; Thu, 14 Jul 2022 15:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657812906; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BBbsctCcW2ZxGY4yuCbacu5XC54m7CLq7K0K8w3T9pI=; b=BBqytBYRzyHoOMf47pymWxDepEab2VhSK96tnNKnhaqolbNez/PRgsUS/ZKMKonIGYP5LT Diw7Blqm7otINVQx2lM7etWAh71oy8Br1DY2FXwmeqHsurHoY2E/mScuZPL1S2BL+Zwt3d M4GFo6ycsZIHLdlW2wGQRYorETRZpUE= X-MC-Unique: JaILXIHGPamOhY0TCMs0Iw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 02/10] docs: Provide more information about the TCK test suite Date: Thu, 14 Jul 2022 17:34:27 +0200 Message-Id: <0be5de986a63ce8a6f829d0a429bd4fae07c048f.1657812867.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eskultet@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1657812909053100001 Most importantly, how to get it, how install dependencies and how to run it. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/testtck.rst | 99 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 88 insertions(+), 11 deletions(-) diff --git a/docs/testtck.rst b/docs/testtck.rst index 51de095657..6264b40de7 100644 --- a/docs/testtck.rst +++ b/docs/testtck.rst @@ -2,6 +2,8 @@ libvirt TCK : Technology Compatibility Kit =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 +.. contents:: + The libvirt TCK provides a framework for performing testing of the integra= tion between libvirt drivers, the underlying virt hypervisor technology, related operating system services and system configuration. The idea (and name) is @@ -23,15 +25,90 @@ determine the level of compatibility of their platform,= and evaluate whether it will meet their needs, and get awareness of any regressions that may have occurred since a previous test run. =20 -For more details you can look at: - -- The initial `mail from Daniel - Berrange `__ - presenting the project. -- The `page describing - VirtTCK `__ the inclus= ion of - libvirt-TCK as a Fedora Feature. - Libvirt-TCK is maintained using `a GIT -repository `__, and comment, patch= es and -reviews are carried on the `libvir-list `__ development list. +repository `__. GitLab is also the= place +where the whole TCK development workflow (issues, merge requests, comments) +happens. + +Using TCK +--------- + +TCK can be used independently of the enviroment, i.e. both on your local h= ost +or in a VM. We strongly recommend using a VM for the tests as TCK might af= fect +your current host setup, see `Running TCK`_. + +Installing dependencies +~~~~~~~~~~~~~~~~~~~~~~~ + +Since TCK is based on libvirt Perl bindings, you'll need to have the proper +version of the bindings installed for the version of libvirt you wish to t= est +in order to be able execute the TCK test suite successfully. Additionally,= a +number of Perl dependencies will need to be installed as well, some will be +available through the system package manager and some will likely need to = be +installed from CPAN (Perl's equivalent of Python's PyPI). Here's where +`libvirt-ci's `__ lcitool can h= elp +with preparing a test environment in a fresh VM, taking care of the +dependencies along the way: + +:: + + $ lcitool install --target fedora-36 tck-fedora36 --wait + +would get you a new Fedora 36 VM named ``tck-fedora36``. Then + +:: + + $ lcitool update tck-fedora36 libvirt,libvirt-perl,libvirt-tck+runtime + +will install all the necessary dependencies to build libvirt, the correspo= nding +Perl bindings and all TCK runtime dependencies to be able to execute the t= ests. +We also recommend executing TCK using the Avocado framework as the test ha= rness +engine which means that you'll have to install Avocado in the test environ= ment +as well. You can get it either from +`PyPI `__ (recommended), or if +you're on Fedora you can make use of the Avocado `module `__. +Using Avocado is not mandatory for the time being and you can skip it, but +in the future we plan on making the TCK internal coupling with Avocado tig= hter. + +Running TCK +~~~~~~~~~~~ + +Once you have all the dependencies installed, you can then proceed with ru= nning +as root the test suite as root (when running with Avocado): + +:: + + # avocado --config avocado.config run --tap - ./scripts/ + +from the TCK's git root. + + +If you don't want to install Avocado you can execute tests using the +``libvirt-tck`` binary directly (again, from the git root). You'll need to= pass +a few options that Avocado takes care of: + +:: + + # PERL5LIB=3D./lib perl bin/libvirt-tck -c --force ./= scripts + +Running with the ``--force`` argument is not necessary and you can safely = omit +it, but it becomes useful if you need to interrupt a test run for some +reason. In such case using ``--force`` ensures the first thing TCK does be= fore +running any tests is that it will clean up all resources from the previous= test +run which may have been left behind if you had interrupted the previous TC= K's +execution. + +Note that running with root privileges is necessary since some tests need +access to system resources or configs. This, along with the fact that some +tests might affect the host system are good reasons to consider using a te= st VM +as described above. + +Contributing a test +------------------- + +We'd appreciate if you provided a functional test case whenever you're add= ing a +new feature or fixing a bug in libvirt with the only complication being th= at +in case you're adding a new public API then a Perl binding will have to be +introduced first. After that, the best way to start is looking at some exi= sting +tests, copy-pasting one that fits your scenario the best and tweak the +remaining bits. --=20 2.36.1