From nobody Sun Feb 8 18:30:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1562700351; cv=none; d=zoho.com; s=zohoarc; b=eW0VmWO3bU1fDFZNp9ekjI8vBAVKwTrWGki0wxEgF7byHz4iClfC7Ha+DesNp0PT8l3YmeY2CUG4uqm0CpLqbzeAEpEWw/0UDz5K4BhB7i7HjPUFIGpynRI+09q5gye/JA6ITSiLQrxbc0ih2oGSqV0HrwT5PGT+UoiJjEMVFpE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562700351; h=Content-Type:Content-Transfer-Encoding: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:ARC-Authentication-Results; bh=rcHuqOH1/9BBLp1Wd6AiKf54rZgK1gtYYCi7p19wYIw=; b=WV/XjyxgK8Qo9tgxkmz737bR88YKDvipg7ckFeU/DiXMCpVv7Hrb7i4PcobIimHREpfACJuwKyVpc0YATlRImVQOgaWGOfMwkbqmTeZv51t/U9+QuSr6G5Ek9d52Pe/B+aulyPV77jO2IppYQeabcM8oGe7ByDNDIuuBtHdvF1k= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562700351677707.410826490885; Tue, 9 Jul 2019 12:25:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BBAE390C7A; Tue, 9 Jul 2019 19:25:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8AC945F7C0; Tue, 9 Jul 2019 19:25:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4825B1833002; Tue, 9 Jul 2019 19:25:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69JPlqK017290 for ; Tue, 9 Jul 2019 15:25:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id E1D4A871D2; Tue, 9 Jul 2019 19:25:47 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DBFC2871CE for ; Tue, 9 Jul 2019 19:25:45 +0000 (UTC) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54B9030C1E21 for ; Tue, 9 Jul 2019 19:25:29 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id 207so4224012wma.1 for ; Tue, 09 Jul 2019 12:25:29 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id b2sm27037295wrp.72.2019.07.09.12.25.26 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Jul 2019 12:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6ROpYBwjTKxGeCnj0Ja+PZIEQVwQ0dur700Keb/NyyY=; b=Ln3L9qxprFrhpJnyX8NuE3H3oYdZBNnshTp1HQ5xW6tY5E9+imwnfLvFw94L7yDBE4 DCDGGtKBcHjbB991Lybw7cfbLct1LDYK50OJxmcyYQdo8flQp7US0BMYzVikovoL/OII rn5w5lo9p3XAbxxKFQd6HNE+vlYiK3CIdPJAb4azznd7kFZKWLt8BCwphbG2JT/ObMnq wx8wtd+P8gi7CAvnPvg3RuaREZ5007miwKLXxFSAyF8syu756hzjuZVuR4Fa4MqlBpMx x92FuuckzAnevOEyjKn3QGYAjNMz1Aasj8MedlAo/MNq4G0GqafnNpsgPiRAHVWAmUlK CXsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6ROpYBwjTKxGeCnj0Ja+PZIEQVwQ0dur700Keb/NyyY=; b=U80sIa49owJho3m0D+xaOTV2EbgLYR14wBWTd0fQ7Lkpd/MNjJIUntrflDInKhaFYP 6X4g5Ysji3KghrInw2uxf+yHmXQfsDsmJ9bn4BL//VzNa7YGK85B/thm7XTS03+FYlgl JWigwDPA6qVhhPtO3D39SRynG9z2R3wMFJLjdq2Mf0Fyml++UYD0eBZVuIgSpvuvD5KB R+X3sYlZBYOd7CX6syihdk9VAdljBd1MY8SsRadBspT3s9Whq7QHS/O7KKC915LrgNa5 5EwogEOUwxDHNWvk3R7WrelYsp210y0XCSMgpbmUOsqHSoz7yof7zjLcHBWrCWVS7RlD h+ew== X-Gm-Message-State: APjAAAWrn6FwpHZUmeorFkZeCNKYwhKK0xJZdEQ7U2a+6BVrXzzX6Tab stbiQ1eROexFs0lDMLZjQzx+F2drhXM9cqJb X-Google-Smtp-Source: APXvYqyCucGzSBOdXECnx3Pba4X1oHYfn7sc2jMHX8pNnFFNMCVGX+EvrCWbS4yTc3xaSM3qKF4pDg== X-Received: by 2002:a1c:a8d7:: with SMTP id r206mr1183360wme.47.1562700327697; Tue, 09 Jul 2019 12:25:27 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 21:23:24 +0200 Message-Id: <20190709192324.12092-5-stamatis.iliass@gmail.com> In-Reply-To: <20190709192324.12092-1-stamatis.iliass@gmail.com> References: <20190709192324.12092-1-stamatis.iliass@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 09 Jul 2019 19:25:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 09 Jul 2019 19:25:29 +0000 (UTC) for IP:'209.85.128.66' DOMAIN:'mail-wm1-f66.google.com' HELO:'mail-wm1-f66.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.228 * (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, PDS_NO_HELO_DNS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS) 209.85.128.66 mail-wm1-f66.google.com 209.85.128.66 mail-wm1-f66.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/4] test_driver: implement virDomainFSTrim X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 09 Jul 2019 19:25:50 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- src/test/test_driver.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 097720bb0a..b491247e49 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3561,6 +3561,37 @@ testDomainFSThaw(virDomainPtr dom, } +static int +testDomainFSTrim(virDomainPtr dom, + const char *mountPoint, + unsigned long long minimum ATTRIBUTE_UNUSED, + unsigned int flags) +{ + virDomainObjPtr vm; + int ret =3D -1; + + virCheckFlags(0, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + return -1; + + if (virDomainObjCheckActive(vm) < 0) + goto cleanup; + + if (mountPoint && STRNEQ(mountPoint, "/") && STRNEQ(mountPoint, "/boot= ")) { + virReportError(VIR_ERR_OPERATION_INVALID, + _("mount point not found: %s"), + mountPoint); + goto cleanup; + } + + ret =3D 0; + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + static int testDomainGetAutostart(virDomainPtr domain, int *autostart) { @@ -7805,6 +7836,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainUndefineFlags =3D testDomainUndefineFlags, /* 0.9.4 */ .domainFSFreeze =3D testDomainFSFreeze, /* 5.6.0 */ .domainFSThaw =3D testDomainFSThaw, /* 5.6.0 */ + .domainFSTrim =3D testDomainFSTrim, /* 5.6.0 */ .domainGetAutostart =3D testDomainGetAutostart, /* 0.3.2 */ .domainSetAutostart =3D testDomainSetAutostart, /* 0.3.2 */ .domainGetDiskErrors =3D testDomainGetDiskErrors, /* 5.4.0 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list