From patchwork Mon Feb 21 10:02:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 12753360 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 535C1C433F5 for ; Mon, 21 Feb 2022 10:03:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.275959.471975 (Exim 4.92) (envelope-from ) id 1nM5XO-0000er-81; Mon, 21 Feb 2022 10:03:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 275959.471975; Mon, 21 Feb 2022 10:03:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nM5XO-0000ej-4r; Mon, 21 Feb 2022 10:03:22 +0000 Received: by outflank-mailman (input) for mailman id 275959; Mon, 21 Feb 2022 10:03:21 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nM5XN-00008I-D3 for xen-devel@lists.xenproject.org; Mon, 21 Feb 2022 10:03:21 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7f0fbc45-92fd-11ec-8eb8-a37418f5ba1a; Mon, 21 Feb 2022 11:03:20 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7f0fbc45-92fd-11ec-8eb8-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645437800; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HSRz95RA0iD9ZY3bHdVhf3Vb2e+MAy95oW5EbGSBx8c=; b=Je6+j5Ch6fDHjp6yEaQ9FU0q6pEn8PrlrSVsx7KlladOU5P93Cs/PWkO 5BFE4CRiRq+/ui5XiOOCy7Hf1UYAAwdcpewY6AOprbngNWnWfcRP9TjO9 MSsf8P0d0W4S4oBTKSd1GgPPXFOzVsxNfzmsyjOTxMj9/zYrAcow85hMV s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 66881348 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:FEE52Km5bvvTRA36iZaizR/o5gzRJkRdPkR7XQ2eYbSJt1+Wr1Gzt xIeWmyPPfqJYGD0eI10OY60oEsBsMOBx4RlTFBtqS03FyMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2UILd9IR2NYy24DjWVrV4 LsenuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYVDooHKLSxMgnVUcbMBBEL/VA+qebLi3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3k3ds1zzGS90hRojOWf7i7t5ExjYgwMtJGJ4yY uJHN2o/NU+cM3WjPH9IItUBvNn3rUKmUBdktnu0rK4n8zfcmVkZPL/Fb4OOJ43iqd9utlaVo CfK8nr0BjkeNceD0nyV/3S0nOjNkCjnHoUIG9WFGuVC2QPJgDZJUVtPCAX98aLRZlOCt8x3N nEV2CUw8YQI8hLobejHTUW+ombYsUtJMzZPKNES5AaIw6vSxg+WAGkYUzJMAOAbWN8KqS8Cj QHQwY6wbdB7mPjMEC/GqO/Ixd+nEXVNdQc/iTk4oRzpCjUJiKU6lVrxQ9lqC8ZZZfWlSGirk 1hmQMXT7oj/bPLnNY3mpzgrYBr2//AlqzLZAS2NAwqYAvtRPtLNWmBRwQGzAQx8BIiYVEKdm 3MPhtKT6usDZbnUynDQG7VRTez4uqzUWNE5vbKIN8N8nwlBBlb5JdwAiN2ADBwB3jk4lc/BP xaI5FI5CG57N3q2d65nC79d+OxxpZUM4e/ND6iOBvIXO8AZXFbeoElGOB7Bt0iwwRNEufxuZ v+mnTOEUC9y5VJPl2HtGY/wENYDm0gD+I8kbcqll0/+ieLGPhZ4i94taTOzUwzw14vcyC29z jqVH5fiJ8l3OAEmXhTqzA== IronPort-HdrOrdr: A9a23:58ab3KOioY/PzMBcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3gqy nOpoV86faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrZ uIGJIeNDSfNzdHZL7BkWuFL+o= X-IronPort-AV: E=Sophos;i="5.88,385,1635220800"; d="scan'208";a="66881348" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= Subject: [PATCH 1/3] tests/resource: Initialise gnttab before xenforeignmemory_map_resource() Date: Mon, 21 Feb 2022 10:02:52 +0000 Message-ID: <20220221100254.13661-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20220221100254.13661-1-andrew.cooper3@citrix.com> References: <20220221100254.13661-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 It the 'addr' input to mmap(), and currently consuming stack rubble. Coverity-ID: 1500115 Fixes: c7a7f14b9299 ("tests/resource: Extend to check that the grant frames are mapped correctly") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné --- CC: Roger Pau Monné --- tools/tests/resource/test-resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/resource/test-resource.c b/tools/tests/resource/test-resource.c index 0557f8a1b585..189353ebcb43 100644 --- a/tools/tests/resource/test-resource.c +++ b/tools/tests/resource/test-resource.c @@ -24,7 +24,7 @@ static void test_gnttab(uint32_t domid, unsigned int nr_frames, unsigned long gfn) { xenforeignmemory_resource_handle *res; - grant_entry_v1_t *gnttab; + grant_entry_v1_t *gnttab = NULL; size_t size; int rc; uint32_t refs[nr_frames], domids[nr_frames]; From patchwork Mon Feb 21 10:02:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 12753361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2418AC4332F for ; Mon, 21 Feb 2022 10:03:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.275960.471987 (Exim 4.92) (envelope-from ) id 1nM5XQ-0000wV-IG; Mon, 21 Feb 2022 10:03:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 275960.471987; Mon, 21 Feb 2022 10:03:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nM5XQ-0000wM-EP; Mon, 21 Feb 2022 10:03:24 +0000 Received: by outflank-mailman (input) for mailman id 275960; Mon, 21 Feb 2022 10:03:22 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nM5XO-0000em-K2 for xen-devel@lists.xenproject.org; Mon, 21 Feb 2022 10:03:22 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7e10aed3-92fd-11ec-8539-5f4723681683; Mon, 21 Feb 2022 11:03:20 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7e10aed3-92fd-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645437800; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=XhnhyXBfcCg1IFjeQ8rcSX9ITITWwAZ7WnOmhbzucr0=; b=OoeXe/j0jyaDDUlXZXWfwyxq17XQzunoQGwoCmig+qDxr1/9VO8hNGT/ mToX6T0iWMCyJp9KVMMetEp++LY61i9qxqzr4QpX4ZnE0rnPc+wikRr6K owXubbTu56N+n25qwGYlIo+MDKBiwNMlj5bweaj7yIvMwO8O8YIsM1CGN c=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65042091 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:Jsln+6rziWGtcyAd+T1qgaCfildeBmIjZRIvgKrLsJaIsI4StFCzt garIBnUO6yKajPzLY1waYuy9h4AuZ/Uxt9gHQs9/Cg8H3hG+JuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefQAOCU5NfsYkidfyc9IMsa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WtkwNakGjCxkVLRjy1Z+ifWYVffpDfIu3DAbv31ZSRFFG/Fxl6 iV8sjztCWE8Qr5N0tBpTntAsW9qDbnhPtICOoqTNGftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAs9D4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.88,385,1635220800"; d="scan'208";a="65042091" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Stefano Stabellini , Wei Liu , Julien Grall , Paul Durrant Subject: [PATCH 2/3] xen: Rename asprintf() to xasprintf() Date: Mon, 21 Feb 2022 10:02:53 +0000 Message-ID: <20220221100254.13661-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20220221100254.13661-1-andrew.cooper3@citrix.com> References: <20220221100254.13661-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Coverity reports that there is a memory leak in ioreq_server_alloc_rangesets(). This would be true if Xen's implementation of asprintf() had glibc's return semantics, but it doesn't. Rename to xasprintf() to reduce confusion for Coverity and other developers. While at it, fix style issues. Rearrange ioreq_server_alloc_rangesets() to use a tabulated switch statement, and not to have a trailing space in the rangeset name for an unknown range type. Coverity-ID: 1472735 Coverity-ID: 1500265 Fixes: 780e918a2e54 ("add an implentation of asprintf() for xen") Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Paul Durrant --- xen/common/ioreq.c | 16 ++++++++++------ xen/common/vsprintf.c | 11 ++++++----- xen/include/xen/lib.h | 4 ++-- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c index 689d256544c8..5c94e74293ce 100644 --- a/xen/common/ioreq.c +++ b/xen/common/ioreq.c @@ -501,13 +501,17 @@ static int ioreq_server_alloc_rangesets(struct ioreq_server *s, for ( i = 0; i < NR_IO_RANGE_TYPES; i++ ) { - char *name; + char *name, *type; - rc = asprintf(&name, "ioreq_server %d %s", id, - (i == XEN_DMOP_IO_RANGE_PORT) ? "port" : - (i == XEN_DMOP_IO_RANGE_MEMORY) ? "memory" : - (i == XEN_DMOP_IO_RANGE_PCI) ? "pci" : - ""); + switch ( i ) + { + case XEN_DMOP_IO_RANGE_PORT: type = " port"; break; + case XEN_DMOP_IO_RANGE_MEMORY: type = " memory"; break; + case XEN_DMOP_IO_RANGE_PCI: type = " pci"; break; + default: type = ""; break; + } + + rc = xasprintf(&name, "ioreq_server %d%s", id, type); if ( rc ) goto fail; diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c index 185a4bd5610a..b278961cc387 100644 --- a/xen/common/vsprintf.c +++ b/xen/common/vsprintf.c @@ -859,7 +859,7 @@ int scnprintf(char * buf, size_t size, const char *fmt, ...) EXPORT_SYMBOL(scnprintf); /** - * vasprintf - Format a string and allocate a buffer to place it in + * xvasprintf - Format a string and allocate a buffer to place it in * * @bufp: Pointer to a pointer to receive the allocated buffer * @fmt: The format string to use @@ -870,7 +870,7 @@ EXPORT_SYMBOL(scnprintf); * guaranteed to be null terminated. The memory is allocated * from xenheap, so the buffer should be freed with xfree(). */ -int vasprintf(char **bufp, const char *fmt, va_list args) +int xvasprintf(char **bufp, const char *fmt, va_list args) { va_list args_copy; size_t size; @@ -891,7 +891,7 @@ int vasprintf(char **bufp, const char *fmt, va_list args) } /** - * asprintf - Format a string and place it in a buffer + * xasprintf - Format a string and place it in a buffer * @bufp: Pointer to a pointer to receive the allocated buffer * @fmt: The format string to use * @...: Arguments for the format string @@ -901,14 +901,15 @@ int vasprintf(char **bufp, const char *fmt, va_list args) * guaranteed to be null terminated. The memory is allocated * from xenheap, so the buffer should be freed with xfree(). */ -int asprintf(char **bufp, const char *fmt, ...) +int xasprintf(char **bufp, const char *fmt, ...) { va_list args; int i; va_start(args, fmt); - i=vasprintf(bufp,fmt,args); + i = xvasprintf(bufp, fmt, args); va_end(args); + return i; } diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index c6987973bf88..aea60d292724 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -158,9 +158,9 @@ extern int scnprintf(char * buf, size_t size, const char * fmt, ...) __attribute__ ((format (printf, 3, 4))); extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) __attribute__ ((format (printf, 3, 0))); -extern int asprintf(char ** bufp, const char * fmt, ...) +extern int xasprintf(char **bufp, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); -extern int vasprintf(char ** bufp, const char * fmt, va_list args) +extern int xvasprintf(char **bufp, const char *fmt, va_list args) __attribute__ ((format (printf, 2, 0))); long simple_strtol( From patchwork Mon Feb 21 10:02:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 12753358 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CB9EC433FE for ; Mon, 21 Feb 2022 10:03:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.275958.471965 (Exim 4.92) (envelope-from ) id 1nM5XN-0000Oz-0O; Mon, 21 Feb 2022 10:03:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 275958.471965; Mon, 21 Feb 2022 10:03:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nM5XM-0000Os-Tc; Mon, 21 Feb 2022 10:03:20 +0000 Received: by outflank-mailman (input) for mailman id 275958; Mon, 21 Feb 2022 10:03:20 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nM5XM-00008I-9z for xen-devel@lists.xenproject.org; Mon, 21 Feb 2022 10:03:20 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7d53d089-92fd-11ec-8eb8-a37418f5ba1a; Mon, 21 Feb 2022 11:03:18 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7d53d089-92fd-11ec-8eb8-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645437798; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=59BUrJyJFYGfQ4z14Fv38dK7j3O8WgWr/hGqJtw6/PQ=; b=do3PdFAeGGpMg4CzR0+7slfvKAh/RilG8FJt7GAnY5S7HtIjbO26py+h 5Gd4kHnLK3yDyVO6nPIfAd0nGtoJRfNprJ+koldngXFq+eNoUdlPCd/TQ wBXm/uHiLn2r9sROJIwG1dmlKOrfOJrttpQzTCyOf5dJZU4ZgrvSEGlXS Y=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 66881347 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:unQ4sqt6Z4XoIJeV/0Qy9JgrYufnVAZeMUV32f8akzHdYApBsoF/q tZmKWmEM6uCazHzeohyaYmwoUMCu5aGytZiTwo//Co3FHkX+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/nOHNIQMcacUsxLbV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kWuFL+o= X-IronPort-AV: E=Sophos;i="5.88,385,1635220800"; d="scan'208";a="66881347" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= Subject: [PATCH 3/3] CI: Coverity tweaks Date: Mon, 21 Feb 2022 10:02:54 +0000 Message-ID: <20220221100254.13661-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20220221100254.13661-1-andrew.cooper3@citrix.com> References: <20220221100254.13661-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 * Use workflow_dispatch to allow manual creation of the job. * Use parallel builds. The workers have two vCPUs. * Shrink the dependency list further. build-essential covers make and gcc, while bridge-utils and iproute2 are runtime dependencies not build dependencies. Alter bzip2 to libbz2-dev. Signed-off-by: Andrew Cooper --- CC: Roger Pau Monné --- .github/workflows/coverity.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 9d04b56fd31d..6e7b81e74f72 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -2,6 +2,7 @@ name: Coverity Scan # We only want to test official release code, not every pull request. on: + workflow_dispatch: schedule: - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC @@ -11,11 +12,11 @@ jobs: steps: - name: Install build dependencies run: | - sudo apt-get install -y wget git gawk bridge-utils \ - iproute2 bzip2 build-essential \ - make gcc zlib1g-dev libncurses5-dev iasl \ - libbz2-dev e2fslibs-dev git-core uuid-dev ocaml \ - ocaml-findlib xz-utils libyajl-dev \ + sudo apt-get install -y wget git gawk \ + libbz2-dev build-essential \ + zlib1g-dev libncurses5-dev iasl \ + libbz2-dev e2fslibs-dev uuid-dev ocaml \ + ocaml-findlib libyajl-dev \ autoconf libtool liblzma-dev \ python3-dev golang python-dev libsystemd-dev @@ -31,7 +32,7 @@ jobs: - name: Pre build stuff run: | - make mini-os-dir + make -j`nproc` mini-os-dir - uses: vapier/coverity-scan-action@v1 with: @@ -39,3 +40,4 @@ jobs: project: XenProject email: ${{ secrets.COVERITY_SCAN_EMAIL }} token: ${{ secrets.COVERITY_SCAN_TOKEN }} + command: make -j`nproc` build