Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17929889ybl; Thu, 2 Jan 2020 15:02:12 -0800 (PST) X-Google-Smtp-Source: APXvYqyS3oRI0XBzK3ePS2i59rA8RK5x4MzrK14B1M1cUgMAA6dvgp+ArQCh1c5BnCDL4mNLOI4e X-Received: by 2002:a05:6830:121a:: with SMTP id r26mr87491782otp.225.1578006132150; Thu, 02 Jan 2020 15:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006132; cv=none; d=google.com; s=arc-20160816; b=Jf4DiGO/3iqNpgxxV4yvYJQkZc3IlJK5w1sBhFwODfoMV6xam4Dq3qHdPTbLhoa6C4 UAh+BXyTqW1D4XJ5LSEDWrGO0kvzD4c4xrlwtOT+m25nSWBaJ+qGuiDfCtAoxHzCQw37 rpaSTaOUSuOKmoJaOessJZ0bm079w6RGruZczmETEOAuzc7x/1a+GpHOIt5C9hgoOW++ iB93zkyFbzknXpRKiHlLgbiENBfeOpvD2C8G1SqY75YbwE0ousko1uNnVNX9de4E3iae PIHP2YYoYzpEExJXUJsiuq50PoP9qaeQo9Kuq4cXUe2NDmmnR9u2g9LcYy30AUEzubYm IiuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0RwrO1XmkxCTwY1Xaz8DjCIxtICWXlnWnePyIFzQOyg=; b=blyFp9b2Etcf4Y2yZrq7HbS0c6laMz9NMCVFwJLiJ3bDCcpxC4Z4wLYmZ38dTJeJcb 0aJ9B83JyE36+t/e6XDkEe2ffcQrTKZxKl5gc3mhvOeGmIqXaFus+v9P1bbCAYw7/phA 0nEKIqfRawcfPIDgihRy5wt4UKA+BpJJCydu0/W+v3JtWouxO6eteZh6dj2SsvfimKat TUV82Oxi8UFWwh2BPc0zUryEiFpW3MgXG9DhdCTh5BYkRBvUuN8xpdxcGI+flHahEsvo QVl3EC4ZjFAsDPo00ktoUWu/jFwy9OEbIg3m/J73asKsQiBHJAxDWUwqcFUCjQ8FYduO tbnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=h1pGZxu4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6si28839762otp.126.2020.01.02.15.02.00; Thu, 02 Jan 2020 15:02:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=h1pGZxu4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728001AbgABXAt (ORCPT + 99 others); Thu, 2 Jan 2020 18:00:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:51562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727468AbgABWM0 (ORCPT ); Thu, 2 Jan 2020 17:12:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A4C6822314; Thu, 2 Jan 2020 22:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003146; bh=TGGxvAo+S16GT7ah/Ubi13LJFJ8SAp4fVF9vbI6BQ7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h1pGZxu4gwA9h6iHv1I0laEF9TNJoLAH4fZwZsHY891KwxoUEUxLTvP1sf3GGW7Jw R7mVMY/QCMx20u6mW/1+yKANw6Zuu7NwIJjQsbxtB6eFHuhdo5kRP5tpfpYhtf65vM lEJrAmf8kP4ZrrqG67NZKvARrKegmtmietyiC0DQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman , Sasha Levin Subject: [PATCH 5.4 039/191] selftests/powerpc: Skip tm-signal-sigreturn-nt if TM not available Date: Thu, 2 Jan 2020 23:05:21 +0100 Message-Id: <20200102215834.138393477@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Ellerman [ Upstream commit 505127068d9b705a6cf335143239db91bfe7bbe2 ] On systems where TM (Transactional Memory) is disabled the tm-signal-sigreturn-nt test causes a SIGILL: test: tm_signal_sigreturn_nt tags: git_version:7c202575ef63 !! child died by signal 4 failure: tm_signal_sigreturn_nt We should skip the test if TM is not available. Fixes: 34642d70ac7e ("selftests/powerpc: Add checks for transactional sigreturn") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191104233524.24348-1-mpe@ellerman.id.au Signed-off-by: Sasha Levin --- tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c b/tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c index 56fbf9f6bbf3..07c388147b75 100644 --- a/tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c +++ b/tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c @@ -10,10 +10,12 @@ */ #define _GNU_SOURCE +#include #include #include #include "utils.h" +#include "tm.h" void trap_signal_handler(int signo, siginfo_t *si, void *uc) { @@ -29,6 +31,8 @@ int tm_signal_sigreturn_nt(void) { struct sigaction trap_sa; + SKIP_IF(!have_htm()); + trap_sa.sa_flags = SA_SIGINFO; trap_sa.sa_sigaction = trap_signal_handler; -- 2.20.1