From patchwork Mon Apr 1 16:47:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 161552 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp687923jan; Mon, 1 Apr 2019 09:48:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIbjqhNehpO/JTPkKsqW3OydSDAJG8HzUudt8Dr8k0iZwRpr5hWQHfnF953cTqb+vPZlJW X-Received: by 2002:a0c:9ba7:: with SMTP id o39mr52066220qve.153.1554137281066; Mon, 01 Apr 2019 09:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554137281; cv=none; d=google.com; s=arc-20160816; b=ja1ijhR4gnMJ2Sl3Vh6DmxfjOu2IDmvVX2kaaePRSOo8kwpgGhOF2tp3r8zGRbqE8K yM5Kbk66Ro08RwPs6snr3YPSNo7z80GiDLtabHezKG0uUvnNQLjmNLL8Tqz0fOUwCmPG 3sSWhwMsykrNzY7Rm88QHl5jgB8T9H3YdjijD1z2QvHTMcw9rMesN+WaIWeNNWmtu9dY Gh09p68Y6XRIIlU8/g53bvm0IiZXRp6rlWgkJaCbVzlngf704aO+JI5p/bSxOK4BrDG9 FKtMWEMjU0RjxkPRK0/uRqp8yenueTkXFNthvbAn7cKe4Zaf7R4/K+dLffH4Xl9UFvDy u7rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=w7L6wYjkpdzRx4bRrY1NAk9pvaeToT9jjFh6pUv8RR0=; b=fibyvA8kyGJQN3chMfuXd537QQpK14ymX7kCiPyV6M8ci0/i/SyjR8hX69hRtyBpiS 8AdzpivwTmB5yBHCzN2+hJ65+nFX4i42wvKzOBlJj5hbc7U/C0F9Kl25PRCVsehoTiFo 9LcoGrIA5CidrY/p6xItbtCGrxTWrIujVqH9hGDgQKN6oBE2tUTjKqrMWL5i/uJM+I+S 6N60yjoFNlCPHHqP5HAoZ69tCinkzqyXSy0bW8kNtzRwIho2DqInhK8M7YgtlItG0jsz fJ4skdqjt+WIp14O0j6wZuJZg04LzQTqpAzsnw89qNed/aFpQRI9B0E8lKQPdf+lf+OX ON3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id s40si6446438qth.154.2019.04.01.09.48.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 09:48:01 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 B5D8D6699B; Mon, 1 Apr 2019 16:47:59 +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 8AB3C27CD6; Mon, 1 Apr 2019 16:47:59 +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 4945C181A135; Mon, 1 Apr 2019 16:47:59 +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 x31GlbQB026707 for ; Mon, 1 Apr 2019 12:47:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id D9D325C27C; Mon, 1 Apr 2019 16:47:37 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-124-128.rdu2.redhat.com [10.10.124.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id 737A45C206; Mon, 1 Apr 2019 16:47:37 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Mon, 1 Apr 2019 12:47:22 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/12] tests: qemuxml2argv: Rename testInfo* to testQemuInfo* 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 01 Apr 2019 16:48:00 +0000 (UTC) In preparation for moving these bits to a shared place, rename them to match one of the testqemuutils.c function prefixes. Rename info->flags handling too as it will need to be moved testInfoSetPaths isn't renamed because it will stay local Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a3fee41ea9..b87d2e3fb9 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -294,9 +294,9 @@ typedef enum { FLAG_FIPS = 1 << 2, FLAG_REAL_CAPS = 1 << 3, FLAG_SKIP_LEGACY_CPUS = 1 << 4, -} virQemuXML2ArgvTestFlags; +} testQemuInfoFlags; -struct testInfo { +struct testQemuInfo { const char *name; char *infile; char *outfile; @@ -380,7 +380,7 @@ testAddCPUModels(virQEMUCapsPtr caps, bool skipLegacy) static int -testUpdateQEMUCaps(const struct testInfo *info, +testUpdateQEMUCaps(const struct testQemuInfo *info, virDomainObjPtr vm, virCapsPtr caps) { @@ -410,7 +410,7 @@ testUpdateQEMUCaps(const struct testInfo *info, static int -testCheckExclusiveFlags(int flags) +testQemuInfoCheckExclusiveFlags(int flags) { virCheckFlags(FLAG_EXPECT_FAILURE | FLAG_EXPECT_PARSE_ERROR | @@ -427,7 +427,7 @@ testCheckExclusiveFlags(int flags) static int testCompareXMLToArgv(const void *data) { - struct testInfo *info = (void *) data; + struct testQemuInfo *info = (void *) data; char *migrateURI = NULL; char *actualargv = NULL; unsigned int flags = info->flags; @@ -460,7 +460,7 @@ testCompareXMLToArgv(const void *data) if (virQEMUCapsGet(info->qemuCaps, QEMU_CAPS_ENABLE_FIPS)) flags |= FLAG_FIPS; - if (testCheckExclusiveFlags(info->flags) < 0) + if (testQemuInfoCheckExclusiveFlags(info->flags) < 0) goto cleanup; if (qemuTestCapsCacheInsert(driver.qemuCapsCache, info->qemuCaps) < 0) @@ -605,14 +605,14 @@ typedef enum { ARG_CAPS_ARCH, ARG_CAPS_VER, ARG_END, -} testInfoArgName; +} testQemuInfoArgName; static int -testInfoSetArgs(struct testInfo *info, - virHashTablePtr capslatest, ...) +testQemuInfoSetArgs(struct testQemuInfo *info, + virHashTablePtr capslatest, ...) { va_list argptr; - testInfoArgName argname; + testQemuInfoArgName argname; virQEMUCapsPtr qemuCaps = NULL; int gic = GIC_NONE; char *capsarch = NULL; @@ -622,7 +622,7 @@ testInfoSetArgs(struct testInfo *info, int ret = -1; va_start(argptr, capslatest); - argname = va_arg(argptr, testInfoArgName); + argname = va_arg(argptr, testQemuInfoArgName); while (argname != ARG_END) { switch (argname) { case ARG_QEMU_CAPS: @@ -684,7 +684,7 @@ testInfoSetArgs(struct testInfo *info, goto cleanup; } - argname = va_arg(argptr, testInfoArgName); + argname = va_arg(argptr, testQemuInfoArgName); } if (!!capsarch ^ !!capsver) { @@ -740,7 +740,7 @@ testInfoSetArgs(struct testInfo *info, } static void -testInfoClear(struct testInfo *info) +testQemuInfoClear(struct testQemuInfo *info) { VIR_FREE(info->infile); VIR_FREE(info->outfile); @@ -748,7 +748,7 @@ testInfoClear(struct testInfo *info) } static int -testInfoSetPaths(struct testInfo *info, const char *suffix) +testInfoSetPaths(struct testQemuInfo *info, const char *suffix) { if (virAsprintf(&info->infile, "%s/qemuxml2argvdata/%s.xml", abs_srcdir, info->name) < 0 || @@ -881,18 +881,18 @@ mymain(void) */ # define DO_TEST_INTERNAL(_name, _suffix, ...) \ do { \ - static struct testInfo info = { \ + static struct testQemuInfo info = { \ .name = _name, \ }; \ - if (testInfoSetArgs(&info, capslatest, \ - __VA_ARGS__, ARG_END) < 0) \ + if (testQemuInfoSetArgs(&info, capslatest, \ + __VA_ARGS__, ARG_END) < 0) \ return EXIT_FAILURE; \ if (testInfoSetPaths(&info, _suffix)) \ return EXIT_FAILURE; \ if (virTestRun("QEMU XML-2-ARGV " _name _suffix, \ testCompareXMLToArgv, &info) < 0) \ ret = -1; \ - testInfoClear(&info); \ + testQemuInfoClear(&info); \ } while (0) # define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \