From nobody Wed Nov 5 08:48:38 2025 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 1530542305000597.0845712845512; Mon, 2 Jul 2018 07:38:25 -0700 (PDT) Received: from localhost ([::1]:33182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZzy9-0002r6-6g for importer@patchew.org; Mon, 02 Jul 2018 10:38:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZzqb-0005Ps-M9 for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:30:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZzqa-0000VY-Oe for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:30:33 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:45092) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZzqa-0000Uu-J2 for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:30:32 -0400 Received: by mail-wr0-x242.google.com with SMTP id u7-v6so15773748wrn.12 for ; Mon, 02 Jul 2018 07:30:32 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id f133-v6sm8465245wme.42.2018.07.02.07.30.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Jul 2018 07:30:28 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 4AD153E0775; Mon, 2 Jul 2018 15:30:22 +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=GuevOL6n1JA56A+0otUCySepRVFGhCxzZE3rJTFaRJjwMcJH0FdJzwWNQTOfFO+nBS isOe479Fm9uyPFEgZXCnYLC+9wtT2OKS9VkWh6ldcRJCaEUw0NHhZBpJiMPTW5rUP+BJ l8+lfXzBH5M9DERzrQktYxUFI2JRzqAnhncdI= 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=Cs845TkgALjUEn0EnIIEFuzM54Ti3rVAJQHrVutVIepUUrTNE/0496ffWHlTJoTOzj 4ji3G3Gg7Okry4qGiwZAENI1hlvv20jfijvGBIKnU5LhOAKeJMbHVhtBjpstgSde52b/ kUMFsNXycF0dwv3bJBsU9stPsaJW+rQPb4077dkznO+T8cE7b4DpEjnsM0QD4hQVekyy 55jFbEw3CczXi6UhkOKQCjcNXjs5/sp2ptmP1jzy9NSq5XZfRo9oDRYhU9u+mMsvbYHS ZzUScqYxoOVYBv/MPaZgW/IIuV63V8YdUDqlwIntXd0SqLs2Zgrr77pjpnx5t8+lK9G2 BYsw== X-Gm-Message-State: APt69E3Z/GISGE+L9wWpQxOZumYbUow0iWDansoE3Wj0e3SkIwG2SVj7 sM2r4zrq9qJreXnvCKf57gJSLQ== X-Google-Smtp-Source: AAOMgpdWkkNixGYFRwkgJFUpUWLDEKIn0T/ZyIfYRIJtuR1Fb+vk84FdcliWoYto0utzZ8yMSp+HfQ== X-Received: by 2002:adf:adae:: with SMTP id w43-v6mr20843707wrc.251.1530541831374; Mon, 02 Jul 2018 07:30:31 -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: Mon, 2 Jul 2018 15:30:08 +0100 Message-Id: <20180702143021.18864-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180702143021.18864-1-alex.bennee@linaro.org> References: <20180702143021.18864-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::242 Subject: [Qemu-devel] [PATCH v3 07/20] 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=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