From nobody Fri Dec 19 18:47:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1592241049; cv=none; d=zohomail.com; s=zohoarc; b=HK550drhS/QIKDLX5IBAFVaC0ms3LH0sVy1x68jLLNHkOTnTrHQ08W1COF2m38ijq/JWl8YgR3xE7CbBbEDd+2LY5fnC6wXEYcoyqkQruKjhhMrV0FepMjUk/anBXLoPG9V33JcDbAp29qMnajR7qR2rdVd0GNNtykAe5T3HEW4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592241049; 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=v3lMdMbCdJhxOerd4adLUI3Zh5ySaS7Ktm3XgrphbQA=; b=bl7Xq6+7i0LcQ4nwJKG99HgRijBMrCOWge5Ox6tcyJQXs4HruH5hPQoFSGdZmlrmsEni5+hu+0MV49zIv32ih7Rhs1BX4busGk40DSL+bGgVWATtqjsqR8WWL4G1/vESlu/5DUM8GvtV8lbgb6j6z3HGnOxVu9nKmcvWSzzNIZc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1592241049267953.7071159611608; Mon, 15 Jun 2020 10:10:49 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-486-lf7C5t19M5yKHgLnPeSkfw-1; Mon, 15 Jun 2020 13:10:45 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id B1EB48735C2; Mon, 15 Jun 2020 17:10:39 +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 8546D19C79; Mon, 15 Jun 2020 17:10:39 +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 4CD7A833CF; Mon, 15 Jun 2020 17:10:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05FHAUI9004697 for ; Mon, 15 Jun 2020 13:10:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4E20A10023A6; Mon, 15 Jun 2020 17:10:30 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id B52D6100164D for ; Mon, 15 Jun 2020 17:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592241048; 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=v3lMdMbCdJhxOerd4adLUI3Zh5ySaS7Ktm3XgrphbQA=; b=Ye9S9q516TxfF6TVRk5NNrplGkHEPPxVXPb+Gm55F8j92zwrUKLj7loWRpOVKG47rX/1Nb 1LpyE/8VzNRNzD0xSkmeU+JNYOTKVHullpgih4XsUjuvJ9p8WMX6QYWq0HqvgZi9pUhUOz uDdfog+QGR7rXxzUKh/AvC+FnhtrsPo= X-MC-Unique: lf7C5t19M5yKHgLnPeSkfw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 07/32] qemublocktest: Add 'empty' case for checkpoint deletion Date: Mon, 15 Jun 2020 19:09:54 +0200 Message-Id: <8606ddbda69b77a0083db11ac757dddac6a16a03.1592240635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use the new test data for checkpoint deletion testing. This test also requires modification of the internals to allow checking for test failure. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- tests/qemublocktest.c | 13 +++++++------ .../checkpointdelete/empty-out.json | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 tests/qemublocktestdata/checkpointdelete/empty-out.json diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 9e54c254e8..1821c227d5 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -851,14 +851,13 @@ testQemuCheckpointDeleteMerge(const void *opaque) data->parentbitmap, actions, "testdisk", - &reopenimages) < 0) { - VIR_TEST_VERBOSE("failed to generate checkpoint delete transaction= \n"); - return -1; + &reopenimages) >=3D 0) { + if (virJSONValueToBuffer(actions, &buf, true) < 0) + return -1; + } else { + virBufferAddLit(&buf, "NULL\n"); } - if (virJSONValueToBuffer(actions, &buf, true) < 0) - return -1; - if (reopenimages) { virBufferAddLit(&buf, "reopen nodes:\n"); @@ -1333,6 +1332,8 @@ mymain(void) ret =3D -1; \ } while (0) + TEST_CHECKPOINT_DELETE_MERGE("empty", "a", NULL, "empty"); + TEST_CHECKPOINT_DELETE_MERGE("basic-noparent", "a", NULL, "basic"); TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate1", "b", "a", "basic"); TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate2", "c", "b", "basic"); diff --git a/tests/qemublocktestdata/checkpointdelete/empty-out.json b/test= s/qemublocktestdata/checkpointdelete/empty-out.json new file mode 100644 index 0000000000..7951defec1 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/empty-out.json @@ -0,0 +1 @@ +NULL --=20 2.26.2