public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: chrubis@suse.com, pvorel@suse.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] sched: add sched sysctl sanity test
Date: Tue, 9 Jan 2024 20:24:44 +0100	[thread overview]
Message-ID: <20240109192444.GA1670891@pevik> (raw)
In-Reply-To: <20231031125114.5879-1-chrubis@suse.cz>

Hi Cyril,

It looks like the second fix 079be8fc6309 ("sched/rt: Disallow writing invalid
values to sched_rt_period_us") is not in stable, shouldn't be there?

> Currently the test fails due to kernel bug, I will send patch to LKML
> later on.

> The problem with kernel is that sysctl_sched_rt_period is unsigned int
> but it's processed with proc_dointvec() which means that you are allowed
> to write negative values into the variable even though documentation
> says it shouldn't be possible and the kernel code asserts that rt_period
> is > 0.

> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> ---

> - Fixed a few whitespaces
> - Added second kernel commit into metadata
nit: metadata of the git commit looks ugly, but we would need to agree on better
solution.

>  runtest/sched                                 |   2 +
>  testcases/kernel/sched/sysctl/.gitignore      |   1 +
>  testcases/kernel/sched/sysctl/Makefile        |   7 +
>  .../kernel/sched/sysctl/proc_sched_rt01.c     | 122 ++++++++++++++++++
>  4 files changed, 132 insertions(+)
>  create mode 100644 testcases/kernel/sched/sysctl/.gitignore
>  create mode 100644 testcases/kernel/sched/sysctl/Makefile
>  create mode 100644 testcases/kernel/sched/sysctl/proc_sched_rt01.c

> diff --git a/runtest/sched b/runtest/sched
> index 172fe4174..3457114f4 100644
> --- a/runtest/sched
> +++ b/runtest/sched
> @@ -16,3 +16,5 @@ sched_cli_serv run_sched_cliserv.sh
>  sched_stress sched_stress.sh

>  autogroup01 autogroup01
> +
> +proc_sched_rt01

This should obviously be:
proc_sched_rt01 proc_sched_rt01

And I would move it above sched_stress.sh.

The rest LGTM, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2024-01-09 19:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 12:51 [LTP] [PATCH v2] sched: add sched sysctl sanity test Cyril Hrubis
2023-10-31 13:08 ` Cyril Hrubis
2023-12-08 15:21 ` Cyril Hrubis
2024-01-09 19:24 ` Petr Vorel [this message]
2024-01-10 11:00   ` Cyril Hrubis
2024-01-10 12:26     ` Petr Vorel
2024-01-17 13:22   ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240109192444.GA1670891@pevik \
    --to=petr.vorel@gmail.com \
    --cc=chrubis@suse.com \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox