From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: Re: [RFC PATCH for 4.15 14/14] Restartable sequences: Provide self-tests Date: Tue, 17 Oct 2017 13:50:35 +0000 (UTC) Message-ID: <1916073216.42952.1508248235963.JavaMail.zimbra@efficios.com> References: <20171012230326.19984-1-mathieu.desnoyers@efficios.com> <20171012230326.19984-15-mathieu.desnoyers@efficios.com> <871sm3n6sy.fsf@concordia.ellerman.id.au> <399058130.42156.1508163782335.JavaMail.zimbra@efficios.com> <87a80qjbyn.fsf@concordia.ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87a80qjbyn.fsf@concordia.ellerman.id.au> Sender: linux-kernel-owner@vger.kernel.org To: Michael Ellerman Cc: "Paul E. McKenney" , Boqun Feng , Peter Zijlstra , Paul Turner , Andrew Hunter , Andy Lutomirski , Dave Watson , Josh Triplett , Will Deacon , linux-kernel , Russell King , Catalin Marinas , Thomas Gleixner , Andi Kleen , Chris Lameter , Ingo Molnar , "H. Peter Anvin" , Ben Maurer , rostedt , Linus Torvalds , Andrew Morton List-Id: linux-api@vger.kernel.org ----- On Oct 17, 2017, at 6:38 AM, Michael Ellerman mpe@ellerman.id.au wrote: > Mathieu Desnoyers writes: > >> ----- On Oct 15, 2017, at 10:51 PM, Michael Ellerman mpe@ellerman.id.au wrote: >> >>> Mathieu Desnoyers writes: >>> >>>> Implements two basic tests of RSEQ functionality, and one more >>>> exhaustive parameterizable test. >>>> >>>> The first, "basic_test" only asserts that RSEQ works moderately >>>> correctly. >>>> E.g. that: >>>> - The CPUID pointer works >>>> - Code infinitely looping within a critical section will eventually be >>>> interrupted. >>>> - Critical sections are interrupted by signals. >>>> >>>> "basic_percpu_ops_test" is a slightly more "realistic" variant, >>>> implementing a few simple per-cpu operations and testing their >>>> correctness. >>>> >>>> "param_test" is a parametrizable restartable sequences test. See >>>> the "--help" output for usage. >>> >>> Thanks for providing selftests :) >>> >>> The Makefiles could use a little clean up: >>> - cpu-opv doesn't need libpthread >>> - you don't need to define your own rule just for building >>> - use TEST_GEN_PROGS to hook into the right parts of lib.mk >>> - .. which means you can use the clean rule in lib.mk >>> >>> >>> I notice you didn't add rseq or cpu-opv to the list of TARGETS in >>> tools/testing/selftests/Makefile, was that deliberate? >> >> No, I think I just copied some other selftest which perhaps did >> not have those rules back then. > > OK. I don't see why these tests shouldn't be part of the default test > run, so here's a patch to add them. Perfect, folded that change into my series as well. Thanks! Mathieu > > cheers > > > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile > index ff805643b5f7..b79ef5915c74 100644 > --- a/tools/testing/selftests/Makefile > +++ b/tools/testing/selftests/Makefile > @@ -3,6 +3,7 @@ TARGETS += breakpoints > TARGETS += capabilities > TARGETS += cpufreq > TARGETS += cpu-hotplug > +TARGETS += cpu-opv > TARGETS += efivarfs > TARGETS += exec > TARGETS += firmware > @@ -23,6 +24,7 @@ TARGETS += nsfs > TARGETS += powerpc > TARGETS += pstore > TARGETS += ptrace > +TARGETS += rseq > TARGETS += seccomp > TARGETS += sigaltstack > TARGETS += size -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762424AbdJQNsm (ORCPT ); Tue, 17 Oct 2017 09:48:42 -0400 Received: from mail.efficios.com ([167.114.142.141]:46473 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762403AbdJQNsh (ORCPT ); Tue, 17 Oct 2017 09:48:37 -0400 Date: Tue, 17 Oct 2017 13:50:35 +0000 (UTC) From: Mathieu Desnoyers To: Michael Ellerman Cc: "Paul E. McKenney" , Boqun Feng , Peter Zijlstra , Paul Turner , Andrew Hunter , Andy Lutomirski , Dave Watson , Josh Triplett , Will Deacon , linux-kernel , Russell King , Catalin Marinas , Thomas Gleixner , Andi Kleen , Chris Lameter , Ingo Molnar , "H. Peter Anvin" , Ben Maurer , rostedt , Linus Torvalds , Andrew Morton , shuah , linux-kselftest , linux-api Message-ID: <1916073216.42952.1508248235963.JavaMail.zimbra@efficios.com> In-Reply-To: <87a80qjbyn.fsf@concordia.ellerman.id.au> References: <20171012230326.19984-1-mathieu.desnoyers@efficios.com> <20171012230326.19984-15-mathieu.desnoyers@efficios.com> <871sm3n6sy.fsf@concordia.ellerman.id.au> <399058130.42156.1508163782335.JavaMail.zimbra@efficios.com> <87a80qjbyn.fsf@concordia.ellerman.id.au> Subject: Re: [RFC PATCH for 4.15 14/14] Restartable sequences: Provide self-tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.141] X-Mailer: Zimbra 8.7.11_GA_1854 (ZimbraWebClient - FF52 (Linux)/8.7.11_GA_1854) Thread-Topic: Restartable sequences: Provide self-tests Thread-Index: /wiiTPbPgGS7WeJZ5Ja04s4CRBsXcA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Oct 17, 2017, at 6:38 AM, Michael Ellerman mpe@ellerman.id.au wrote: > Mathieu Desnoyers writes: > >> ----- On Oct 15, 2017, at 10:51 PM, Michael Ellerman mpe@ellerman.id.au wrote: >> >>> Mathieu Desnoyers writes: >>> >>>> Implements two basic tests of RSEQ functionality, and one more >>>> exhaustive parameterizable test. >>>> >>>> The first, "basic_test" only asserts that RSEQ works moderately >>>> correctly. >>>> E.g. that: >>>> - The CPUID pointer works >>>> - Code infinitely looping within a critical section will eventually be >>>> interrupted. >>>> - Critical sections are interrupted by signals. >>>> >>>> "basic_percpu_ops_test" is a slightly more "realistic" variant, >>>> implementing a few simple per-cpu operations and testing their >>>> correctness. >>>> >>>> "param_test" is a parametrizable restartable sequences test. See >>>> the "--help" output for usage. >>> >>> Thanks for providing selftests :) >>> >>> The Makefiles could use a little clean up: >>> - cpu-opv doesn't need libpthread >>> - you don't need to define your own rule just for building >>> - use TEST_GEN_PROGS to hook into the right parts of lib.mk >>> - .. which means you can use the clean rule in lib.mk >>> >>> >>> I notice you didn't add rseq or cpu-opv to the list of TARGETS in >>> tools/testing/selftests/Makefile, was that deliberate? >> >> No, I think I just copied some other selftest which perhaps did >> not have those rules back then. > > OK. I don't see why these tests shouldn't be part of the default test > run, so here's a patch to add them. Perfect, folded that change into my series as well. Thanks! Mathieu > > cheers > > > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile > index ff805643b5f7..b79ef5915c74 100644 > --- a/tools/testing/selftests/Makefile > +++ b/tools/testing/selftests/Makefile > @@ -3,6 +3,7 @@ TARGETS += breakpoints > TARGETS += capabilities > TARGETS += cpufreq > TARGETS += cpu-hotplug > +TARGETS += cpu-opv > TARGETS += efivarfs > TARGETS += exec > TARGETS += firmware > @@ -23,6 +24,7 @@ TARGETS += nsfs > TARGETS += powerpc > TARGETS += pstore > TARGETS += ptrace > +TARGETS += rseq > TARGETS += seccomp > TARGETS += sigaltstack > TARGETS += size -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com