From nobody Wed May 8 13:37:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1624532436875773.0768736639687; Thu, 24 Jun 2021 04:00:36 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-487-vaxvFnHWP4mK05cU_448eA-1; Thu, 24 Jun 2021 07:00:29 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD7E88C5ED4; Thu, 24 Jun 2021 11:00:22 +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 7684A60871; Thu, 24 Jun 2021 11:00:21 +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 CB4AB1809C9A; Thu, 24 Jun 2021 11:00:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15OB0FFF002273 for ; Thu, 24 Jun 2021 07:00:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0136C20899F4; Thu, 24 Jun 2021 11:00:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EF4342089A06 for ; Thu, 24 Jun 2021 11:00:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CF54F108C118 for ; Thu, 24 Jun 2021 11:00:13 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-o09MLQIDOBKe5oceCApWSw-1; Thu, 24 Jun 2021 07:00:11 -0400 Received: by mail-pf1-f174.google.com with SMTP id i6so4854920pfq.1 for ; Thu, 24 Jun 2021 04:00:11 -0700 (PDT) Received: from localhost ([103.138.53.229]) by smtp.gmail.com with ESMTPSA id b194sm2723368pfb.11.2021.06.24.04.00.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 04:00:09 -0700 (PDT) X-MC-Unique: vaxvFnHWP4mK05cU_448eA-1 X-MC-Unique: o09MLQIDOBKe5oceCApWSw-1 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=6f3f6yXf5MdGbwMysWDdY3gLJCgnb0/Vb5aEFrhYwtE=; b=pu0kgFlffhkYktvzPPcOwVR5jpVeZLBVYLg47PgJr+T17Weht28DIGrVJziUVd9eeI zKQCIds9qpF9QY0h7/o5EOF0w8+pVDOfcGS5R3b6CLNT9vgxZ+JiR6rPIjOd17qziQ/H 6NiyGtpf5E4YQRon4vtcYXMvb8ZqPki783E6vcgGkB+c08vOaAO8E9zY+vQMDsMRrTHA ImQF+WwBV/hpSIliX/jO2Ub/GX+QzV8b6L9gdiy61ACbNK0+it/euhyrTehWOxi6AjYf 5BkF75YzBSNyvKbLVWtduul777aIDNI+m+Rs08IogOX8mgUMAUwkR3Hjw8zRN+tLsIJh 3ctA== X-Gm-Message-State: AOAM533SwdJPzmT2d2ZY14l3jeXTVrVMIaRMPHEzdt7yaqqcNa9Xpthy laU98AKKJaguOm5/t7CRqqqLzopPnuuw8SroMruBaQ== X-Google-Smtp-Source: ABdhPJxmWupf1T2bnWPr4EEKdsH31YDRws4EeFU7Jymp9T66J+9pRFedejdmfJxO+I7XuKzgVYAqSQ== X-Received: by 2002:a63:5b51:: with SMTP id l17mr4226239pgm.408.1624532410043; Thu, 24 Jun 2021 04:00:10 -0700 (PDT) From: Luke Yue To: libvir-list@redhat.com Subject: [PATCH v2 1/3] test_driver: Implement virDomainGetMessages Date: Thu, 24 Jun 2021 18:59:59 +0800 Message-Id: <20210624110001.358076-2-lukedyue@gmail.com> In-Reply-To: <20210624110001.358076-1-lukedyue@gmail.com> References: <20210624110001.358076-1-lukedyue@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Luke Yue --- src/test/test_driver.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 65710b78ef..dff96bceb6 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9331,6 +9331,58 @@ testDomainCheckpointDelete(virDomainCheckpointPtr ch= eckpoint, return ret; } =20 +static int +testDomainGetMessages(virDomainPtr dom, + char ***msgs, + unsigned int flags) +{ + virDomainObj *vm =3D NULL; + int rv =3D -1; + size_t i, n; + int nmsgs; + + virCheckFlags(VIR_DOMAIN_MESSAGE_DEPRECATION | + VIR_DOMAIN_MESSAGE_TAINTING, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + return -1; + + *msgs =3D NULL; + nmsgs =3D 0; + n =3D 0; + + if (!flags || (flags & VIR_DOMAIN_MESSAGE_TAINTING)) { + nmsgs +=3D __builtin_popcount(vm->taint); + *msgs =3D g_renew(char *, *msgs, nmsgs+1); + + for (i =3D 0; i < VIR_DOMAIN_TAINT_LAST; i++) { + if (vm->taint & (1 << i)) { + (*msgs)[n++] =3D g_strdup_printf( + _("tainted: %s"), + _(virDomainTaintMessageTypeToString(i))); + } + } + } + + if (!flags || (flags & VIR_DOMAIN_MESSAGE_DEPRECATION)) { + nmsgs +=3D vm->ndeprecations; + *msgs =3D g_renew(char *, *msgs, nmsgs+1); + + for (i =3D 0; i < vm->ndeprecations; i++) { + (*msgs)[n++] =3D g_strdup_printf( + _("deprecated configuration: %s"), + vm->deprecations[i]); + } + } + + (*msgs)[nmsgs] =3D NULL; + + rv =3D nmsgs; + + virDomainObjEndAPI(&vm); + return rv; +} + /* * Test driver */ @@ -9489,6 +9541,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainCheckpointLookupByName =3D testDomainCheckpointLookupByName, /*= 5.6.0 */ .domainCheckpointGetParent =3D testDomainCheckpointGetParent, /* 5.6.0= */ .domainCheckpointDelete =3D testDomainCheckpointDelete, /* 5.6.0 */ + .domainGetMessages =3D testDomainGetMessages, /* 7.5.0 */ }; =20 static virNetworkDriver testNetworkDriver =3D { --=20 2.32.0 From nobody Wed May 8 13:37:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16245324473331022.7924530062978; Thu, 24 Jun 2021 04:00:47 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-592-9k4mpjc2Pye1Wv9-Ww45MQ-1; Thu, 24 Jun 2021 07:00:44 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 939BA100C619; Thu, 24 Jun 2021 11:00:39 +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 49AF960583; Thu, 24 Jun 2021 11:00:39 +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 02CAE4EA2F; Thu, 24 Jun 2021 11:00:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15OB0Mn5002298 for ; Thu, 24 Jun 2021 07:00:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 390CF200E4B7; Thu, 24 Jun 2021 11:00:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3496921F1AED for ; Thu, 24 Jun 2021 11:00:18 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C955585829D for ; Thu, 24 Jun 2021 11:00:18 +0000 (UTC) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-453-s9GJbAZcNeatDsQKI6Tong-1; Thu, 24 Jun 2021 07:00:15 -0400 Received: by mail-pj1-f54.google.com with SMTP id b5-20020a17090a9905b029016fc06f6c5bso3223351pjp.5 for ; Thu, 24 Jun 2021 04:00:15 -0700 (PDT) Received: from localhost ([103.138.53.229]) by smtp.gmail.com with ESMTPSA id z5sm2587870pfb.114.2021.06.24.04.00.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 04:00:13 -0700 (PDT) X-MC-Unique: 9k4mpjc2Pye1Wv9-Ww45MQ-1 X-MC-Unique: s9GJbAZcNeatDsQKI6Tong-1 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=4JBAjTzMXuG6x2SmV6hOGYwej3pOBI2SjGRaKs+/Jt0=; b=sWJj0ajFEp0oBR/HxJepISBwZs0s8uZ+g7lXeqn9pZFowc3dv0p4HB5mC5gGjvEEyz p3ldsa9c+NF8Mign5RQG30bd6G9WTGeQXRgGDTEMlV+hvwDmpPkoWnQQLkUMo2fMsTLy xeiO4nPcdC71j4DeRaeShlkcbqmIxKHZHYD4Rkduh5WaCxAxij1iFdnlYvZ5H4sAlSD3 /LyImxiy+wqGUSqIm054atf+30Dx9Ifol8tofpHIQN8yUZc/emaMDuqobJGSZxjreJWJ aFxgv0OUyqy/97FNqvab2Q4VObbbWGKnL4+mWvAwAWq/KIby8TQfcW/YUNEf6RpwAFyS K3jA== X-Gm-Message-State: AOAM530twDoJ+XP+DmbmiErBTYwrUWNJv0wRCYaZMjxT2aT72wQavzrO EtiHtWBs8lgvVFszlSlL3BcsbumguqC1hVmTop/R0A== X-Google-Smtp-Source: ABdhPJzCvtJOlrTGKOFXBqatTDEf52kgGRVkil7/5sP0opBU58V/ECqxiVk1VNh/vqnq8GhL5RLCRg== X-Received: by 2002:a17:90a:7f02:: with SMTP id k2mr4765510pjl.134.1624532414273; Thu, 24 Jun 2021 04:00:14 -0700 (PDT) From: Luke Yue To: libvir-list@redhat.com Subject: [PATCH v2 2/3] test_driver: Introduce testDomainObjCheckTaint Date: Thu, 24 Jun 2021 19:00:00 +0800 Message-Id: <20210624110001.358076-3-lukedyue@gmail.com> In-Reply-To: <20210624110001.358076-1-lukedyue@gmail.com> References: <20210624110001.358076-1-lukedyue@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In order to test the virDomainGetMessages for test driver, we need to check some taints or deprecations, so introduce testDomainObjCheckTaint for checking taints. Signed-off-by: Luke Yue --- src/test/test_driver.c | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index dff96bceb6..88ae11c448 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9331,6 +9331,61 @@ testDomainCheckpointDelete(virDomainCheckpointPtr ch= eckpoint, return ret; } =20 +static void +testDomainObjCheckDiskTaint(virDomainObj *obj, + virDomainDiskDef *disk) +{ + if (disk->rawio =3D=3D VIR_TRISTATE_BOOL_YES) + virDomainObjTaint(obj, VIR_DOMAIN_TAINT_HIGH_PRIVILEGES); + + if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM && + virStorageSourceGetActualType(disk->src) =3D=3D VIR_STORAGE_TYPE_B= LOCK && + disk->src->path && virFileIsCDROM(disk->src->path) =3D=3D 1) + virDomainObjTaint(obj, VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH); +} + +static void +testDomainObjCheckHostdevTaint(virDomainObj *obj, + virDomainHostdevDef *hostdev) +{ + if (!virHostdevIsSCSIDevice(hostdev)) + return; + + if (hostdev->source.subsys.u.scsi.rawio =3D=3D VIR_TRISTATE_BOOL_YES) + virDomainObjTaint(obj, VIR_DOMAIN_TAINT_HIGH_PRIVILEGES); +} + +static void +testDomainObjCheckNetTaint(virDomainObj *obj, + virDomainNetDef *net) +{ + /* script is only useful for NET_TYPE_ETHERNET (qemu) and + * NET_TYPE_BRIDGE (xen), but could be (incorrectly) specified for + * any interface type. In any case, it's adding user sauce into + * the soup, so it should taint the domain. + */ + if (net->script !=3D NULL) + virDomainObjTaint(obj, VIR_DOMAIN_TAINT_SHELL_SCRIPTS); +} + +static void +testDomainObjCheckTaint(virDomainObj *obj) +{ + size_t i; + + for (i =3D 0; i < obj->def->ndisks; i++) + testDomainObjCheckDiskTaint(obj, obj->def->disks[i]); + + for (i =3D 0; i < obj->def->nhostdevs; i++) + testDomainObjCheckHostdevTaint(obj, obj->def->hostdevs[i]); + + for (i =3D 0; i < obj->def->nnets; i++) + testDomainObjCheckNetTaint(obj, obj->def->nets[i]); + + if (obj->def->os.dtb) + virDomainObjTaint(obj, VIR_DOMAIN_TAINT_CUSTOM_DTB); +} + static int testDomainGetMessages(virDomainPtr dom, char ***msgs, @@ -9351,6 +9406,8 @@ testDomainGetMessages(virDomainPtr dom, nmsgs =3D 0; n =3D 0; =20 + testDomainObjCheckTaint(vm); + if (!flags || (flags & VIR_DOMAIN_MESSAGE_TAINTING)) { nmsgs +=3D __builtin_popcount(vm->taint); *msgs =3D g_renew(char *, *msgs, nmsgs+1); --=20 2.32.0 From nobody Wed May 8 13:37:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1624532435195173.77087272449307; Thu, 24 Jun 2021 04:00:35 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-578--bum2o3ZMKuE59I4LTvOug-1; Thu, 24 Jun 2021 07:00:31 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 98431802C88; Thu, 24 Jun 2021 11:00:25 +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 6AE0E1A875; Thu, 24 Jun 2021 11:00:25 +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 E32281809CB3; Thu, 24 Jun 2021 11:00:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15OB0Mc1002303 for ; Thu, 24 Jun 2021 07:00:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id CC7981031F4C; Thu, 24 Jun 2021 11:00:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C84A61031F33 for ; Thu, 24 Jun 2021 11:00:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 07C24108C0E2 for ; Thu, 24 Jun 2021 11:00:20 +0000 (UTC) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-176-idGBd8CxOo-dYrNcDkhA7A-1; Thu, 24 Jun 2021 07:00:17 -0400 Received: by mail-pg1-f181.google.com with SMTP id h4so4420273pgp.5 for ; Thu, 24 Jun 2021 04:00:17 -0700 (PDT) Received: from localhost ([103.138.53.229]) by smtp.gmail.com with ESMTPSA id c18sm2526054pfo.143.2021.06.24.04.00.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 04:00:16 -0700 (PDT) X-MC-Unique: -bum2o3ZMKuE59I4LTvOug-1 X-MC-Unique: idGBd8CxOo-dYrNcDkhA7A-1 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=r/JeqxPyFBiTetC7vGd/OwvPGYKhkMAYoPcXEJiaApM=; b=aWapzS+81Le+ZDnPFj6+8Lxn5o0SpqDNmvEmvPGNvgHqf6gj7WhlInJi8MiDRULkrN BxHDqhe7ayKw2g2awq+OcbJ7cY7dVWBsr2whVF2pbWQsvnU3p7PDoRCMVCRAf/4GvFHd AqXeOmsd6Dmx4VfksGmnq3UXkI139CETar1mW6EA1d8fjJB7tvFZ+lDaLgKUlDsEQYB/ IayhgmldeDezCH/acXKCB7I9d8tG6Oz7kkRUH9xym5JtGeqI5WagnLX2kCFZ1E5UXfFv xg9YFvKlpOvXklc63dfqpqCVfsJoF4u7VdKymjo1n6xhbTMpeWaNcSFQHKkn1DU4Gtgp 2D4w== X-Gm-Message-State: AOAM53118QYGWSWnE7do/9zCm9/0FZMQetChdTgeBHsBvCMc/1tnwkJS 68WxdjeIeRvBNNaEd2nroUklAbr6RvgTL2Wx5efnqw== X-Google-Smtp-Source: ABdhPJx2U1DGC9WxqpVCl3jRejeKRYS0n7chPKbCwh+MC62zLCWlun0dnbUrPGTqJyNAdvZy1cdKnw== X-Received: by 2002:a62:a102:0:b029:2f4:a8e:cc44 with SMTP id b2-20020a62a1020000b02902f40a8ecc44mr4593749pff.38.1624532416501; Thu, 24 Jun 2021 04:00:16 -0700 (PDT) From: Luke Yue To: libvir-list@redhat.com Subject: [PATCH v2 3/3] tests: Add messages for virshtest Date: Thu, 24 Jun 2021 19:00:01 +0800 Message-Id: <20210624110001.358076-4-lukedyue@gmail.com> In-Reply-To: <20210624110001.358076-1-lukedyue@gmail.com> References: <20210624110001.358076-1-lukedyue@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" As we introduced testDomainObjCheckTaint for test driver, the `dominfo` command in virshtest will now print tainting messages, so add them for test. Signed-off-by: Luke Yue --- tests/virshtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/virshtest.c b/tests/virshtest.c index c1974c46cb..937448cefc 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -22,6 +22,7 @@ main(void) =20 # define DOM_UUID "ef861801-45b9-11cb-88e3-afbfe5370493" # define SECURITY_LABEL "libvirt-test (enforcing)" +# define MESSAGES "tainted: network configuration using opaque shell scrip= ts" =20 static const char *dominfo_fc4 =3D "\ Id: 2\n\ @@ -38,6 +39,7 @@ Managed save: no\n\ Security model: testSecurity\n\ Security DOI: \n\ Security label: " SECURITY_LABEL "\n\ +Messages: " MESSAGES "\n\ \n"; static const char *domuuid_fc4 =3D DOM_UUID "\n\n"; static const char *domid_fc4 =3D "2\n\n"; --=20 2.32.0