From nobody Sun May 19 06:50:51 2024 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=1615383657; cv=none; d=zohomail.com; s=zohoarc; b=XP2e45/zPapvR/22GVQQIKkUL4yfa560oL4/sOtOva9hv7UzVwTgZT3F4+rXGH+tRXSKZrLqP+P6QcFD+Tw3zc0/whxSAGRaKmOBl94pa5zumlSe8k+xpoAdfWf7507DX31ZcbrLIL+tQK8U+f+AQT8b2ThinvfjPcKJDgutdKc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615383657; 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=ADqi8SpLGF+vQa1Jp7pFzbnqikPH4vS/CL9aHZ5/bEE=; b=mTUqv6vX8absQLmtPwL9fJrCQ4Bqj2ng0qsmnphbSMZQpfDWK/AxeBXi61lIyDTKFYtcquqjKAY3Zdz92u/0n5pq2GXVSUod9983rnDRdP1m2DhwaAUAe35VBPlO/2HHrMeK1sZjjqbaEMn09gju1lwHBaGCo1yH02SDXqKfaQw= 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 1615383657643879.1858579327011; Wed, 10 Mar 2021 05:40:57 -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-236-iejy7TsLNom9mXTHKYFxTg-1; Wed, 10 Mar 2021 08:40:54 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A5C3010866A5; Wed, 10 Mar 2021 13:40:48 +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 EF159138FB; Wed, 10 Mar 2021 13:40:47 +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 DE85F1C99; Wed, 10 Mar 2021 13:40:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12ADej3p031671 for ; Wed, 10 Mar 2021 08:40:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id AB02E18C7A; Wed, 10 Mar 2021 13:40:45 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F5A783BE1 for ; Wed, 10 Mar 2021 13:40:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615383656; 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=ADqi8SpLGF+vQa1Jp7pFzbnqikPH4vS/CL9aHZ5/bEE=; b=PrZMFLPS+JPM31dEvWLQylR7sDlHvfBgtGOGi/5rRHu3mQdqAceFQG0y/vueuoVUzbSmP1 8IVuF/ZovA7j73EY6dxcPsuSm/iPNbxuBaaxgIyM2lzRxIRqmcEH5pV2FVWWm4ugNohecq cQP3MKqATtcFfogE4V+iBIfPp54vZfI= X-MC-Unique: iejy7TsLNom9mXTHKYFxTg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] virSystemdCreateMachine: Use proper format string for uint64_t when constructing gvariant Date: Wed, 10 Mar 2021 14:40:35 +0100 Message-Id: <5861911b991a9d4d796bd0b2f49f494abe8a206b.1615383609.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.12 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" g_variant_new_parsed uses '%t' for a uint64_t rather than printf-like %llu. Additionally ensure that the passed value is a uint64_t since the argument used is a 'unsigned int'. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1937287 Fixes: bf5f2ed09c2 Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- src/util/virsystemd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c index c109324e96..c22f2df866 100644 --- a/src/util/virsystemd.c +++ b/src/util/virsystemd.c @@ -519,11 +519,12 @@ int virSystemdCreateMachine(const char *name, } if (maxthreads > 0) { + uint64_t max =3D maxthreads; + if (!(scopename =3D virSystemdMakeScopeName(name, drivername, fals= e))) return -1; - gprops =3D g_variant_new_parsed("[('TasksMax', <%llu>)]", - (uint64_t)maxthreads); + gprops =3D g_variant_new_parsed("[('TasksMax', <%t>)]", max); message =3D g_variant_new("(sb@a(sv))", scopename, --=20 2.29.2 From nobody Sun May 19 06:50:51 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=1615383666; cv=none; d=zohomail.com; s=zohoarc; b=Alfx51ULC+qCxxLhbM2LAaNbeM83yHmof3gfnafK7emXR6tid7h2anEmQilVUado/vBby7ggCKYFyHU5RXfhRRdw8RMQhiMt6LZCYQGCPn0lncpCS506qosdPxT2GDIPFMoenLfsxqtxHWeLimIs/yGHMXkZ7pYq2POCIdVulHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615383666; 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=b/WPM9FWpuV7H3rm58FFkmZq2d1nwquM7D+4losWGYs=; b=f4FDTuEEo9bh5iOovEsfnt0Beq2CDfA8+YhiZsaymtsK/ABAI9gfEAdAtyw5CLsJdyVloHL8fnYLwi7hxYbWgTOdB+8Rh3jGN89Oox0Rgp+6bOS0lmikPaQD/7Fo4ZnWfMdSQ2Ka0bVFM6vcPi/bxwFa5WcHUt4dhjtXb4C/C/s= 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) header.from= 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 1615383666418563.2155446798289; Wed, 10 Mar 2021 05:41:06 -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-194-RfFr8zPgNcirgpSKAdlGSA-1; Wed, 10 Mar 2021 08:41:03 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B6BA801596; Wed, 10 Mar 2021 13:40:57 +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 456315D746; Wed, 10 Mar 2021 13:40: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 0A1151809C86; Wed, 10 Mar 2021 13:40:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12ADemOd031683 for ; Wed, 10 Mar 2021 08:40:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id DC8FF18C7A; Wed, 10 Mar 2021 13:40:48 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EAA41B4B8 for ; Wed, 10 Mar 2021 13:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615383665; 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=b/WPM9FWpuV7H3rm58FFkmZq2d1nwquM7D+4losWGYs=; b=OCTP8iQveiuBtcWsn7nwuaLdnmRF/kZHMpW8JskRhGJinBKhxOqd1RLN/4lRINKbPv6Pm3 iY6OhRrYkd83V9aGHTE1M1PO0QazJmTtIpEkdTiu0TmpXYtpRWvUcyPPDoDpFWDhKpeqTq tWQMWcO6ARG6snlGzFZ3wsADuj7sGAc= X-MC-Unique: RfFr8zPgNcirgpSKAdlGSA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/2] virsystemdtest: Call at least one virSystemdCreateMachine with 'maxthreads' > 0 Date: Wed, 10 Mar 2021 14:40:36 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.15 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" There was a bug in the code adding TasksMax property. It remained undetected because all tests used '0' for @maxthreads. Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- tests/virsystemdtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c index b48cdb950c..c082b95732 100644 --- a/tests/virsystemdtest.c +++ b/tests/virsystemdtest.c @@ -313,7 +313,7 @@ static int testCreateNetwork(const void *opaque G_GNUC_= UNUSED) 123, true, nnicindexes, nicindexes, - "highpriority.slice", 0) < 0) { + "highpriority.slice", 2) < 0) { fprintf(stderr, "%s", "Failed to create LXC machine\n"); return -1; } --=20 2.29.2