From nobody Wed Nov 27 03:38:18 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560267901; cv=none; d=zoho.com; s=zohoarc; b=gX2u6mZQzVWhVgkJkDlHtuVPSU8lMhPnLXV7lZH6/FqmjNq+ovzIb4P4whbzVRAxbw8YsPD8VqR0ar1tgdYf9mPZToupfRofjRk/9Hme4eanHzC61MAdEW4AFSbJaAvwC+NPaO3+nX3JTlllB1vI3HttqlYSBvUKeTQL/FrJflA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560267901; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=3/Wcv2sgbLyCo9iIHe2gB3RK+qtTcxGNtqWhrny4MwQ=; b=nbGmoiX8qfXhskOscA2n6UaRs5BLP4UgOWuQWtcfVKLPQ5YawCU3TRazkuObiOCGyPwpc29XhKEoAWziHp9WnQh6KfFt16XRplSu9j8EnCJC68URLfE5qZHO0C8ril7y20xONQ9bKJHBFQA78KG1hzTfPFh+xbRroTpyd0M8DHM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass 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 1560267901474156.39969264684817; Tue, 11 Jun 2019 08:45:01 -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 DFCCF300BEA8; Tue, 11 Jun 2019 15:44:54 +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 A94712B3D0; Tue, 11 Jun 2019 15:44:53 +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 6491118363C1; Tue, 11 Jun 2019 15:44:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5BFhM0X009504 for ; Tue, 11 Jun 2019 11:43:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9E52160A35; Tue, 11 Jun 2019 15:43:22 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 256A460C81 for ; Tue, 11 Jun 2019 15:43:21 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 11 Jun 2019 17:43:16 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] tests: uri: Add test for urlencoded URIs 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.40]); Tue, 11 Jun 2019 15:44:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" When specifying extra params for spcie TLS verification, it's necessary to pass a weird URI to it. Let's add a test for this case where the TLS string contains a space. Signed-off-by: Peter Krempa --- tests/viruritest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/viruritest.c b/tests/viruritest.c index 04c237832d..c09e5323bc 100644 --- a/tests/viruritest.c +++ b/tests/viruritest.c @@ -178,6 +178,14 @@ mymain(void) TEST_PARSE("test://[2001:41c8:1:4fd4::2]:123/system", "test", "2001:41= c8:1:4fd4::2", 123, "/system", NULL, NULL, NULL, NULL); TEST_PARSE("gluster+rdma://example.com:1234/gv0/vol.img", "gluster+rdm= a", "example.com", 1234, "/gv0/vol.img", NULL, NULL, NULL, NULL); + virURIParam spiceparams[] =3D { + { (char *) "tlsSubject", (char *) "C=3DXX,L=3DTesttown,O=3DTest Co= mpany,CN=3Dtester.test", false }, + { NULL, NULL, false }, + }; + TEST_FULL("spice://[3ffe::104]:5900/?tlsSubject=3DC=3DXX,L=3DTesttown,= O=3DTest%20Company,CN=3Dtester.test", + "spice://[3ffe::104]:5900/?tlsSubject=3DC%3dXX%2cL%3dTesttow= n%2cO%3dTest%20Company%2cCN%3dtester%2etest", + "spice", "3ffe::104", 5900, "/", "tlsSubject=3DC=3DXX,L=3DTe= sttown,O=3DTest%20Company,CN=3Dtester.test", NULL, NULL, spiceparams); + virURIParam params1[] =3D { { (char*)"foo", (char*)"one", false }, { (char*)"bar", (char*)"two", false }, --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list