From nobody Mon Feb 9 10:33:24 2026 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1667311327; cv=none; d=zohomail.com; s=zohoarc; b=LPf5sNlaaSrYYTaznsGdcsER+huVVMyP4s0IIrihu8FUEQkMZjGKNPmttKOl2JmYvNLjT7M9K4ejF3LTzww+0bHk3SLN8l30bzxMZ7eaN/Te79ycQqGQzUIWXad0vftGf2T7cH9nQH3oTER3GmIR6Xefa+vxPNd6AF9ME1AjdIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311327; 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; bh=ePpcWCcTibH3aExjdcYYAmukh5CJAJYzaOU3+VMTY1g=; b=QIuyUG5OZN3E2KRiaWMlkpSXdEaVRtvtVez2+/Kik3IB2U6MHchVd3ZIakpg98kQoLJtRVb7yZunhfHYgtfmjByppqNqaYRdWiIsbbfQsDqnkkVF33/EP48v9b/5B7s9cNuSDusfxhT1p9997sHYPFHb6L8jWi9yubVCtHDz7gM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) 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 1667311327395410.88925252770025; Tue, 1 Nov 2022 07:02:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-352-g0SrNYz0NAeUkIV8Zj5Vvw-1; Tue, 01 Nov 2022 10:02:02 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 897FF1C0A125; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7161E40C955A; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 498E41946A45; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9400E19465B3 for ; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8583B2023A1F; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA971202323C for ; Tue, 1 Nov 2022 14:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311326; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ePpcWCcTibH3aExjdcYYAmukh5CJAJYzaOU3+VMTY1g=; b=QNbzL6OHcGs7xkwF47yOZ4BZxZUnl09qVL4mgFXdQwV+i8vjdd5oG/WiX6nr7HLS9E9ixJ 3RsvpClhgVGEGzeNqMe+K85vTcGz/BgaootOW4Lgxu0OZHMmKsj7GqHsTdU82dg54ibs7H 3FSHc96AkKz5K+aAAcWzdiA3lGZiBEE= X-MC-Unique: g0SrNYz0NAeUkIV8Zj5Vvw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/12] virschematest: Construct path to the schema in the SCHEMAS_PATH Date: Tue, 1 Nov 2022 15:01:43 +0100 Message-Id: <4a72ac01a9f782fd0f1b094addb84ce604650706.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311328070100001 Content-Type: text/plain; charset="utf-8" 'abs_top_srcdir' can be prepended to the schema in the macro. Apart from removing one needles string copy it will also allow pointing to schema files in the builddir which will come handy in upcoming patches. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/virschematest.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/virschematest.c b/tests/virschematest.c index 3c91bd37bb..2a89f6a1c0 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -151,13 +151,10 @@ testSchemaGrammarReport(const void *opaque) static virXMLValidator * testSchemaGrammarLoad(const char *schema) { - g_autofree char *schema_path =3D NULL; g_autofree char *testname =3D NULL; virXMLValidator *ret; - schema_path =3D g_strdup_printf("%s/%s", abs_top_srcdir, schema); - - ret =3D virXMLValidatorInit(schema_path); + ret =3D virXMLValidatorInit(schema); testname =3D g_strdup_printf("test schema grammar file: '%s'", schema); @@ -335,7 +332,7 @@ mymain(void) { int ret =3D 0; -#define SCHEMAS_PATH "src/conf/schemas/" +#define SCHEMAS_PATH abs_top_srcdir "/src/conf/schemas/" #define DO_TEST(sch, ent) \ if (testSchemaEntries((sch), (ent), G_N_ELEMENTS(ent)) < 0) \ --=20 2.38.1