From nobody Fri Apr 26 03:34:31 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=1562688884; cv=none; d=zoho.com; s=zohoarc; b=QgX0dYuhUVxfDNoC0uI/INWq59DdyVION+HUC3idh/TzbJi0QAJD5SEVCfjRk7zGx9DOC8obFoqqc7gSeIU00MfkZo8teo0prgHbw1IamRU925VkNpXelIuwABSNv5XqREmQ8Hze21SHXXTaCzDGq6VcvIAs5xqyk9hG1/lHZJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562688884; 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=Q4dc/95zRNkUfB7Geezn0zIuV/m4MrznJnRHvTU6VS4=; b=JGGwVVxe5l+e25NcQHWQhxoZtOvTPbC4z9eT5VUIm3oDa4SxGIbq2EPwMJc5fE4Fn/bQI2str02F/o7EspqnswyJCOwDctTo5byhzaE8+89/aVBZL5bYq6JhTHFx2XWy0G1a7oUIAMBVB80RTMZuYTZB/ZkgViS/hq9trK4MLvc= 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 1562688884664711.5669414619985; Tue, 9 Jul 2019 09:14:44 -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 B866630ADC8A; Tue, 9 Jul 2019 16:14:26 +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 9862B5FCA2; Tue, 9 Jul 2019 16:14:18 +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 03F8D41F53; Tue, 9 Jul 2019 16:14:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69GE9ql012663 for ; Tue, 9 Jul 2019 12:14:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1EEF54EE0F; Tue, 9 Jul 2019 16:14:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 18B9B466A9 for ; Tue, 9 Jul 2019 16:14:06 +0000 (UTC) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.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 606CF308622B for ; Tue, 9 Jul 2019 16:13:55 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id y4so13089724wrm.2 for ; Tue, 09 Jul 2019 09:13:55 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id 2sm26505191wrn.29.2019.07.09.09.13.52 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Jul 2019 09:13:52 -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=3IcBTZ08nyM9TTp1BiWrf8F6505VMR7jlMOd/J0f43c=; b=nzcUUL2STPeNYX4mYViAU/9PKmS37fWYMAtWg3e9OHEiZjdNTUCbeAxvzy/l+3tBlV i4Vy7HQSpx4sX+I9zGm8iuS3/kJshSszKABegkC7nJj6YZOIbkFvKhAMzxQfGhOEX0dD PQXv6bGNVfHoqXjwOq9zylt3RktkvkaTwdYlrfOySvUdC8EXrPJq67uHXZ3TJDxrSG4j wClm3QAr2iMJWL/QyO/by//M4RA+lrrmlWM7Dhky/KumuxGK/ooi9SJJJqcREgfZ6eWg tjsq/2iwXV1m3noOIOoGQ2wMfUz94rYgnbwO0TKqj0J8pGsI1smOuGI0GVswjwa7ROWc TIfQ== 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=3IcBTZ08nyM9TTp1BiWrf8F6505VMR7jlMOd/J0f43c=; b=dBHinFbnXiB8anTg2GyT/RNKEfav3uztW4cDmnP+09q7DRKoTtIMmZ6YevGEW+XQQx 8MZIBlaMf60qjmPFOACJNCHd5SD1LzTRricEPCGQmQCExcAm+00sRrSSTOx+X5pv3Tbq Wda7pIFgwi3y0/EA0S98hpUZZZI9dMThHthrVupcgVDc0bmMWgxRSjVnk7tBkMmuV5Bk de1Y2aReK3gG7BGnAcvqtJahIKwM9OAta4L7jkvVUVPOGQNQ+azjAu7Zuhi/GbWdUCzA YrdIvkuoHrxVwSWUiF3LKdCRLQCct1ylQ8InHjOUM41iwVRqiTvDu0e8v9GukvA/tYBS O4Yg== X-Gm-Message-State: APjAAAXXTqm8j1BPZSFC0LBG1bHKahNvcTukz8Qn0n7V4xb4p+BevqHP a7UA04fjwLBfBupVBDzLU0quyd0FY91M/OsM X-Google-Smtp-Source: APXvYqydmybS4dof0D1nFhHUj/wklW1yiQNMYcwQ7sTTcZwwB2kwjIGUnv95rJIEU2LxSNAQU0MoLA== X-Received: by 2002:a5d:6b07:: with SMTP id v7mr26287778wrw.169.1562688833738; Tue, 09 Jul 2019 09:13:53 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 18:13:44 +0200 Message-Id: <20190709161343.17695-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.42]); Tue, 09 Jul 2019 16:13:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 09 Jul 2019 16:13:55 +0000 (UTC) for IP:'209.85.221.66' DOMAIN:'mail-wr1-f66.google.com' HELO:'mail-wr1-f66.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.229 * (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, PDS_NO_HELO_DNS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE) 209.85.221.66 mail-wr1-f66.google.com 209.85.221.66 mail-wr1-f66.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.42 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] test_driver: implement virDomainSetUserPassword 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.47]); Tue, 09 Jul 2019 16:14:43 +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 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 49d7030d21..891a398a92 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2602,6 +2602,31 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigne= d int nrCpus, return ret; } + +static int +testDomainSetUserPassword(virDomainPtr dom, + const char *user ATTRIBUTE_UNUSED, + const char *password ATTRIBUTE_UNUSED, + unsigned int flags) +{ + int ret =3D -1; + virDomainObjPtr vm; + + virCheckFlags(VIR_DOMAIN_PASSWORD_ENCRYPTED, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + return -1; + + if (virDomainObjCheckActive(vm) < 0) + goto cleanup; + + ret =3D 0; + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + static int testDomainSetVcpus(virDomainPtr domain, unsigned int nrCpus) { @@ -7628,6 +7653,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainSaveImageGetXMLDesc =3D testDomainSaveImageGetXMLDesc, /* 5.5.0= */ .domainCoreDump =3D testDomainCoreDump, /* 0.3.2 */ .domainCoreDumpWithFormat =3D testDomainCoreDumpWithFormat, /* 1.2.3 */ + .domainSetUserPassword =3D testDomainSetUserPassword, /* 5.6.0 */ .domainSetVcpus =3D testDomainSetVcpus, /* 0.1.4 */ .domainSetVcpusFlags =3D testDomainSetVcpusFlags, /* 0.8.5 */ .domainGetVcpusFlags =3D testDomainGetVcpusFlags, /* 0.8.5 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list