From nobody Mon Feb 9 07:58:52 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=1559313164; cv=none; d=zoho.com; s=zohoarc; b=n/Azol9A5A8ddhCGwdAVO3Yn/WMZQ1Ta15H1ivRZm+G+D1yaQUYD4Gx30+fYOQGS7b5G4j9S80uicS4j7aFVmpZ3S8WXol/CeFlSClWqmtbPp2hooF1DsiLUralt1Yspfbnoztl60XeaZ74ZjgpDLFOBiWMxnTuQzIBU5hIGZt4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559313164; 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=jBQClCdgcflRg6UuPfFuoL8r9HVdLtspG9AkByBC7Qs=; b=HUBeFSDNeDTaNq4xFmeSqPSblSDjFcw6s0WH2qPo+Io0Mp+gARQbXbj6ll6aDzFtbhnJ6OoESXpoiC3IaszgxRyZszwMryA46huLIm2dFE88YAQxj6QvNh6az84Yn8biciX4XbgH6hyZDvsobHM1MmpsT2Zdly468KcOFd06XK4= 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 1559313164181257.5154635505228; Fri, 31 May 2019 07:32:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72AEB3001C61; Fri, 31 May 2019 14:32: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 B93D319C69; Fri, 31 May 2019 14:32:19 +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 83CC9206D2; Fri, 31 May 2019 14:32:11 +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 x4VEW9SS010220 for ; Fri, 31 May 2019 10:32:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1D0FC5C28D; Fri, 31 May 2019 14:32:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 178B75C559 for ; Fri, 31 May 2019 14:32:07 +0000 (UTC) Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.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 ABFCC317917B for ; Fri, 31 May 2019 14:31:55 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id f20so14805054edt.12 for ; Fri, 31 May 2019 07:31:55 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id w4sm1030564ejj.66.2019.05.31.07.31.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 07:31: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=dM17XCIsgDUrMxi7psuqWwopX08uLh2xN5GBE/OpTRU=; b=N6WXV5J2+nyU+vJXKfBkRzcUf1grlsPp3SG68GWncwPiOrrRlfxXQdWiAgE86Lmlf6 6BGh1C7XdFQzWZ1OFdy6kJiCq0jca6fDYG8Z6ZgS595BkeQyvVkf4Ux85pfX1UmjIkV9 uPirvkgAMfMoIGRIPmPNTB8mQ5cjuacWqOqDgQr3iXUy/uedGWlxKx7UeuqJyZKvNXNV tC3PI5W+o2e6QmS671p84Wx3Qk3//BPMAHPt81dQatFLel8Cz2iplC5xP+1diHt/hYpa cK4TAxN2Sd1CsZX81DlO7Qg+eaoT0/+4cCDR7YggMJS/LXoARGtZDDT1yEybUkXIjoxX x3xg== 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=dM17XCIsgDUrMxi7psuqWwopX08uLh2xN5GBE/OpTRU=; b=PY1XG0vUpzytQq2UIS7mWuR1wIa2AE3+nQJm3wzogwd6+04LCBSTJmEZxczQAX54zd IAadq75xSFgq66eb3ytL94D7ncaxwJuktwGxPdcu7sSi7hX69aee6PaUIEWTpmItsIv9 Q+TXqtr4MECpQRNIkLDxxa0zDd98yXltBQg28kesS3JXXl8s9f+LjctH4o54VykDezJx wgVlx3cLRNUkbKy5rCfBGHE+yWVEXWeEn0ZXIA6QNquX6OuZIx1vyc18v7uukeomjBqW oNCjJt4TiinJi6Y4rOJDU248O886Okb8KxN5oJUsg1xKkVagGF5ZTMA0VHCVHAn4Jcuy bFvg== X-Gm-Message-State: APjAAAVQk5gnc6x7dM+Uuq+sc0J/XDrHHNpLhq/5Y6qlE6uKzNRw1nmM 12uKEQrrvKdaAd4JEhQ5FaMLstLcfsQ= X-Google-Smtp-Source: APXvYqysGs6lWeU3fYRAIUPIjdUO3gmEz7seQPOVB69ZeXVZulEnv3HnRx5Psz+K6MetMWTTKO22Yg== X-Received: by 2002:aa7:c403:: with SMTP id j3mr11515425edq.144.1559313113869; Fri, 31 May 2019 07:31:53 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Fri, 31 May 2019 16:31:35 +0200 Message-Id: <20190531143135.19372-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.41]); Fri, 31 May 2019 14:31:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 31 May 2019 14:31:55 +0000 (UTC) for IP:'209.85.208.68' DOMAIN:'mail-ed1-f68.google.com' HELO:'mail-ed1-f68.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.108 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE) 209.85.208.68 mail-ed1-f68.google.com 209.85.208.68 mail-ed1-f68.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.41 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] test_driver: implement virDomainGetHostname 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 31 May 2019 14:32:37 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Always return "domain_name" + "host". Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- src/test/test_driver.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2f58a1da95..aad7bb6036 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -1910,6 +1910,27 @@ static int testDomainReboot(virDomainPtr domain, return ret; } +static char * +testDomainGetHostname(virDomainPtr domain, + unsigned int flags) +{ + char *ret =3D NULL; + virDomainObjPtr vm =3D NULL; + + virCheckFlags(0, NULL); + + if (!(vm =3D testDomObjFromDomain(domain))) + goto cleanup; + + if (virDomainObjCheckActive(vm) < 0) + goto cleanup; + + ignore_value(virAsprintf(&ret, "%shost", domain->name)); + + cleanup: + return ret; +} + static int testDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) { @@ -6950,6 +6971,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainGetMaxMemory =3D testDomainGetMaxMemory, /* 0.1.4 */ .domainSetMaxMemory =3D testDomainSetMaxMemory, /* 0.1.1 */ .domainSetMemory =3D testDomainSetMemory, /* 0.1.4 */ + .domainGetHostname =3D testDomainGetHostname, /* 5.5.0 */ .domainGetInfo =3D testDomainGetInfo, /* 0.1.1 */ .domainGetState =3D testDomainGetState, /* 0.9.2 */ .domainGetTime =3D testDomainGetTime, /* 5.4.0 */ -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list