From nobody Sun May 19 02:06:43 2024 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=1565107468; cv=none; d=zoho.com; s=zohoarc; b=Ld5UdAMJsuHoufzw8gABSFWtAkwBCCphd4N35mWYQLcUvd0WwsGGLegqMgZzChGwwqHfwW3Ed624X/QwLcQ11+DorVc7OnIqcJkgHkVeYXwYoIM2agR5bHU/1rWd9p5xOh/H4nZnOhXRRJbv/fVGvvCZnw39Fs6byh9DLlmSTzg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565107468; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=Zh0h9/IAiXw6SaqOytSUVS+hpqNU0/PFd78YuQ0Sp+M=; b=h8HSzSraY6YGzvZCWsUG9T3b17hYKW5VPrwkzEvtBQxO1GVzojWXqktwtmxBy/JjAn99VKWe/NmXaz1Ty3cC6SoEYgzFSrPFuex63ksjB7xF1YRwfDVYTZh+nXOStYGaBcVta92BkCyCNJOJrkhiEVl4yVjV52jCb4b6L3SRUs4= 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 1565107468211345.9722241262284; Tue, 6 Aug 2019 09:04:28 -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 EEB7376528; Tue, 6 Aug 2019 16:04:25 +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 0A18B60933; Tue, 6 Aug 2019 16:04:24 +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 BC2A94E589; Tue, 6 Aug 2019 16:04:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x76Fug1Z019491 for ; Tue, 6 Aug 2019 11:56:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 89D385C541; Tue, 6 Aug 2019 15:56:42 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83C2E5C3F8 for ; Tue, 6 Aug 2019 15:56:39 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.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 7F65E30C3A16 for ; Tue, 6 Aug 2019 15:56:38 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id 207so78744532wma.1 for ; Tue, 06 Aug 2019 08:56:38 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id y6sm118869851wmd.16.2019.08.06.08.56.27 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 06 Aug 2019 08:56: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:mime-version :content-transfer-encoding; bh=ORwSPDj56Fj8eVquNGn9qL3IEBca/3qsWrDs4wbqdMg=; b=CUI65XHJaebTgGMc1cHs9wJzKo+gb08aJsL8r69f+wDRBLqS0gzpuoVp5LwLwTS/Qi V0GfU5+11Q6tbSfQWUf16Tv8ewB8WBrDQHIM2uaQMO7+lDFDr3krpofhTdgNoXk40m5C /zDNBtYgwiGgOHnNj7vWTSbD5YnyecR66eTAgfbXM8NrosROVXhXTqna575o5awi6DzW sLtFAlZKHLSUdgYiQb05XDriH/AyOES1gPRTPeq5LWnq4fqe/o9BiJtgonjJM6yjHY6y 9A8eRHIlvDYU5AP/UHrUxz7O0DxL2vnWHkFiT2UWDBQJDxJ+ortIwQ/1Sr2MphuXPxQh t4Ng== 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:mime-version :content-transfer-encoding; bh=ORwSPDj56Fj8eVquNGn9qL3IEBca/3qsWrDs4wbqdMg=; b=a1T1yXLIwdTIQsEHZjzW8SCZ+UHopdXeN+o3R6Uf0FSBmNDxzaOtPMyKxIIBC17fHe Sn1TwMb9BoBFDoJakakhQJ1X6G0h69iCZ793AO/dwRvqp7P6VPgeBkVUuzrqyI8QwxQH +t3uyjSBH6YsqKNPNpX/Xiph3PeRn2TlGg4mPybEOat1rqo0dyE4beD0g3niDJPxrMoL vaf78HtDiQ6JFAn/hQ5ZoegGXRMUPdJKTpiudSSQV92/D0AE1BlOdH5SUyZ6PV18S2Qu WT2Ty3d15vR4QouXe4tNwaMP+NofpVno7BYU6PEW13bNVUyrViHgVNRFmP/FvbHJ2Nck zNPQ== X-Gm-Message-State: APjAAAU8Wf0ZtCqGiis0mAvZxjov2GOjki2kNv+js0L4qdmxLXHTXZpj XKNQpkhN/7fUNn2KM6DdOYGj/I7bZ7TLew== X-Google-Smtp-Source: APXvYqzaJ214/Dw4hQU546thyWRxLrrEmOQblpeof+xUzWH6wugW0eXrrEY1oNQkS9YJy7M6gBRcDw== X-Received: by 2002:a05:600c:212:: with SMTP id 18mr5325438wmi.88.1565106996676; Tue, 06 Aug 2019 08:56:36 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Tue, 6 Aug 2019 17:56:23 +0200 Message-Id: <20190806155623.6438-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.49]); Tue, 06 Aug 2019 15:56:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 06 Aug 2019 15:56:38 +0000 (UTC) for IP:'209.85.128.68' DOMAIN:'mail-wm1-f68.google.com' HELO:'mail-wm1-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.128.68 mail-wm1-f68.google.com 209.85.128.68 mail-wm1-f68.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] test_driver: implement virDomainReset 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.26]); Tue, 06 Aug 2019 16:04:27 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The qemu and vz implementations don't emit any signals when this API is called, so we can do the same here for now and succeed by doing nothing. Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- src/test/test_driver.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d9a7f815d5..6bca4e277f 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2004,6 +2004,28 @@ static int testDomainReboot(virDomainPtr domain, } +static int +testDomainReset(virDomainPtr dom, + 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; + + ret =3D 0; + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + static char * testDomainGetHostname(virDomainPtr domain, unsigned int flags) @@ -8878,6 +8900,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainShutdown =3D testDomainShutdown, /* 0.1.1 */ .domainShutdownFlags =3D testDomainShutdownFlags, /* 0.9.10 */ .domainReboot =3D testDomainReboot, /* 0.1.1 */ + .domainReset =3D testDomainReset, /* 5.7.0 */ .domainDestroy =3D testDomainDestroy, /* 0.1.1 */ .domainDestroyFlags =3D testDomainDestroyFlags, /* 4.2.0 */ .domainGetOSType =3D testDomainGetOSType, /* 0.1.9 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list