From nobody Mon Feb 9 16:45:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1604509571; cv=none; d=zohomail.com; s=zohoarc; b=Vvf+0Chm3/L8v2sKh8hOWleFh0hJOiwY0LJTUTIOvhioT1BIrxj7ZYhpZ/zvaiKMpN9NfZvHf1df9VjeLSNu7e02Nr4p9eXni1HF7TXiOqhR54Qm2/MAvkEShqHNkstEntv1uBZ8lcQId4hTN3Pjfk49gdkFCDOni3KmABs1oxE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604509571; 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=cqI73WzE1O9ebeyYdw0NJhalkgLT+dnXWxFDEy6Ko6c=; b=YPM0ZGLTPdP6fBizc3M9kCDKH0KF1lztEs7nEuzU+9nluoCudlYpOhTd1mQYbE5yAr6u9I6u7B8ELNBWau8P3oBDmfy7z7uR27bkXZkOF1rQENmd3RY+6vSVledCpIy8VgEYgcRY3ASYfepzEKHfgCVSj4FwYDlhBYnZ+loBERs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 160450957128986.95464426597619; Wed, 4 Nov 2020 09:06:11 -0800 (PST) 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-60-MrrxGfdOM8q-uqreqz0rdQ-1; Wed, 04 Nov 2020 12:06:04 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 201661900082; Wed, 4 Nov 2020 17:05:58 +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 EAA905C3E1; Wed, 4 Nov 2020 17:05:57 +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 B4007181A270; Wed, 4 Nov 2020 17:05:57 +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 0A4H5tc9002104 for ; Wed, 4 Nov 2020 12:05:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id 778D31002D41; Wed, 4 Nov 2020 17:05:55 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id D557610013C1 for ; Wed, 4 Nov 2020 17:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604509569; 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=cqI73WzE1O9ebeyYdw0NJhalkgLT+dnXWxFDEy6Ko6c=; b=YSqmLvBZdmcCBx2U8OLj0Z6EfYWYDzWmmgegO7YfFPaa1PLUAzUxrpyZkgDAKhqshuvA/N /xR3kG4A9GVZhrgDN+he/5WsXZqUAT3aYD6Y0R8DqA3bkOcnZp9kU9FUkOrLJxkHzbHnL/ 9X8sBly8WH+cuKLCmh4ZG03rfg6XV+c= X-MC-Unique: MrrxGfdOM8q-uqreqz0rdQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 01/12] virhashtest: testHashGetItems: Remove test case for sorting by value Date: Wed, 4 Nov 2020 18:05:37 +0100 Message-Id: <9df53db702b9f1c39ff9f211cfd5b753fe3b9c03.1604509429.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.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" Upcoming patch will rewrite virHashGetItems to remove the sorting function since the prevalent mode is to order by keys. Remove the test for it. Signed-off-by: Peter Krempa --- tests/virhashtest.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/tests/virhashtest.c b/tests/virhashtest.c index ad50aae003..8cc3109929 100644 --- a/tests/virhashtest.c +++ b/tests/virhashtest.c @@ -368,13 +368,6 @@ testHashGetItemsCompKey(const virHashKeyValuePair *a, return strcmp(a->key, b->key); } -static int -testHashGetItemsCompValue(const virHashKeyValuePair *a, - const virHashKeyValuePair *b) -{ - return strcmp(a->value, b->value); -} - static int testHashGetItems(const void *data G_GNUC_UNUSED) { @@ -416,18 +409,6 @@ testHashGetItems(const void *data G_GNUC_UNUSED) } VIR_FREE(array); - if (!(array =3D virHashGetItems(hash, testHashGetItemsCompValue)) || - STRNEQ(array[0].key, "c") || - STRNEQ(array[0].value, "1") || - STRNEQ(array[1].key, "b") || - STRNEQ(array[1].value, "2") || - STRNEQ(array[2].key, "a") || - STRNEQ(array[2].value, "3") || - array[3].key || array[3].value) { - VIR_TEST_VERBOSE("\nfailed to get items with value sort"); - goto cleanup; - } - ret =3D 0; cleanup: --=20 2.26.2