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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECFE3C3F68F for ; Mon, 10 Feb 2020 22:18:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C314420838 for ; Mon, 10 Feb 2020 22:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727546AbgBJWSF (ORCPT ); Mon, 10 Feb 2020 17:18:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:44352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727254AbgBJWSE (ORCPT ); Mon, 10 Feb 2020 17:18:04 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 2B5CE2072C; Mon, 10 Feb 2020 22:18:03 +0000 (UTC) Date: Mon, 10 Feb 2020 17:18:01 -0500 From: Steven Rostedt To: Masami Hiramatsu Cc: Alan Maguire , shuah@kernel.org, mingo@redhat.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, naveen.n.rao@linux.vnet.ibm.com, colin.king@canonical.com Subject: Re: [PATCH 1/2] ftrace/selftests: workaround cgroup RT scheduling issues Message-ID: <20200210171801.521e5faa@gandalf.local.home> In-Reply-To: <20200207151456.4177c8974b779a45520b93d7@kernel.org> References: <1581001760-29831-1-git-send-email-alan.maguire@oracle.com> <1581001760-29831-2-git-send-email-alan.maguire@oracle.com> <20200207151456.4177c8974b779a45520b93d7@kernel.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 7 Feb 2020 15:14:56 +0900 Masami Hiramatsu wrote: > On Thu, 6 Feb 2020 15:09:19 +0000 > Alan Maguire wrote: > > > wakeup_rt.tc and wakeup.tc tests in tracers/ subdirectory > > fail due to the chrt command returning: > > > > chrt: failed to set pid 0's policy: Operation not permitted. > > > > To work around this, temporarily disable grout RT scheduling > > during ftracetest execution. Restore original value on > > test run completion. With these changes in place, both > > tests consistently pass. > > OK, this looks good to me. > > Acked-by: Masami Hiramatsu > > Thanks! > > > > > Fixes: c575dea2c1a5 ("selftests/ftrace: Add wakeup_rt tracer testcase") > > Fixes: c1edd060b413 ("selftests/ftrace: Add wakeup tracer testcase") > > Signed-off-by: Alan Maguire > > --- > > tools/testing/selftests/ftrace/ftracetest | 23 +++++++++++++++++++++++ > > 1 file changed, 23 insertions(+) > > > > diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest > > index 063ecb2..3207bbf 100755 > > --- a/tools/testing/selftests/ftrace/ftracetest > > +++ b/tools/testing/selftests/ftrace/ftracetest > > @@ -29,8 +29,26 @@ err_ret=1 > > # kselftest skip code is 4 > > err_skip=4 > > > > +# cgroup RT scheduling prevents chrt commands from succeeding, which > > +# induces failures in test wakeup tests. Disable for the duration of > > +# the tests. > > +sched_rt_runtime=$(sysctl -n kernel.sched_rt_runtime_us) > > OK, but can you ?? Masami? -- Steve > > > + > > +set_sysctl() { > > + sysctl -qw ${1}=${2} >/dev/null 2>&1 > > +} > > +