From nobody Sun Feb 8 18:28:29 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=1564925319; cv=none; d=zoho.com; s=zohoarc; b=h0x0H9i/Qyndo47Yw9C00mbm9wI71622bDRN6QO+1FAfOy4g2LXxrpnlWcVFEY1JUO3njvnqGe/60e9EIgV/SAVDCZSktKEfqdlclLiaseywci7TLaCVF//V7rucY3zFGuExLpWkT+iw1fTK5v5QQNkbAE4yS5vLJG5k77o/nLA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564925319; 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=m94Q7e1/MfZJhuJhPpmmeNp2scFz0/iXO/sOYEDpfkg=; b=OtE7uog9XlCc0yNrz6uiUcEg7yvcroYhz/pUEQG8fGUce7o4fmvdIE+pqpiWzEGOrgNlMu6M+zepZKc0Fg3//dIwpnvIb+AvcTXtQVPgJ2ZDw4V5MCDqFJGD5ueVY0/Hg144jUYo84XtQiD71uVhZ93favNzaLOredziHpAz+ks= 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 15649253190681023.8699063656704; Sun, 4 Aug 2019 06:28:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A9C0A3EA7; Sun, 4 Aug 2019 13:28:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 73E1B60BFB; Sun, 4 Aug 2019 13:28:37 +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 40F503FA9A; Sun, 4 Aug 2019 13:28:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x74DSZdi014573 for ; Sun, 4 Aug 2019 09:28:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id E293960610; Sun, 4 Aug 2019 13:28:35 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC18060A9F for ; Sun, 4 Aug 2019 13:28:33 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) (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 7165381F2F for ; Sun, 4 Aug 2019 13:28:32 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id x4so28575864wrt.6 for ; Sun, 04 Aug 2019 06:28:32 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id 4sm187176532wro.78.2019.08.04.06.28.30 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 06:28:30 -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=f4kjaR3GBoLH2W7wZ6/WvAfdetXtzfdwcM7Y6ghj7Mw=; b=oB7IYqAs3CUAxVgCo2OV5S07jjoGsLM3gu6B42ttJ0vmBmiah1pP4ggf1Jn/2sG8xR wdMB+YPktWm4WO+He6A21BIFbVQbHEr/cd8XYQHlTFkbGp6vXQMq+vzhgAqAOnTGaKYg aqrT9e+lMtGERjNcfhEFJX8bu+q2BWe2+F/VdWeSDXwXTPRVWzSrepiqRE7dRJWp+kAc hAVKQ4JL2BUK3mQoRgjaHrvpjBO2mglyn/OHPYaRdW79llc/X2z8iqz7irSIaVsRorQS wISgXcBQQTIdjHO9pVgyqSJnVl+pHBCCuUA7spGrRrRF3Q1/bhlpoRhhQeJoLlPal3Y0 V/Yw== 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=f4kjaR3GBoLH2W7wZ6/WvAfdetXtzfdwcM7Y6ghj7Mw=; b=MRSIewN6eIDz/1/cRebAL+nCbwRlGegD16xcDgKZ3R6ypQI5ihNZQ7gM0kql0U3S+a ULm/4JD3VwwW2jyJvsIWOoIzCdvXslCbgQ9wAl4Zxj7wcaBfXz3iLnqNkAEePqZbKSqh kUyXj2MVwH4Idg+DVLUh74AeGM+BGPCyF3ggz5oBW3jyq2X1Dd7Ln5cwNtDXld+2HSqa wN2NyALG8Z8mI85japus1sDdzyxD1J62VMT5t74HF0G0F15qLC3H9ZMI9shOM3M+VQgR p3g8d0fL2iLRsnOnYauyovNLyXoBGg/0PtxXNycTR8DWyIUtEKfzzMc5Su4TqE68cV+g 6bzQ== X-Gm-Message-State: APjAAAUdX75fvq2jFgZD0z2z1Nv3K6oYV5IQh9CMFMcXXjGAATblwwCa w3w8DRYca/1956lxap2J+GXQcOciVUYK4A== X-Google-Smtp-Source: APXvYqxXaPx2uvPPvb9vKipM5DohTcIK8RWKNYdy8pxbP4W3d3TBS8Zw/knkg7Zrkozpgn5bEKQuJQ== X-Received: by 2002:a5d:4fc8:: with SMTP id h8mr41768667wrw.177.1564925310890; Sun, 04 Aug 2019 06:28:30 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Sun, 4 Aug 2019 15:27:18 +0200 Message-Id: <20190804132718.25166-5-stamatis.iliass@gmail.com> In-Reply-To: <20190804132718.25166-1-stamatis.iliass@gmail.com> References: <20190804132718.25166-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.27]); Sun, 04 Aug 2019 13:28:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sun, 04 Aug 2019 13:28:32 +0000 (UTC) for IP:'209.85.221.68' DOMAIN:'mail-wr1-f68.google.com' HELO:'mail-wr1-f68.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.221.68 mail-wr1-f68.google.com 209.85.221.68 mail-wr1-f68.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sun, 04 Aug 2019 13:28:38 +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 2a9041d777..cb373f61d3 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4177,6 +4177,37 @@ testDomainFSThaw(virDomainPtr dom, } =20 =20 +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) { @@ -8825,6 +8856,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainUndefineFlags =3D testDomainUndefineFlags, /* 0.9.4 */ .domainFSFreeze =3D testDomainFSFreeze, /* 5.7.0 */ .domainFSThaw =3D testDomainFSThaw, /* 5.7.0 */ + .domainFSTrim =3D testDomainFSTrim, /* 5.7.0 */ .domainGetAutostart =3D testDomainGetAutostart, /* 0.3.2 */ .domainSetAutostart =3D testDomainSetAutostart, /* 0.3.2 */ .domainGetDiskErrors =3D testDomainGetDiskErrors, /* 5.4.0 */ --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list