All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] sched_rr_get_interval01 depends on particular CONFIG_HZ value
Date: Tue, 18 Jul 2023 16:04:12 +0200	[thread overview]
Message-ID: <ZLab3JV7ECyGIccZ@yuki> (raw)
In-Reply-To: <ZLaYMAkKxMK3h7mC@yuki>

Hi!
> > sched_rr_get_interval01.c depends on particular CONFIG_HZ value.
> > Recent change in openSUSE kernel from the default 250 to 300 breaks it:
> > 
> > sched_rr_get_interval01.c:57: TPASS: sched_rr_get_interval() passed
> > sched_rr_get_interval01.c:64: TPASS: Time quantum 0s 99999990ns
> > sched_rr_get_interval01.c:72: TFAIL: /proc/sys/kernel/sched_rr_timeslice_ms != 100 got 90
> > sched_rr_get_interval01.c:57: TPASS: sched_rr_get_interval() passed
> > sched_rr_get_interval01.c:64: TPASS: Time quantum 0s 99999990ns
> > sched_rr_get_interval01.c:72: TFAIL: /proc/sys/kernel/sched_rr_timeslice_ms != 100 got 90
> > 
> > According to kernel/Kconfig.hz CONFIG_HZ can have various values (100, 250, 300,
> > 1000). Should we adapt the test to expect any of these? Or should we require
> > kernel config to read CONFIG_HZ value and check for correct value?
> 
> We had the same problem with getrusage04.c, see the
> guess_timer_resolution() function there.

However in the case of sched_rr_get_interval() both values are supposed
to be in seconds. The sched_rr_get_interval() fills in a timespec and
the proc file is in miliseconds. As far as I can tell we actually
compare apples to apples in the test and not oranges and apples.

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2023-07-18 14:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 11:40 [LTP] sched_rr_get_interval01 depends on particular CONFIG_HZ value Petr Vorel
2023-07-18 13:48 ` Cyril Hrubis
2023-07-18 14:04   ` Cyril Hrubis [this message]
2023-07-18 14:37     ` Cyril Hrubis
2023-07-19  9:28       ` Jiri Bohac

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=ZLab3JV7ECyGIccZ@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.