From nobody Tue Feb 10 01:35:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530305843027485.8774573904327; Fri, 29 Jun 2018 13:57:23 -0700 (PDT) Received: from localhost ([::1]:44432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ0SI-0003Qm-75 for importer@patchew.org; Fri, 29 Jun 2018 16:57:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ0No-00085Y-7r for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ0Nn-0006TD-BR for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:44 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:45974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZ0Nn-0006S7-3k for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:43 -0400 Received: by mail-wr0-x241.google.com with SMTP id u7-v6so9978102wrn.12 for ; Fri, 29 Jun 2018 13:52:42 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r123-v6sm3561960wmb.21.2018.06.29.13.52.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 13:52:39 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 55BF73E0719; Fri, 29 Jun 2018 21:52:33 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AMkRDj/+DzSk73olAljoglLvRhXqyPyozWchbUwEc9o=; b=hGEHNO+7yyCeGiKaRYy7cPJiNu0zMjPaQ0yJbNG6L0Tp8wCdAJbn/j0fhpUybrD3F1 PvmUWeLpBLhwRJTt1gLm2d69Bbdj40aznH05D6V/Md8uMN/9F7g5sjqZFYZiYY7kwtYq pgot8vCxM5+eTeiWf2QenB1lA2WD5BWRkBN9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AMkRDj/+DzSk73olAljoglLvRhXqyPyozWchbUwEc9o=; b=qbJIoHuEzUuX10sQ1QOcm84duqYqOF9lygu1BMta3vjxC84Df0S1kzap1xz8xlKx8x XvNDCJodOnB14+dzqrWmp1SdBDHpIoPuuHuxD08qt0kAP1rd4diZdMbv61NaCOHzYWCN 4+CSJrYkulbnnoYkxB2O+SbOZLKt25tTDBbMbDoDCetE9ft+vH+uy0DnjK8nBlCpAW7F P83g39SIuV5OuzhxuGfZFAOjt1XeFFWW/uiOUQ7hPZhOA0OgEB7Kx9tVcSI+FkM0RDkI HVkgwlwuT7WYRBX7pYCT9hICQKE+85gUMU7lcKWF5eXAUeSGy8jgrFsdpVN3uTvzLcyN +98A== X-Gm-Message-State: APt69E3pnA3vrLsueTZS/Y6Bf08AfwCV22uXZmwpl6u9G2QBdkvVEdAc c5OcdAy74JOyycoGKit+bkhxrQ== X-Google-Smtp-Source: AAOMgpfgcZmIzzyUmqTC2QRKWjf1B8BxNEUxSJhq65D4Q0MNqKeaHe21+FBYugul3eOKb3Vf3Jg2JA== X-Received: by 2002:adf:adae:: with SMTP id w43-v6mr13927625wrc.251.1530305561934; Fri, 29 Jun 2018 13:52:41 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Fri, 29 Jun 2018 21:52:18 +0100 Message-Id: <20180629205232.27190-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629205232.27190-1-alex.bennee@linaro.org> References: <20180629205232.27190-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PATCH v2 07/21] build-system: add clean-coverage target X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This can be used to remove any stale coverage data before any particular test run. This is useful for analysing individual tests. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Daniel P. Berrang=C3=A9 --- v2 - s/to any/to delete any/ --- Makefile | 11 +++++++++++ docs/devel/testing.rst | 11 ++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7ed9cc4a21..2b3413a5ba 100644 --- a/Makefile +++ b/Makefile @@ -723,6 +723,14 @@ module_block.h: $(SRC_PATH)/scripts/modules/module_blo= ck.py config-host.mak $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ "GEN","$@") =20 +ifdef CONFIG_GCOV +.PHONY: clean-coverage +clean-coverage: + $(call quiet-command, \ + find . \( -name '*.gcda' -o -name '*.gcov' \) -type f -exec rm {} +, \ + "CLEAN", "coverage files") +endif + clean: # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h ge= n-op-arm.h @@ -1073,6 +1081,9 @@ endif echo '') @echo 'Cleaning targets:' @echo ' clean - Remove most generated files but keep the conf= ig' +ifdef CONFIG_GCOV + @echo ' clean-coverage - Remove coverage files' +endif @echo ' distclean - Remove all generated files' @echo ' dist - Build a distributable tarball' @echo '' diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 66ef219f69..7f04ca104e 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -161,9 +161,14 @@ GCC gcov support ``gcov`` is a GCC tool to analyze the testing coverage by instrumenting the tested code. To use it, configure QEMU with ``--enable-gcov`` option and build. Then run ``make check`` as usual. -Reports can be obtained by running ``gcov`` command on the output -files under ``$build_dir/tests/``, please read the ``gcov`` -documentation for more information. + +If you want to gather coverage information on a single test the ``make +clean-coverage`` target can be used to delete any existing coverage +information before running a single test. + +Reports can be obtained by running ``gcov`` command +on the output files under ``$build_dir/tests/``, please read the +``gcov`` documentation for more information. =20 QEMU iotests =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.17.1