From patchwork Mon Jun 25 11:19:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934183 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="WDZ8COEi"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dmtn1w1Hz9ry1 for ; Mon, 25 Jun 2018 21:20:33 +1000 (AEST) Received: from localhost ([::1]:45536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPXq-0004zD-SR for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:20:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPX4-0004wq-JI for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX1-0008Bh-2k for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:42 -0400 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:40792) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX0-0008BK-SQ for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:39 -0400 Received: by mail-wr0-x230.google.com with SMTP id g18-v6so13254360wro.7 for ; Mon, 25 Jun 2018 04:19:38 -0700 (PDT) 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=sxIp/xuJnH3MIDFaLhI+re07H1cbbHtORxqU5WrDPV8=; b=WDZ8COEi18QlpFu0LjelDO7lhyW+1sHW+VYasZmCeTbCjPqacCxXsAeAfUbKY8Tk8V 8/ewT0TOI38uSf8UnCg+cvhu529Na9WJuSfvYTA/Jo1P2hIndNuijXb8sqUKskRm51QK kKtJGDeaBXRueeB16M8c1mElg634wjzgdFfM8= 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=sxIp/xuJnH3MIDFaLhI+re07H1cbbHtORxqU5WrDPV8=; b=NMSIsVASKX8syo73uZROY20GbYlnxkFhb8Jt8jnFCfrv/+6JhPsJOn/VU184niJRel LLwlJbB7uQW31/Nakn5Z+x1gtPUJ1ddniZ+m6HyD5zvo8rD/SQ9uvkDO4S4c9A95uEbZ eNhua6OKsZ+ZJCaJH1v4fFDWh0EVr2D5CVhL70o/VdUU228QItLarToMpNX7HQS1KdYm HG1PfbjzQeX8WFQRkh6irG5h86KaQvE/DZz5an/cxnW+SaqsOeYs2wl50wm3Mo1/V67O KGYs+lAqYNx1g+tAQzcMSwf8fQoJ5tqZSBbMMBRF03sPPPWr+pK6wrV+ioZu1o0T/b5+ 2m2A== X-Gm-Message-State: APt69E3bcnGDaV24Q4LUXTDR11e9lxQCPKDFHdKLNR6vQegRQ90U+wbp Jqk/dVquSsCj8V6iZABdjwfXiQ== X-Google-Smtp-Source: AAOMgpf52nXYzzoZkeYEt8p/5T9kJmG813P6XTRdsNq79OuE7b46xc9ksx1NNmFKYVdd7rMvXjcE6w== X-Received: by 2002:adf:ec4d:: with SMTP id w13-v6mr9509352wrn.222.1529925577832; Mon, 25 Jun 2018 04:19:37 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v190-v6sm601680wme.26.2018.06.25.04.19.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id F14853E0866; Mon, 25 Jun 2018 12:19:35 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:26 +0100 Message-Id: <20180625111935.26108-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::230 Subject: [Qemu-devel] [PATCH v1 01/10] travis: do not waste time cloning unused submodules 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Builds only require: - dtc - keycodemapdb - capstone Signed-off-by: Philippe Mathieu-Daudé [AJB: drop wget cache] Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd66c18fed..134d5331fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,8 +66,7 @@ git: before_install: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libffi gettext glib pixman ; fi - - wget -O - http://people.linaro.org/~alex.bennee/qemu-submodule-git-seed.tar.xz | tar -xvJ - - git submodule update --init --recursive + - git submodule update --init --recursive capstone dtc ui/keycodemapdb before_script: - ./configure ${CONFIG} || { cat config.log && exit 1; } script: From patchwork Mon Jun 25 11:19:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="OzFYYkLE"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dn096yz6z9ry1 for ; Mon, 25 Jun 2018 21:25:13 +1000 (AEST) Received: from localhost ([::1]:45562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPcM-000068-79 for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:25:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPX4-0004wn-J6 for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX2-0008C3-0J for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:42 -0400 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]:33195) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX1-0008Bl-Ps for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:39 -0400 Received: by mail-wr0-x233.google.com with SMTP id k16-v6so13282853wro.0 for ; Mon, 25 Jun 2018 04:19:39 -0700 (PDT) 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=3ndOlwRoyjuCD4a0okUmWjZ3yW1u1yrXrrOpaltzy60=; b=OzFYYkLEv85gPT5ai+fNhRoTwc+hzUAcad1nkPRA1YFEWGw0mCpttNYDYIa84Mz+om b1K+rBxBR1zGawpPeIYoeidNy9bOBuw4sMU1LFhv1IwBJk1qTt1w0iMIN3G60KsZbaDs mdTm6+5Y8R7QSwXzjfOR6CfBflsv7BxX0xN4o= 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=3ndOlwRoyjuCD4a0okUmWjZ3yW1u1yrXrrOpaltzy60=; b=mURzGaj6eyfF2OM7Lj34omT3leGFl2d9c7BWFU2bjqYRlcewbVYJ8c2O2HedyiNTHu +cc4VBnqBGwWIEkmDhs8kuyQzCq+kIQ5rAGg3x7KENflNHfOkhw4SNMZOZPcSMhqOFym jMJM9X9f152l9XK4rTRmVllu6EVVO/G797swrHYBnd/cG4zriyqkaqkj6RvlYD7yHqPD h9VHNAqoDKAA0PGtVUGY2sNPYpFr46EE1AJ/iOZ7O5qcibqdXVokx8jfqxCnp+FxiUqX xqzpnxRV189YVwqjKPhO5b5ClwjfT0rbyhJY/83o31wTWZUaeYq0Xea+BpnFB868GV7Q 9duA== X-Gm-Message-State: APt69E0P8vCjCw4KgKoUgV7sBwCVW/sMYvsrR6FZ0Ggms6jhGqvVfRpJ plZ519C6yBqf3nNRa4i5Uzc9Iw== X-Google-Smtp-Source: AAOMgpf73Uuu7R5sCnOmLrWZ7cKOYQ2eYLmV/Ypx0wAtqQzL/52CdfaYYeWW+UGv/vE8J1cLhQq4Uw== X-Received: by 2002:adf:8610:: with SMTP id 16-v6mr9564520wrv.255.1529925578716; Mon, 25 Jun 2018 04:19:38 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h18-v6sm17824679wrq.36.2018.06.25.04.19.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 104173E08B3; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:27 +0100 Message-Id: <20180625111935.26108-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::233 Subject: [Qemu-devel] [PATCH v1 02/10] travis: test out-of-tree builds 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Force one config to build 'out-of-tree' (object files and executables are created in a tree outside the project source code). Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 134d5331fe..32188d51f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,8 @@ notifications: on_failure: always env: global: + - SRC_DIR="." + - BUILD_DIR="." - TEST_CMD="make check" - MAKEFLAGS="-j3" matrix: @@ -68,11 +70,15 @@ before_install: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libffi gettext glib pixman ; fi - git submodule update --init --recursive capstone dtc ui/keycodemapdb before_script: - - ./configure ${CONFIG} || { cat config.log && exit 1; } + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} + - ${SRC_DIR}/configure ${CONFIG} || { cat config.log && exit 1; } script: - make ${MAKEFLAGS} && ${TEST_CMD} matrix: include: + # Test out-of-tree builds + - env: CONFIG="--enable-debug --enable-debug-tcg" + BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.." # Test with Clang for compile portability (Travis uses clang-5.0) - env: CONFIG="--disable-system" compiler: clang From patchwork Mon Jun 25 11:19:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="RPr9ga0/"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dmtl4wVVz9ry1 for ; Mon, 25 Jun 2018 21:20:31 +1000 (AEST) Received: from localhost ([::1]:45535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPXp-0004yB-3t for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:20:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPX4-0004wm-Io for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX2-0008CS-SV for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:42 -0400 Received: from mail-wr0-x22c.google.com ([2a00:1450:400c:c0c::22c]:38892) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX2-0008C7-MD for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:40 -0400 Received: by mail-wr0-x22c.google.com with SMTP id e18-v6so13263639wrs.5 for ; Mon, 25 Jun 2018 04:19:40 -0700 (PDT) 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=s7NALE73HWatGlnIs6kj6n7zdn41IoOMv+JfEkZG3yc=; b=RPr9ga0/YskNWdafeVQFHbri9LrlxLa3vEUv+l7SBWNWB2vC2TbUvvCbFouxa6K7cC s2Gk1q748ueUgQ0bG+XcD+QicatNLZzdfcPRzsBZQXjuPIGChzqRXTHeoIAoGtNn5R7Y 2Pd9u8MeAY1xqtK8Tovkb7H3Hd7iYaj572608= 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=s7NALE73HWatGlnIs6kj6n7zdn41IoOMv+JfEkZG3yc=; b=AVx23PzXFJu13jk1LDVw8t5RziaEq+ypaIg69ouX4/OW+qhRD6ubn+zd0uK3NNjunD SIht9dZDH8ONX8X6xu+EiNa16V8ZaMS3iFGt7b8bE9AtqXGFkz5899KtWUgdsW6Cfn7M tPR2CgArxsncys1eQLoLfKKVfP6tZc0tpNEx50IImcmlAZZFjsDUgsyIvjRk4VaUY25G qByE+1Ilwm1KwJ+aUQbDAsq+w3C1Rs1I7EY/S6/dv0+6vCVI2BkU8M2fpHJW+pu75SJh GKUUa8tVJ08xwb1EOdrCIFt1jtdx4bh9taAN5zDsSrg0dFSyedR80VTQNR7mpDx2aBhB /EEw== X-Gm-Message-State: APt69E0kMMiJc1Nb/jBvXedaKmh7xHwJCjffeFo920PSJEkst2HFC3Cs U/Jw2QEwDJCDENMjkZ3WFFeSYA== X-Google-Smtp-Source: AAOMgpfUvPg1LooG7wXU80XHSPEGm0zdxLokjQeQIqEfmouKNhwXhHZm/Wqv+W9X22KWH+mlKepJcw== X-Received: by 2002:adf:c546:: with SMTP id s6-v6mr10321534wrf.46.1529925579570; Mon, 25 Jun 2018 04:19:39 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id g125-v6sm3849066wmf.16.2018.06.25.04.19.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 2450E3E08BB; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:28 +0100 Message-Id: <20180625111935.26108-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22c Subject: [Qemu-devel] [PATCH v1 03/10] build-system: remove per-test GCOV reporting 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" I'm not entirely sure who's using this information and certainly in a CI environment it just washes over as additional noise. Later patches will provide new reporting options so a user who wants to analyse individual tests will be able to use that to get the information. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- docs/devel/testing.rst | 11 +++++------ tests/Makefile.include | 10 ---------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index f33e5a8423..66ef219f69 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -158,12 +158,11 @@ rarely used. See "QEMU iotests" section below for more information. 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. There will be additional ``gcov`` output as -the testing goes on, showing the test coverage percentage numbers per analyzed -source file. More detailed reports can be obtained by running ``gcov`` command -on the output files under ``$build_dir/tests/``, please read the ``gcov`` +``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. QEMU iotests diff --git a/tests/Makefile.include b/tests/Makefile.include index e8bb2d8f66..756474814a 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -891,26 +891,16 @@ GCOV_OPTIONS = -n $(if $(V),-f,) .PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS)) $(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: subdir-%-softmmu $(check-qtest-y) - $(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,) $(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \ QTEST_QEMU_IMG=qemu-img$(EXESUF) \ MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$(( $${RANDOM:-0} % 255 + 1))} \ gtester $(GTESTER_OPTIONS) -m=$(SPEED) $(check-qtest-$*-y) $(check-qtest-generic-y),"GTESTER","$@") - $(if $(CONFIG_GCOV),@for f in $(gcov-files-$*-y) $(gcov-files-generic-y); do \ - echo Gcov report for $$f:;\ - $(GCOV) $(GCOV_OPTIONS) $$f -o `dirname $$f`; \ - done,) .PHONY: $(patsubst %, check-%, $(check-unit-y) $(check-speed-y)) $(patsubst %, check-%, $(check-unit-y) $(check-speed-y)): check-%: % - $(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,) $(call quiet-command, \ MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$(( $${RANDOM:-0} % 255 + 1))} \ gtester $(GTESTER_OPTIONS) -m=$(SPEED) $*,"GTESTER","$*") - $(if $(CONFIG_GCOV),@for f in $(gcov-files-$(subst tests/,,$*)-y) $(gcov-files-generic-y); do \ - echo Gcov report for $$f:;\ - $(GCOV) $(GCOV_OPTIONS) $$f -o `dirname $$f`; \ - done,) # gtester tests with XML output From patchwork Mon Jun 25 11:19:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934185 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="VZTQOF/K"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dmx85HjVz9ry1 for ; Mon, 25 Jun 2018 21:22:36 +1000 (AEST) Received: from localhost ([::1]:45549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPZq-0006a3-9h for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:22:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPX4-0004wv-OR for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX3-0008Cs-SX for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:42 -0400 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:33530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX3-0008CW-Lu for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:41 -0400 Received: by mail-wm0-x233.google.com with SMTP id z6-v6so12195666wma.0 for ; Mon, 25 Jun 2018 04:19:41 -0700 (PDT) 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=UIli2Sjx6i3lnP9h6NdvG6IXvB3yV4Wc0epB/Hqh6DA=; b=VZTQOF/KEWh8cLlRHF3LCgs1C3H2SdQFpMY971oJEGR6f9RWgEiuFoGIGty5Iv1fpc 4Z9pNWuK36TUhVE/26P9JiVK0b9gQMxNxJTNggXkUyjTrttIRLTYVUQEj4GEqBT+Jrdw M8GfnlkmQUFi4Io1IOwJVk5adJkKX2GfNOGPE= 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=UIli2Sjx6i3lnP9h6NdvG6IXvB3yV4Wc0epB/Hqh6DA=; b=AvFbhfTlGQTahEf21UYDMSS+0gWqmvn9p/k0vfXISh/lHauGJmYKwImVFo9eX0sPYh /ycIOtUs3z3HadVYI1G9bxHW3WX50OctrqAWYzeB1XY57phZR47KVkncOIclGd/K7Stn 3FrBFnD3xAK/v9EpiFeltq+ZX2IJVht3D57OM+Pr9FZfCUcY24HFDyT9kcOhsxkZ1v/X +OFDG+ptZHuvT+RVbVZ+jZ5jGIEjwROenBp+zd840HA9uP1b7WlEJD+QueNYZUukEfTN Jt4dzyE3zyQnPnIyoDgibAWikuKIBN1zK6adwXa/yEU+sr8KgZZ5kMEUMGxcJ7Gk2Jy2 Ah/w== X-Gm-Message-State: APt69E0TV9wsYZlER2fEZPdr/NXBf/hicQZSRmO2IUYg2HN0BcMd+Nt4 +y2J1AXHxZCg34TnnsCiLK6Bxw== X-Google-Smtp-Source: ADUXVKK5UA+XNsqAmr9KIXxLXAI+1C2ws8hXZILAgs08Z+D1OnsdMUesLPXgFAS8GoI3srPoa7Du1w== X-Received: by 2002:a1c:1286:: with SMTP id 128-v6mr704955wms.9.1529925580564; Mon, 25 Jun 2018 04:19:40 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l84-v6sm11517774wmi.3.2018.06.25.04.19.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 365453E08C1; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:29 +0100 Message-Id: <20180625111935.26108-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 Subject: [Qemu-devel] [PATCH v1 04/10] .gitignore: add .gcov files 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" These are temporary files generated on gcov runs and shouldn't be included in the source tree. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9da3b3e626..5668d02782 100644 --- a/.gitignore +++ b/.gitignore @@ -155,6 +155,7 @@ .sdk *.gcda *.gcno +*.gcov /pc-bios/bios-pq/status /pc-bios/vgabios-pq/status /pc-bios/optionrom/linuxboot.asm From patchwork Mon Jun 25 11:19:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LC3vZSIq"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dn4Z5LNRz9ry1 for ; Mon, 25 Jun 2018 21:29:02 +1000 (AEST) Received: from localhost ([::1]:45580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPg4-00032l-Bo for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:29:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPX6-0004yG-Sl for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX5-0008E3-UD for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:44 -0400 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:50965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX5-0008DU-NV for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:43 -0400 Received: by mail-wm0-x22f.google.com with SMTP id e16-v6so8803756wmd.0 for ; Mon, 25 Jun 2018 04:19:43 -0700 (PDT) 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=urOX2ozAeqs2hUAF46n1vdz9jMqiX2S10hyykG27X80=; b=LC3vZSIqGgLWo5VkDEBG1MGZCSVWXuegPyg4nNZRSILHFSxF+Lu29YrYQDE3Ivc5FX KyctN4qBbs2FYA5kxLH7LQkAc0L76eDiX2cZ1UkHOIOv3x7dcJmk0ZbvMXVDDnL/EOvr LORO76OEr21L68WnEheCBGqykd8SQV2yiH8Bg= 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=urOX2ozAeqs2hUAF46n1vdz9jMqiX2S10hyykG27X80=; b=e6GBCaWvWUdQPUZ46Fyc7OF82n9cBd/B6qtHcAwVF2+xWrHGQTbrdtk0mPFzPCJ+lj fZhXuxuRdbC0m2y2n9bsTgcTrEXEDMr/6C15xsPg+3EL4xhO6PrxQ9kWzYYLqvT9saNj PbIOBaBIF4elvmhlEM02wgX8PvfpYoxUQMQJNPrwnnp973YvXVb1UE7EHe9XMND+m1SX 7DTe1nB1rKkcXmlPeYYruKIN0YyVw/LHqG9N+3g399FH+WWr87L3j/XsvTVhzPfd/+5u oFczZRC3Ycjrd/eczhP2vNwsqAqKzeQPkk4wlJHPhcQ8rAXINcVB55At1MDpxaMIQoLd STZg== X-Gm-Message-State: APt69E07m0R0eTRHbNvQwucoLID3VNJqs/x+j06f9B7BzRbdWr7oeshZ PzCt15bD5jHjHkdjKYw6czNuQA== X-Google-Smtp-Source: ADUXVKLbE5N9PCEy6PQ6qWhLUPOiH5B4xPfc7kB8qN2mKWtPfX9zw2gDVBGTqrzy5v2S8l5PaJrHuw== X-Received: by 2002:a1c:978f:: with SMTP id z137-v6mr733238wmd.40.1529925582647; Mon, 25 Jun 2018 04:19:42 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l7-v6sm6112344wmh.1.2018.06.25.04.19.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:40 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 493603E08E5; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:30 +0100 Message-Id: <20180625111935.26108-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22f Subject: [Qemu-devel] [PATCH v1 05/10] docker: add gcovr to travis image 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Useful for debugging if nothing else as the gcovr on the Travis images are a little old. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- tests/docker/dockerfiles/travis.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/travis.docker b/tests/docker/dockerfiles/travis.docker index c5ad39b533..03ebfb0ef2 100644 --- a/tests/docker/dockerfiles/travis.docker +++ b/tests/docker/dockerfiles/travis.docker @@ -5,7 +5,7 @@ ENV LC_ALL en_US.UTF-8 RUN cat /etc/apt/sources.list | sed "s/# deb-src/deb-src/" >> /etc/apt/sources.list RUN apt-get update RUN apt-get -y build-dep qemu -RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools +RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools gcovr # Travis tools require PhantomJS / Neo4j / Maven accessible # in their PATH (QEMU build won't access them). ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin From patchwork Mon Jun 25 11:19:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="PtEjpB1G"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dn2T4Dttz9ry1 for ; Mon, 25 Jun 2018 21:27:13 +1000 (AEST) Received: from localhost ([::1]:45574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPeJ-0001rp-7i for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:27:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPX6-0004y1-CW for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX5-0008DY-8d for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:44 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:38944) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX5-0008Cz-1Z for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:43 -0400 Received: by mail-wr0-x229.google.com with SMTP id b8-v6so7833347wro.6 for ; Mon, 25 Jun 2018 04:19:42 -0700 (PDT) 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=yTn5APyxCbjkgEmg6gKUhpchO+isbR681XgDS3c8VS0=; b=PtEjpB1G9yQgf2IrlhgKHmb2H2yB1U7gHLO2zU2SfkE1XVRDDBopheBSUMDldH4Qas C6KDEvMEAtJhCGj+t6Q0VeAZN2OFsOcoRBMxm7RxnPWdZ453QnLc5U2Qaadmd2CfMU2T otxxBmFx3+XJBpCa0ja8krt090MPH1awGGrcw= 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=yTn5APyxCbjkgEmg6gKUhpchO+isbR681XgDS3c8VS0=; b=OZ9PXdi+PRc0ZhSE2LSasY+ax17ROD0Amq4DoVimPcqpm5zdxifBtmebM1BytEsvds qwINCKWI1/ejyzxf8oIdcm2GC3On2GecZZ9s+BYjG0Z0Gorug7bKWbokGMXJlJhoE9hM pvLoJYD/D8CHhys5FWsxOicXtfPitYzgmtM0MFPXqHAeLMsfOkzRnAKdRZuIfnWEYa+7 eryPuRqh4XJT8ZUOFgW2nIoBntrLBe6o0Wp1iJTammaVwz9mBSh7A5szkwSOD4U0ZGmB a+OGs4oduqxlW8Qxnsbj8Rh6QPHrwpVn+EIhsFSctMevXvxvMRHjInQpmAvEITCV1LN2 Xi1w== X-Gm-Message-State: APt69E0Jgz4Wrlj4fTgmwzgtT5957uDae/l0taV04WfPJu3eUMCs7quL Qfcc3z6BAvb2HdxFxEtaX07sAw== X-Google-Smtp-Source: AAOMgpfy2lYvSEpF879KlZhtgpaFgL1pPZTyxOFYuZ2BSYO3zXAh4SfZg7DrbYImMpjm5TxrirwCHw== X-Received: by 2002:adf:8307:: with SMTP id 7-v6mr1502920wrd.243.1529925581936; Mon, 25 Jun 2018 04:19:41 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r2-v6sm12453780wmb.39.2018.06.25.04.19.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:40 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 5D00A3E0930; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:31 +0100 Message-Id: <20180625111935.26108-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 Subject: [Qemu-devel] [PATCH v1 06/10] travis: add gcovr summary for GCOV build 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This gives a more useful summary, sorted by descending % coverage, after the tests have run. The final numbers will give an idea if our coverage is getting better or worse. To keep the width sane we need to post process the file that the old gcovr tool generates. This is done with a mix of sed, awk and column in the scripts/coverage-summary.sh script. As quite a lot of lines don't get covered at all we filter out all the 0% lines. If the file doesn't appear it is not being exercised. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé --- v2 - pushed finagling into scripts/coverage-summary.sh - dropped r-b as a big change --- .travis.yml | 3 +++ scripts/coverage-summary.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 scripts/coverage-summary.sh diff --git a/.travis.yml b/.travis.yml index 32188d51f1..aa850c913c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,7 @@ addons: - libvte-2.90-dev - sparse - uuid-dev + - gcovr # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu # to prevent IRC notifications from forks. This was created using: @@ -86,6 +87,8 @@ matrix: compiler: clang # gprof/gcov are GCC features - env: CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" + after_success: + - ${SRC_DIR}/scripts/coverage-summary.sh compiler: gcc # We manually include builds which we disable "make check" for - env: CONFIG="--enable-debug --enable-tcg-interpreter" diff --git a/scripts/coverage-summary.sh b/scripts/coverage-summary.sh new file mode 100755 index 0000000000..d7086cf9ca --- /dev/null +++ b/scripts/coverage-summary.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Author: Alex Bennée +# +# Summerise the state of code coverage with gcovr and tweak the output +# to be more sane on Travis hosts. As we expect to be executed on a +# throw away CI instance we do spam temp files all over the shop. You +# most likely don't want to execute this script but just call gcovr +# directly. See also "make coverage-report" +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. + +# first generate the coverage report +gcovr -p -o raw-report.txt + +# strip the full-path and line markers +sed s@$PWD\/@@ raw-report.txt | sed s/[0-9]\*[,-]//g > simplified.txt + +# reflow lines that got split +awk '/.[ch]$/ { printf("%s", $0); next } 1' simplified.txt > rejoined.txt + +# columnify +column -t rejoined.txt > final.txt + +# and dump, stripping out 0% coverage +grep -v "0%" final.txt From patchwork Mon Jun 25 11:19:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ClJz23Zq"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dn1537sQz9ry1 for ; Mon, 25 Jun 2018 21:26:01 +1000 (AEST) Received: from localhost ([::1]:45570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPd9-0000w5-2G for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:25:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPX9-00050b-5p for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX8-0008F0-20 for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:47 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:35278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX7-0008Ed-Qz for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:45 -0400 Received: by mail-wm0-x241.google.com with SMTP id z137-v6so3834031wmc.0 for ; Mon, 25 Jun 2018 04:19:45 -0700 (PDT) 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=txdQB3q1DKIfwYqsJk0H2tJ1bhsQkySgKF6Cb1qOuuI=; b=ClJz23ZqyOx8FL4iuamvMQNis8dc1aGD8abgQv6NZxfiSC0OFQCKA7tLC1V5yFIbPw WuL8tFJpFbqgVHidWSQOHx0n49OLJpIdXJK84cXOIN+5Ps4mwvZ5L3wHWMi3WHk+emdL fxo6Ab2U7K0sR/5NbzqUMfVhod7bnRvssYoLQ= 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=txdQB3q1DKIfwYqsJk0H2tJ1bhsQkySgKF6Cb1qOuuI=; b=JDgGy5PaGb8+oWhf4A1GdrJsn8fsC9Dta0cyTMbHSXh0wR1yRubsXgyIpvDTi2Zddg t659oQul5B8ajnaY35X0eaksInkLl/58SRMStGPhjBNQLiCDsiGDkcfYMtYelb2sQBNH oOAu0wIXAAuCj1CXbv7Q6ETO6QR7DyQSNbvCd5qB7Aq88rP9USt7YVWpyc5+4gLPtfWu qhonN0lrxd459zb70bEiM97kjKfkGW2UjxOss+BhzZbjbygSfRik/NIoAxmE+xgUij7C htOFei4D6OY85rAeMKRtuFm0epYxG7S/9UwbL0M3XadhEY4DYLQkZ5d6pPeQpIxOl8O7 bqZw== X-Gm-Message-State: APt69E0BXEfMc5T8/kzZJE8vDoyZQOuWNZG13Jv5RV5K7Wje6ChxIYMI eAqSRgDMpSCqmatFiFxG6nZU/w== X-Google-Smtp-Source: ADUXVKIbPmPvMD/0zSkUu631AtYMXkchOvuR5V7yez4nHGVLB3kCSVC7PrlvQ9Uyf50v2fn7QdwvLg== X-Received: by 2002:a1c:d543:: with SMTP id m64-v6mr669393wmg.12.1529925584738; Mon, 25 Jun 2018 04:19:44 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y186-v6sm8585866wmd.38.2018.06.25.04.19.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:41 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 6FCF73E097F; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:32 +0100 Message-Id: <20180625111935.26108-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH v1 07/10] 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Daniel P. Berrangé --- 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_block.py config-host.mak $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ "GEN","$@") +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 gen-op-arm.h @@ -1073,6 +1081,9 @@ endif echo '') @echo 'Cleaning targets:' @echo ' clean - Remove most generated files but keep the config' +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..a3652aea14 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 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. QEMU iotests ============ From patchwork Mon Jun 25 11:19:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934184 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="DQZ7etv8"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dmts5rLhz9ryk for ; Mon, 25 Jun 2018 21:20:37 +1000 (AEST) Received: from localhost ([::1]:45537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPXv-00052y-Az for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:20:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPX8-0004zu-9C for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX7-0008Ec-8H for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:46 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:54095) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX7-0008ED-0e for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:45 -0400 Received: by mail-wm0-x241.google.com with SMTP id x6-v6so8783256wmc.3 for ; Mon, 25 Jun 2018 04:19:44 -0700 (PDT) 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=H+3mJ3nGCOZS7WmX7PPpNKfmukECIPjlNMdaGFjJjhI=; b=DQZ7etv8SSfAr0LsPoezo1E22qBytQQKIthNUla10CLMMB+DhDzhRTPf8AV5pvOl2Z hXJ5WFJrGzaH249X5hJY6QlYGZEvr9ugcACRrPoL8teijZasYDxSR4i8sCmJC7Udmj0Y b21rRWC21AOzF+p9UZVkahT6N7SJnIq0tORUs= 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=H+3mJ3nGCOZS7WmX7PPpNKfmukECIPjlNMdaGFjJjhI=; b=F5n2tRFmZzNIUMyK6a6t04MaIhNO/qIbOeVo6V3baosticUvpDgT1D7wOYt/uN4Lsr Qwb3uu2X8Mc/XfAnAXrl2BHWf/NyAcLwNAV1yoqPHsWwieiJvNCMFQcsNr51ShAPDWly ZYewymkY8q9vC+I+Ws/0ZtytaEfEBmQWYZQKY0V7vqBRjCrGYN5vaa/mRGv6NfwO7zjw dvsJ3Gj080F2hYC7JffXTgL2OtvnAUG61q+PKfLztOJMpTXC7oA/TG4DCGMTpErK2R+F QYYEZVK5IMtrOmWNbivjhgrvQaaK2gfid54PY4vOOn2vjUvFMT8S+fFn8AqBFxIhgLWa 4opw== X-Gm-Message-State: APt69E1xHTZqxryWZ9DGKwWjw8/YN1G30+nNk3/nEUkmjTPsPqJbdeUT Z+x8KjBFPMsm8QYrA3K6sGdzU53u+F8= X-Google-Smtp-Source: AAOMgpfHnmWAcurq0GlpYVDYeoN6zw2UekGuR1PqDOAOZVjQNYrmUNOkAXJ0Mlstgxydd6tPdj67Kw== X-Received: by 2002:a1c:5582:: with SMTP id j124-v6mr666190wmb.153.1529925583940; Mon, 25 Jun 2018 04:19:43 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m65-v6sm10150613wmd.1.2018.06.25.04.19.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:41 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 83F363E0A25; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:33 +0100 Message-Id: <20180625111935.26108-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH v1 08/10] build-system: add coverage-report 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This will build a coverage report under the current directory in reports/coverage. At the users option a report can be generated by directly invoking something like: make foo/bar/coverage-report.html Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- Makefile | 13 +++++++++++++ docs/devel/testing.rst | 11 ++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2b3413a5ba..68af7b5d7c 100644 --- a/Makefile +++ b/Makefile @@ -986,6 +986,16 @@ docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \ docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \ docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi +# Reports/Analysis + +%/coverage-report.html: + @mkdir -p $* + $(call quiet-command,\ + gcovr -p --html --html-details -o $@, \ + "GEN", "coverage-report.html") + +.PHONY: coverage-report +coverage-report: $(CURDIR)/reports/coverage/coverage-report.html ifdef CONFIG_WIN32 @@ -1095,6 +1105,9 @@ endif @echo 'Documentation targets:' @echo ' html info pdf txt' @echo ' - Build documentation in specified format' +ifdef CONFIG_GCOV + @echo ' coverage-report - Create code coverage report' +endif @echo '' ifdef CONFIG_WIN32 @echo 'Windows targets:' diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index a3652aea14..9dcdd19260 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -166,9 +166,14 @@ If you want to gather coverage information on a single test the ``make clean-coverage`` target can be used to 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. +You can generate a HTML coverage report by executing ``make +coverage-report`` which will generate into +./reports/coverage/coverage-report.html. If you want to generate it +elsewhere simply execute ``make /foo/bar/baz/coverage-report.html``. + +Further analysis can be conducted by running the ``gcov`` command +directly on the various .gcda output files. Please read the ``gcov`` +documentation for more information. QEMU iotests ============ From patchwork Mon Jun 25 11:19:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934196 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="T2QRZg3i"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Dn6j29ctz9ry1 for ; Mon, 25 Jun 2018 21:30:53 +1000 (AEST) Received: from localhost ([::1]:45588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPhq-0004Hx-G9 for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:30:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPXA-00052V-Us for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX9-0008Ff-Ol for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:48 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:40445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX9-0008FN-IB for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:47 -0400 Received: by mail-wr0-x244.google.com with SMTP id g18-v6so13254800wro.7 for ; Mon, 25 Jun 2018 04:19:47 -0700 (PDT) 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=8LmrDKoPzfnRy55Xx37Cc/LgWjZWnBFXZ76bEvyVuwY=; b=T2QRZg3igxHdmcCA/km203o/wRadjuzF93Odp07K4WJG5z6DKiHrHVdqRx2WPRkG2D u2OaBzHl6HV3fWq0Ovnc6BWnwdRrA6sMlrOOiXWaIx6gIdkbAVXOZrSc7W/lldkBwaxR oRTn3NvMqKm5Z23gB+TSqWAL4Iszyb4XHzs2E= 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=8LmrDKoPzfnRy55Xx37Cc/LgWjZWnBFXZ76bEvyVuwY=; b=IJitUOgsbZFRcgjD+fXTW8ie/iC6STzq6bR+nfE3c5hjl4NBl6zeVvbUKIKW0VwJhw Ns5a60+gL//65YEyvAlX6EzJBeDId069TkrM3pSbEfiJgo4GT/D0Zyz/i/uiniKFvTaB m6PMdy9hSxaCq0x6/GXCZjlwEiOjIGV/BcRDAm/HxrscIBlOLteCdB/wwMPBnzPkczn7 sb+E8jUGVj/TWBTs3FyYjzSBgqj+bhHD/FVAB2V4LVRoMafGi9FXiaWsEori9K5GhhgI V5G6a6m3DOtGM6kI8FC/kWc63MCiwD2zd8Z3GU5GbEN6NXGHiUnuXewVWJvGKbtFW6mG 8r4g== X-Gm-Message-State: APt69E33SoAk9V3IT1r3Qrb0CHoaEnUYoB8YVsBRrD5J8fIlEUF6s1jI EZS1cEMd3Kwhbuq5fRM0wXSNrg== X-Google-Smtp-Source: AAOMgpfcArkfSeVfejqwcZ2eQKOIshwkiG3xqAihFNvHWJWt9A+WKclvrl3VxNKZwze/R4welzBZZw== X-Received: by 2002:adf:8345:: with SMTP id 63-v6mr398445wrd.37.1529925586450; Mon, 25 Jun 2018 04:19:46 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 132-v6sm16385839wmr.33.2018.06.25.04.19.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:41 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 9A25B3E0AC0; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:34 +0100 Message-Id: <20180625111935.26108-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v1 09/10] linux-user: introduce preexit_cleanup 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: Riku Voipio , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" To avoid repeating ourselves move our preexit clean-up code into a helper function. I figured the continuing effort to split of the syscalls made it worthwhile creating a new file for it now. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Laurent Vivier --- linux-user/Makefile.objs | 2 +- linux-user/exit.c | 28 ++++++++++++++++++++++++++++ linux-user/qemu.h | 8 ++++++++ linux-user/syscall.c | 10 ++-------- 4 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 linux-user/exit.c diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs index 59a5c17354..b5dfb71f25 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs @@ -1,7 +1,7 @@ obj-y = main.o syscall.o strace.o mmap.o signal.o \ elfload.o linuxload.o uaccess.o uname.o \ safe-syscall.o $(TARGET_ABI_DIR)/signal.o \ - $(TARGET_ABI_DIR)/cpu_loop.o + $(TARGET_ABI_DIR)/cpu_loop.o exit.o obj-$(TARGET_HAS_BFLT) += flatload.o obj-$(TARGET_I386) += vm86.o diff --git a/linux-user/exit.c b/linux-user/exit.c new file mode 100644 index 0000000000..aed8713fae --- /dev/null +++ b/linux-user/exit.c @@ -0,0 +1,28 @@ +/* + * exit support for qemu + * + * Copyright (c) 2018 Alex Bennée + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +#include "qemu/osdep.h" +#include "qemu.h" + +void preexit_cleanup(CPUArchState *env, int code) +{ +#ifdef TARGET_GPROF + _mcleanup(); +#endif + gdb_exit(env, code); +} diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 793cd4df04..bb85c81aa4 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -623,6 +623,14 @@ static inline int is_error(abi_long ret) return (abi_ulong)ret >= (abi_ulong)(-4096); } +/** + * preexit_cleanup: housekeeping before the guest exits + * + * env: the CPU state + * code: the exit code + */ +void preexit_cleanup(CPUArchState *env, int code); + /* Include target-specific struct and function definitions; * they may need access to the target-independent structures * above, so include them last. diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2117fb13b4..7c66442357 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8018,10 +8018,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } cpu_list_unlock(); -#ifdef TARGET_GPROF - _mcleanup(); -#endif - gdb_exit(cpu_env, arg1); + preexit_cleanup(cpu_env, arg1); _exit(arg1); ret = 0; /* avoid warning */ break; @@ -10127,10 +10124,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #ifdef __NR_exit_group /* new thread calls */ case TARGET_NR_exit_group: -#ifdef TARGET_GPROF - _mcleanup(); -#endif - gdb_exit(cpu_env, arg1); + preexit_cleanup(cpu_env, arg1); ret = get_errno(exit_group(arg1)); break; #endif From patchwork Mon Jun 25 11:19:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 934190 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CvDeedhS"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41DmyG14fHz9ryk for ; Mon, 25 Jun 2018 21:23:34 +1000 (AEST) Received: from localhost ([::1]:45553 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPal-0007Nv-Oq for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 07:23:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXPXA-00051V-09 for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXPX8-0008FF-Px for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:47 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:36846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXPX8-0008Ev-JC for qemu-devel@nongnu.org; Mon, 25 Jun 2018 07:19:46 -0400 Received: by mail-wr0-x241.google.com with SMTP id f16-v6so13278850wrm.3 for ; Mon, 25 Jun 2018 04:19:46 -0700 (PDT) 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=qxnsKqGFD3kIRmLMiFmytsTCi0xUqUWgfffRSPrwpb8=; b=CvDeedhS0sjaMgy49vyLGWnNFPjzPN3k0indDf3R3oXNYYH0toLKnVabOMCbjWXSRi LJ+yxRZj7A7loFqBrZlpsES+iYQrOUlxy1EBcIZUmg4xCoZuuS/c2STvMMwpgIsbqqsH lhVX3xQbEgYv6yW5z84lMXu8FYuGFRl9aVggw= 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=qxnsKqGFD3kIRmLMiFmytsTCi0xUqUWgfffRSPrwpb8=; b=k67y4oLXMSPPvF7aIA6MTD1AOHu+HxC+BPDi5W0FxctXG4cJTAdI6PyOKkPexMlbip M8oqyXelx6FW6yySwcqaMMsYCH34gxWQvQpXHH9NGwW87ALsFmEjCO6qvRWpjMYp99FV uBEatyU2wx9TEfIoj59IwB196N6p4O9s7ROGeA9ohLff04smDYO4nEyaWOl0ufka6F/h eDWYH1NGtljLFXEwSE9fiZUpY9swjiduS78pigXTFVfQlqtmjmCgBYgJubAJg7DcvpKg IohdMz+jJ//EoJ6X9BsF/ITLzRU5hUwl1mQ/JkBfqJNNzHGFpc3w+EEpcpGSL3m+pOCH ZN+w== X-Gm-Message-State: APt69E1ym7QPloGKHZulfvgKslheSL5XYn/HwkdZ76VNoktGS1dsmZ9b mee0AgSoxjIpzXKfLQgfyX8TKA== X-Google-Smtp-Source: AAOMgpfUfnsJemM3Kcv7t1cENlYk9Ui08aWHeJ9FX7MacBY66NFdYt5WGS2sgHe4R0Wc3Cw6kS6QHg== X-Received: by 2002:adf:8227:: with SMTP id 36-v6mr6469948wrb.144.1529925585527; Mon, 25 Jun 2018 04:19:45 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 12-v6sm10872667wmt.19.2018.06.25.04.19.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 04:19:41 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id ACFDE3E0B02; Mon, 25 Jun 2018 12:19:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=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, 25 Jun 2018 12:19:35 +0100 Message-Id: <20180625111935.26108-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625111935.26108-1-alex.bennee@linaro.org> References: <20180625111935.26108-1-alex.bennee@linaro.org> MIME-Version: 1.0 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 v1 10/10] linux-user: add gcov support to preexit_cleanup 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: Riku Voipio , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" As we don't always take the normal exit path when running a guest we can skip the normal exit destructors where gcov normally dumps it's info. The GCC manual suggests long running programs use __gcov_dump() to flush out the coverage state periodically so we use that here. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- linux-user/exit.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/linux-user/exit.c b/linux-user/exit.c index aed8713fae..14e94e28fa 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -19,10 +19,17 @@ #include "qemu/osdep.h" #include "qemu.h" +#ifdef CONFIG_GCOV +extern void __gcov_dump(void); +#endif + void preexit_cleanup(CPUArchState *env, int code) { #ifdef TARGET_GPROF _mcleanup(); +#endif +#ifdef CONFIG_GCOV + __gcov_dump(); #endif gdb_exit(env, code); }