From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4096EC433EF for ; Thu, 9 Dec 2021 13:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J03bYxeXxKHGhPknP1TKt/O+k1Do00wLghfvmu6ZEvM=; b=ynj+w/Df5mUobQ sNrYcwiA/eFp/s00+ylYx4VqXSl08nw8UorcWOTuhddY0CAzEfkhpbpQ7OKOKQis6bPOJdEn7+/EU DksKm5mI5hHr2+QezzCuyPhdypn62zp3LAW0FKMsD1MWo7cqylcgTWO32Cn8tyyLDjcsv3saf5Vdn 3vGiqwwfuH/tXfG0pswgEp4GBmDCTS2QOR4d4bfSWoGNX18mGQIEgIqHyOAiprN/nETtV4d73AKJi cfDS67H8uPMC0hZOAIz3/aI6nfvtFKqbhZHMyVqnMjyqQWYNmvjF6M8iVQTsKXNABXpcqLd+aVTpK AFyPaN1ndArdCdeQ39DQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvJdv-00G8dF-Vb; Thu, 09 Dec 2021 13:39:28 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvJds-00G8bt-3S for linux-arm-kernel@lists.infradead.org; Thu, 09 Dec 2021 13:39:25 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B1C54CE25AF; Thu, 9 Dec 2021 13:39:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07A02C004DD; Thu, 9 Dec 2021 13:39:17 +0000 (UTC) Date: Thu, 9 Dec 2021 13:39:14 +0000 From: Catalin Marinas To: Mark Brown Cc: Will Deacon , Shuah Khan , Shuah Khan , Alan Hayward , Luis Machado , Salil Akerkar , Basant Kumar Dwivedi , Szabolcs Nagy , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v6 05/37] kselftest/arm64: Allow signal tests to trigger from a function Message-ID: References: <20211115152835.3212149-1-broonie@kernel.org> <20211115152835.3212149-6-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211115152835.3212149-6-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211209_053924_378854_70422166 X-CRM114-Status: GOOD ( 22.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 15, 2021 at 03:28:03PM +0000, Mark Brown wrote: > Currently we have the facility to specify custom code to trigger a signal > but none of the tests use it and for some reason the framework requires us > to also specify a signal to send as a trigger in order to make use of a > custom trigger. This doesn't seem to make much sense, instead allow the > use of a custom trigger function without specifying a signal to inject. > > Signed-off-by: Mark Brown > --- > tools/testing/selftests/arm64/signal/test_signals_utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.c b/tools/testing/selftests/arm64/signal/test_signals_utils.c > index 22722abc9dfa..8bb12be87a51 100644 > --- a/tools/testing/selftests/arm64/signal/test_signals_utils.c > +++ b/tools/testing/selftests/arm64/signal/test_signals_utils.c > @@ -310,7 +310,7 @@ int test_setup(struct tdescr *td) > > int test_run(struct tdescr *td) > { > - if (td->sig_trig) { > + if (td->sig_trig || td->trigger) { > if (td->trigger) > return td->trigger(td); > else I think we can write this with even less indentation: int test_run(struct tdescr *td) { if (td->trigger) return td->trigger(td); else if (td->sig_trig) return default_trigger(td); return td->run(td, NULL, NULL); } -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel