From patchwork Mon Feb 29 06:29:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jitindar Singh X-Patchwork-Id: 589702 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F1E4F140307 for ; Mon, 29 Feb 2016 17:31:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Efyb8i33; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id C8AA01A0B66 for ; Mon, 29 Feb 2016 17:31:43 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Efyb8i33; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7EC0B1A005D for ; Mon, 29 Feb 2016 17:30:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Efyb8i33; dkim-atps=neutral Received: by ozlabs.org (Postfix) id 6C054140324; Mon, 29 Feb 2016 17:30:27 +1100 (AEDT) Delivered-To: linuxppc-dev@ozlabs.org Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 00945140307 for ; Mon, 29 Feb 2016 17:30:26 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Efyb8i33; dkim-atps=neutral Received: by mail-pf0-x22d.google.com with SMTP id w128so41620844pfb.2 for ; Sun, 28 Feb 2016 22:30:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=SiowJFT/K/938p5NhJCNLAX7pZhUsdeMh7xep6C4qgM=; b=Efyb8i33pnTxWCLerCFZMg3bB58HDIqzsN6MEx1Es5mOdIQM6vbVIF2F9ckJhbW5mN 9d+8louvCpScJQpFIv3rjMZOqs2mNYkKxEDx3+2A4FLeItSscxshxt7JfQ6pfKSiY6rC 10MHy0pjh3dc2oMA6J7eAM9QtZOkhXSBH58uY54bj+ngRQ+eDMEfAKcvj4CW8Fqv4gYY cD+SpHltNQe3OLiXBdCjOXmd7XFJsv4n/MA13EEfqb6T5yH4fHt4xR7vwyqr+hx/6U/T 9gF4+YvydtxRtJdjGSm1ASZYUV8EWBQFkVPStjOHvuY1yTENZX0is5No5C++Ir4wpieG 5eHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SiowJFT/K/938p5NhJCNLAX7pZhUsdeMh7xep6C4qgM=; b=Zs6BCPRLb2j9YqGQ9C0oYYNMxBht7KU8OxgtXnaW4VaCkPJFg1rX0cIojT5J19DI6b nvb0dm4B1EzC7yFoHJFpXuDRG4d1TR2Qv+ZDaVM1JrXabXsV6mx3XrfGvmiYEbmDf2Uy ToMjcdYdYZgrc8aFL4nQPEEWsqfHP3wWDf08ZgvT2ZfQh/OclyrG3GdQKPTuRyfLvmlE 1Qr6qVDW+G3lmOcHeHrA5+BZz2mgMLVDmxbyYKKWAYkvFvtYj7VrJppc4REhQtYfNOWd kTL+j25pFxlDbI64KWa8QvmNBRJwh88yyWkuEcSQE3IyeoJZJ/49PbJhS7I4lFUukFXk 6eSw== X-Gm-Message-State: AD7BkJL6usAWDag9xpFqI0umHC23Jqgqm3a4d7C8F7/hM49AGA3rpQd3BIbM4qiLqj3AsQ== X-Received: by 10.98.87.211 with SMTP id i80mr19636144pfj.63.1456727423757; Sun, 28 Feb 2016 22:30:23 -0800 (PST) Received: from dyn253.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id ra1sm35081715pab.24.2016.02.28.22.30.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Feb 2016 22:30:23 -0800 (PST) From: Suraj Jitindar Singh To: linuxppc-dev@ozlabs.org Subject: [PATCH] selftests/powerpc: Remove -flto from common CFLAGS Date: Mon, 29 Feb 2016 17:29:55 +1100 Message-Id: <1456727395-27386-1-git-send-email-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.5.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Suraj Jitindar Singh MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" LTO can cause GCC to inline some functions which have attributes set. The act of inlining the functions can lead to GCC forgetting about the attributes which leads to incorrect tests. Notable example being: __attribute__((__target__("no-vsx"))) LTO can also interact strangely with custom assembly functions and cause tests to intermittently fail. Both these cases are hard to detect and require manual inspection of binaries which is unlikely to happen for all tests. Furthermore, LTO optimisations are not necessary for selftests and correctness is paramount and as such it is best to disable LTO. LTO can be enabled on a per test basis. A pseries_le_defconfig kernel on a POWER8 was used to determine that the same subset of selftests pass and fail with and without -flto in the common Makefile. These tests always fail: selftests: per_event_excludes [FAIL] selftests: event_attributes_test [FAIL] selftests: ebb_vs_cpu_event_test [FAIL] selftests: cpu_event_vs_ebb_test [FAIL] selftests: cpu_event_pinned_vs_ebb_test [FAIL] selftests: ipc_unmuxed [FAIL] And the remaining tests PASS. Signed-off-by: Suraj Jitindar Singh Reviewed-by: Cyril Bur --- tools/testing/selftests/powerpc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index 0c2706b..7925a96 100644 --- a/tools/testing/selftests/powerpc/Makefile +++ b/tools/testing/selftests/powerpc/Makefile @@ -8,7 +8,7 @@ ifeq ($(ARCH),powerpc) GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown") -CFLAGS := -Wall -O2 -flto -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR) $(CFLAGS) +CFLAGS := -Wall -O2 -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR) $(CFLAGS) export CFLAGS