From nobody Tue Feb 10 20:05:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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.129.124]) by mx.zohomail.com with SMTPS id 16385412748014.766965366924069; Fri, 3 Dec 2021 06:21:14 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-293-jvaGk1FXPie_9ZiZRfnYtQ-1; Fri, 03 Dec 2021 09:20:47 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5ED701937FC3; Fri, 3 Dec 2021 14:20:42 +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 3EB2760CC3; Fri, 3 Dec 2021 14:20:42 +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 139C84BB7C; Fri, 3 Dec 2021 14:20:42 +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 1B3EKfuH026044 for ; Fri, 3 Dec 2021 09:20:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4C12D2166B46; Fri, 3 Dec 2021 14:20:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 43F222166B3F for ; Fri, 3 Dec 2021 14:20:34 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 34191185A7BA for ; Fri, 3 Dec 2021 14:20:34 +0000 (UTC) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-310-Ysb-kwS9OWuwTmT-wUFaUw-1; Fri, 03 Dec 2021 09:20:30 -0500 Received: by mail-pf1-f169.google.com with SMTP id n85so3025935pfd.10 for ; Fri, 03 Dec 2021 06:20:30 -0800 (PST) Received: from localhost ([2400:ddc0:1000::b373:390c]) by smtp.gmail.com with ESMTPSA id c81sm3396669pfb.166.2021.12.03.06.20.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 06:20:28 -0800 (PST) X-MC-Unique: jvaGk1FXPie_9ZiZRfnYtQ-1 X-MC-Unique: Ysb-kwS9OWuwTmT-wUFaUw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k0NlpAlnsONFhABdIIb7SKTbJG1tAflb8OrrgwurNbc=; b=zkjt5dgIHP7nL3bsVr/BCtDNNHJW7DnvrryT/D6TbTwh/HKsHwLmes4rJZxnAYRSII N6gdjz3upefoRQ3v0c8lIPKHuNiFaLSjhmAgJ9CvayFXWKvttMiZkhptaheT1PwB9BIb oUCA2EUoujshpRp/CPfSE5yWgnqFZTwoqp5m+5vV2Hzwuf9U3VbxXAmCMsw/+okRXnZq W/9VkVTQK25HJePRY6zfp/v3vgpJYN3KxY2GeJX89xfARc10FDqYAAA+AQ0aG40RyjzQ eE9mherXK5zq9rLQWhws68JdAP8ThScN0g6hG/eSxr4f+OHoWrG/TQrarBgB0XXZ0TpC E6dA== X-Gm-Message-State: AOAM532nHcTzUqcaMwSr0+qAxyNnTKoAFczG9d1QXWj26XNpJyk/z25z du/M4PTKWwvNai8qgUBYuP/8BN0qN3ngbNY3 X-Google-Smtp-Source: ABdhPJx7S0zR8VAyLOFwIWgrvBN0qpAqyPhfP8UX+SYUhTe0lmn4jtieEqgHqp4RSFXzSTQFqnNrvA== X-Received: by 2002:a63:5204:: with SMTP id g4mr4719509pgb.319.1638541229540; Fri, 03 Dec 2021 06:20:29 -0800 (PST) From: Luke Yue To: libvir-list@redhat.com Subject: [PATCH v2 4/4] tests: Add test for virDomainGetSecurityLabelList Date: Fri, 3 Dec 2021 22:19:57 +0800 Message-Id: <20211203141957.686148-5-lukedyue@gmail.com> In-Reply-To: <20211203141957.686148-1-lukedyue@gmail.com> References: <20211203141957.686148-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.12 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 X-ZM-MESSAGEID: 1638541275407100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Luke Yue --- tests/virshtest.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/virshtest.c b/tests/virshtest.c index 012edb8601..fc7caf6bc3 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -22,7 +22,8 @@ main(void) =20 # define DOM_FC4_UUID "ef861801-45b9-11cb-88e3-afbfe5370493" # define DOM_FC5_UUID "08721f99-3d1d-4aec-96eb-97803297bb36" -# define SECURITY_LABEL "libvirt-test (enforcing)" +# define SECLABEL_ENFORCING "libvirt-test (enforcing)" +# define SECLABEL_PERMISSIVE "libvirt-test (permissive)" # define FC4_MESSAGES "tainted: network configuration using opaque shell s= cripts" # define FC5_MESSAGES "tainted: running with undesirable elevated privileg= es\n\ tainted: network configuration using opaque shell scripts= \n\ @@ -48,7 +49,7 @@ Autostart: disable\n\ Managed save: no\n\ Security model: testSecurity\n\ Security DOI: \n\ -Security labels: " SECURITY_LABEL "\n\ +Security labels: " SECLABEL_ENFORCING "\n\ Messages: " FC4_MESSAGES "\n\ \n"; static const char *domuuid_fc4 =3D DOM_FC4_UUID "\n\n"; @@ -69,7 +70,8 @@ Autostart: disable\n\ Managed save: no\n\ Security model: testSecurity\n\ Security DOI: \n\ -Security labels: " SECURITY_LABEL "\n\ +Security labels: " SECLABEL_ENFORCING "\n\ + " SECLABEL_PERMISSIVE "\n\ Messages: " FC5_MESSAGES "\n\ \n"; =20 @@ -238,7 +240,8 @@ static int testCompareDominfoByName(const void *data G_= GNUC_UNUSED) =20 static int testCompareTaintedDominfoByName(const void *data G_GNUC_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "dominfo", "fc5", NULL }; + const char *const argv[] =3D { VIRSH_CUSTOM, "dominfo", "fc5", + "--full-seclabels", NULL }; const char *exp =3D dominfo_fc5; return testCompareOutputLit(exp, "\nCPU time:", argv); } --=20 2.34.1