From nobody Sat May 11 21:30:43 2024 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=1695733355; cv=none; d=zohomail.com; s=zohoarc; b=eJ3MWzX3b1u4rcw3lk8v+JtjUkfTCVSaUhYCcJm3MbsDcOjJXNMuaQz/4xMqPo7rklESgqWbahcFsnAZmxT5WKelESUZndKJzvQuZ8huSTpwtGu5znlBtkaKkBOePRBlxLbEFOQVRTRzVjvb+BocF/qisyp9hw5akQlSWu0dPpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695733355; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=zH4F/FUUjRmw6uaPEoIvXoGFdGo9j+QbC2MmDzxWOBE=; b=S6cUZOd8XJXwNzCJHTTlEvatIx86eC+jbnGUOkA+iLrSzcSsjn6yUDRPNcA850Na2ufvvQQnqVLh5DN1x2rU8ePbdacLQoNbN1s1wPKxxWuqWQCya3b4AN9MxpHhmiClmjl9MURyMNGQjFmHAWW+QXpMHzeLTxftJcLRC8Aem1U= 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 1695733355894858.9098837412693; Tue, 26 Sep 2023 06:02:35 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-580-nNztQ-6AM1KDOWJll7J1WQ-1; Tue, 26 Sep 2023 09:02:28 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25DAB101AA68; Tue, 26 Sep 2023 13:02:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E9F0492B16; Tue, 26 Sep 2023 13:02:25 +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 9C2091946594; Tue, 26 Sep 2023 13:02:24 +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 101B8194658C for ; Tue, 26 Sep 2023 12:20:49 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E3A0D2026D68; Tue, 26 Sep 2023 12:20:48 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC26F2026D4B for ; Tue, 26 Sep 2023 12:20:48 +0000 (UTC) Received: from us-smtp-inbound-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B9AA238116E9 for ; Tue, 26 Sep 2023 12:20:48 +0000 (UTC) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-A4_aXmqeNDG7nwUQScdf9w-1; Tue, 26 Sep 2023 08:20:47 -0400 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-31ffa4da0f5so6588405f8f.1 for ; Tue, 26 Sep 2023 05:20:46 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id h13-20020a170906584d00b00992b8d56f3asm7694420ejs.105.2023.09.26.05.20.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 05:20:44 -0700 (PDT) Received: from wheatley.brq.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 49074150BF88E for ; Tue, 26 Sep 2023 14:20:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695733354; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zH4F/FUUjRmw6uaPEoIvXoGFdGo9j+QbC2MmDzxWOBE=; b=ZDKF+lzPsOL95bMhPGmp4DAcxjlbj9G7lR1Y1/z5x8WFAJO361LbJXKTA7onndNvVmJfSB z61UoneMEuIOWsSRxQTvjBYBx8wp8zDhNGCmyoBlATXVenjWMomQBlCNKcVnL4FNLXFTC5 P9bMhftUO2dJYBJnim9fY9BPF8FBuPM= X-MC-Unique: nNztQ-6AM1KDOWJll7J1WQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: A4_aXmqeNDG7nwUQScdf9w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695730846; x=1696335646; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zH4F/FUUjRmw6uaPEoIvXoGFdGo9j+QbC2MmDzxWOBE=; b=eNiq52s99xIY/Eg2wp4DlwRxNkx0x2mOEcPW14AnPANsq9nVLI30M+sdPfyLjPUUQ3 mEOYLUv19BHl/vlvznlbTeIGEQhpeHY5yNoyCRRRPVz7rcbchXvbRD5tHrG7UWPbXvZs d2/AGfryBiI/lbpmWqmoH1lRPE7kba6kfq4FpGlJuSeVj7VIyNF/NXrSvQ1BoE+8YAVp iK0XjsR2DdEu8pQJ0t5g2voN0g6Uf2du0Pm0eqxAF6DyRbBZ+JHgvxjqYD0hvFyC0hI2 soUEbtMkvi7+2nbQ99DCowsqglvx5+yXjn4rwaLjUw7rlD5C1bXXUtI9EZHthBDVsFLE 2s8g== X-Gm-Message-State: AOJu0YzzMQ8k7Xsq8uwh6e7uXiiAc40BQyjytuG+FD9j3v18cYGMdhYx bNhze/a8q3hHR/BP9mTrmBDSWF9K5aa9mMxkayV68fsGc3MYa1Lb2UNtZYxng1Vkb5Q8VwIZ5wt Ikvgrkeoe/H02JLPnOQs3/DwgCpFBX3sws52IBb5HneCWt8cWDiaWcGrEzsf5rRpg+uY3jFrMfq EGsgg= X-Received: by 2002:adf:dc8a:0:b0:321:504a:bc9a with SMTP id r10-20020adfdc8a000000b00321504abc9amr8082111wrj.71.1695730846059; Tue, 26 Sep 2023 05:20:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEQAD3B2X4KtdQpl3JC1homgLjlZI4L8R2/8RdkneU57k/nxqCazW+I4TVJMFaAvpKlOCd64Q== X-Received: by 2002:adf:dc8a:0:b0:321:504a:bc9a with SMTP id r10-20020adfdc8a000000b00321504abc9amr8082074wrj.71.1695730845073; Tue, 26 Sep 2023 05:20:45 -0700 (PDT) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH] test: Fix testNodeGetFreePages Date: Tue, 26 Sep 2023 14:20:43 +0200 Message-ID: <1f950458efc1032186d1c0285ab0afa212556ccb.1695730843.git.mkletzan@redhat.com> 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.9 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: 1695733365046100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The function is supposed to return the number of items filled into the array and not zero. Also change the initialization of the "randomness" to be based on the startCell so that the values are different for each cell even for separate calls. Signed-off-by: Martin Kletzander Reviewed-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- src/test/test_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c962aa74786e..998d102ddc5a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4503,7 +4503,7 @@ testNodeGetFreePages(virConnectPtr conn G_GNUC_UNUSED, unsigned int flags) { size_t i =3D 0, j =3D 0; - int x =3D 6; + int x =3D startCell * 6; =20 virCheckFlags(0, -1); =20 @@ -4514,7 +4514,7 @@ testNodeGetFreePages(virConnectPtr conn G_GNUC_UNUSED, } } =20 - return 0; + return cellCount * npages; } =20 static int testDomainCreateWithFlags(virDomainPtr domain, unsigned int fla= gs) --=20 2.42.0