From nobody Thu May 15 02:06:16 2025 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1515380602119504.15538597829436; Sun, 7 Jan 2018 19:03:22 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 16925356CA; Mon, 8 Jan 2018 03:03:20 +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 B2D915D721; Mon, 8 Jan 2018 03:03:19 +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 0FA1F18033DA; Mon, 8 Jan 2018 03:03:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0833GMC007633 for ; Sun, 7 Jan 2018 22:03:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3ED145D755; Mon, 8 Jan 2018 03:03:16 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3908C5EDE2 for ; Mon, 8 Jan 2018 03:03:16 +0000 (UTC) Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B7804901C for ; Mon, 8 Jan 2018 03:03:15 +0000 (UTC) Received: by mail-qt0-f193.google.com with SMTP id a16so12093122qtj.3 for ; Sun, 07 Jan 2018 19:03:15 -0800 (PST) Received: from localhost.localdomain ([187.107.180.10]) by smtp.googlemail.com with ESMTPSA id y16sm7034281qta.48.2018.01.07.19.03.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 07 Jan 2018 19:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=IKwXhQDAy2he5yKPFOtFLDZAqc9rL8ksUkUaYhcc1js=; b=n9s/HHOdS3iTV1q8edx+hGtmnSq7TTGB/w8r+sihQQmdIAbUYZjTmebLXWK1CCrTn0 tdyhR3185Y90/dyArsmmLYtA2BFTYmB+pfr8pyGQuITjmQx4gZSvHQHoLi3Tn6yn+4zJ qyrdpjo/s8JHZ6ekvKzBzFjJ8z0qYbZ0WZQKdNRQGchadWP8T4/Q02vmbpisnkh+olbx bn9Mh8ffEZF89VfzS8uucAnu67z7kE5mWP3E5orQgmXpQw5GKISmWvwQKivVFt88fxWI UJPekvmDSvnHfGpZmZAYzRTMSYWYpAC2gexi8V8Vtxbcn2gweUOhvtmRns39eB+PO25k uUwg== 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; bh=IKwXhQDAy2he5yKPFOtFLDZAqc9rL8ksUkUaYhcc1js=; b=ZDil+2BOQZwL3KiCpitGUYYxSMXry9nyl7xu9SVF+enUJ2of16OuIEkgn+SaK4h9mV gqul7n0rrbVWlykkbshDa06xQjpZRiKTMCMMOD4jjCrYj2EGLxedBHW14n5kMqwDz0gj B4Np0ZvZV8ao442JXfAOlH8drKVQdYM9EvUP/o+29oHOn/eEGxzmKgX2rhS4SseiLVEU 2GYg0COZBGpdQeR6rs7lvE0vTZ9cc9J63LkZAuvSN6yo6AnrEv745IMGWW0B/wRwUZsU zW2FZxFpJHXhH+qhyrAoTnTomqjbo8TILMELx5OFfBpZrB52C37U1WDxucotiZxg2RFr YKRQ== X-Gm-Message-State: AKwxytecyvGFu6iyaCMtzTR3IwBr2F6BxeslnTRcF85Ozz4xy/2qHxKN VQze9DBfaft9vPNMmjWmureTWQ== X-Google-Smtp-Source: ACJfBosK/XjQq12Xb+u100fFogsUPWarzt5DWZCCf/M+ZzTC1eehYfUFU+5XFZObcLGjHjIWd/nCnQ== X-Received: by 10.200.51.101 with SMTP id u34mr14570705qta.152.1515380594373; Sun, 07 Jan 2018 19:03:14 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Mon, 8 Jan 2018 01:03:00 -0200 Message-Id: <1515380580-14220-3-git-send-email-jcfaracco@gmail.com> In-Reply-To: <1515380580-14220-1-git-send-email-jcfaracco@gmail.com> References: <1515380580-14220-1-git-send-email-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 08 Jan 2018 03:03:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 08 Jan 2018 03:03:15 +0000 (UTC) for IP:'209.85.216.193' DOMAIN:'mail-qt0-f193.google.com' HELO:'mail-qt0-f193.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.13 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.216.193 mail-qt0-f193.google.com 209.85.216.193 mail-qt0-f193.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/2] tests: Adding test case for 'domrename' command inside virshtest. 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 08 Jan 2018 03:03:20 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This commit adds a domrename test case inside the 'virshtest' test for test driver. Signed-off-by: Julio Faracco --- tests/virshtest.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/virshtest.c b/tests/virshtest.c index 67453bd..f1cd5df 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -40,6 +40,7 @@ static const char *domuuid_fc4 =3D DOM_UUID "\n\n"; static const char *domid_fc4 =3D "2\n\n"; static const char *domname_fc4 =3D "fc4\n\n"; static const char *domstate_fc4 =3D "running\n\n"; +static const char *domrename_fc4 =3D "Domain successfully renamed\n\n"; =20 static int testFilterLine(char *buffer, const char *toRemove) @@ -237,6 +238,14 @@ static int testCompareDomstateByName(const void *data = ATTRIBUTE_UNUSED) return testCompareOutputLit(exp, NULL, argv); } =20 +static int testCompareDomrenameByName(const void *data ATTRIBUTE_UNUSED) +{ + const char *const argv[] =3D { VIRSH_CUSTOM, "domrename", "fc4", + "fc4new", NULL }; + const char *exp =3D domrename_fc4; + return testCompareOutputLit(exp, NULL, argv); +} + struct testInfo { const char *const *argv; const char *result; @@ -322,6 +331,10 @@ mymain(void) testCompareDomstateByName, NULL) !=3D 0) ret =3D -1; =20 + if (virTestRun("virsh domrename (by name)", + testCompareDomrenameByName, NULL) !=3D 0) + ret =3D -1; + /* It's a bit awkward listing result before argument, but that's a * limitation of C99 vararg macros. */ # define DO_TEST(i, result, ...) \ --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list