All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] sched_setparam{02,03} failures on 3.14 and newer kernels
@ 2014-07-03 16:36 Jeffrey Bastian
  2014-07-03 17:28 ` chrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey Bastian @ 2014-07-03 16:36 UTC (permalink / raw)
  To: ltp-list

I'm getting failures with the sched_setparam02 and sched_setparam03 tests on
the 3.14 and 3.15 kernels in Fedora that did not happen on 3.13.  Did something
change in the upstream kernel?  Do the tests need to be updated?


3.13 passes:
===============================================================================
[root@localhost bin]# uname -r
3.13.8-200.fc20.x86_64
[root@localhost bin]# ./sched_setparam02
sched_setparam02    1  TPASS  :  Test with policy SCHED_FIFO Passed
sched_setparam02    2  TPASS  :  Test with policy SCHED_RR Passed
sched_setparam02    3  TPASS  :  Test with SCHED_OTHER Passed
[root@localhost bin]# ./sched_setparam03
sched_setparam03    1  TPASS  :  Test Passed
===============================================================================

3.14 fails:
===============================================================================
[root@localhost bin]# uname -r
3.14.9-200.fc20.x86_64
[root@localhost bin]# ./sched_setparam02
sched_setparam02    0  TWARN  :  sched_getparam() returned priority value as 0
sched_setparam02    1  TFAIL  :  Test with policy SCHED_FIFO Failed.
                   sched_setparam() returned 0: TEST_ERRNO=SUCCESS(0): Success
sched_setparam02    0  TWARN  :  sched_getparam() returned priority value as 0
sched_setparam02    2  TFAIL  :  Test with policy SCHED_RR Failed.
                   sched_setparam() returned 0: TEST_ERRNO=SUCCESS(0): Success
sched_setparam02    3  TPASS  :  Test with SCHED_OTHER Passed
[root@localhost bin]# ./sched_setparam03
sched_setparam03    0  TWARN  :  sched_getparam() returned priority value as 0
sched_setparam03    1  TFAIL  :  Test Failed
===============================================================================

3.15 also fails:
===============================================================================
[root@localhost bin]# uname -r
3.15.3-200.fc20.x86_64
[root@localhost bin]# ./sched_setparam02
sched_setparam02    0  TWARN  :  sched_getparam() returned priority value as 0
sched_setparam02    1  TFAIL  :  Test with policy SCHED_FIFO Failed.
                   sched_setparam() returned 0: TEST_ERRNO=SUCCESS(0): Success
sched_setparam02    0  TWARN  :  sched_getparam() returned priority value as 0
sched_setparam02    2  TFAIL  :  Test with policy SCHED_RR Failed.
                   sched_setparam() returned 0: TEST_ERRNO=SUCCESS(0): Success
sched_setparam02    3  TPASS  :  Test with SCHED_OTHER Passed
[root@localhost bin]# ./sched_setparam03
sched_setparam03    0  TWARN  :  sched_getparam() returned priority value as 0
sched_setparam03    1  TFAIL  :  Test Failed
===============================================================================


Running it through strace confirms that getparam is not returning the same
value that the test sets with setparam.

3.13 getparam == setparam:
===============================================================================
[root@localhost bin]# uname -r
3.13.8-200.fc20.x86_64
[root@localhost bin]# strace \
    -e trace=sched_setscheduler,sched_setparam,sched_getparam \
    ./sched_setparam02 >/dev/null
sched_setscheduler(0, SCHED_FIFO, { 1 }) = 0
sched_setparam(0, { 5 })                = 0
sched_getparam(0, { 5 })                = 0
sched_setscheduler(0, SCHED_RR, { 1 })  = 0
sched_setparam(0, { 5 })                = 0
sched_getparam(0, { 5 })                = 0
sched_setscheduler(0, SCHED_OTHER, { 0 }) = 0
sched_setparam(0, { 0 })                = 0
sched_getparam(0, { 0 })                = 0
+++ exited with 0 +++
===============================================================================

3.14 getparam != setparam:
===============================================================================
[root@localhost bin]# uname -r
3.14.9-200.fc20.x86_64
[root@localhost bin]# strace \
    -e trace=sched_setscheduler,sched_setparam,sched_getparam \
    ./sched_setparam02 >/dev/null
sched_setscheduler(0, SCHED_FIFO, { 1 }) = 0
sched_setparam(0, { 5 })                = 0
sched_getparam(0, { 0 })                = 0
sched_setscheduler(0, SCHED_RR, { 1 })  = 0
sched_setparam(0, { 5 })                = 0
sched_getparam(0, { 0 })                = 0
sched_setscheduler(0, SCHED_OTHER, { 0 }) = 0
sched_setparam(0, { 0 })                = 0
sched_getparam(0, { 0 })                = 0
+++ exited with 5 +++
===============================================================================

3.15 getparam != setparam:
===============================================================================
[root@localhost bin]# uname -r
3.15.3-200.fc20.x86_64
[root@localhost bin]# strace \
    -e trace=sched_setscheduler,sched_setparam,sched_getparam \
    ./sched_setparam02 >/dev/null
sched_setscheduler(0, SCHED_FIFO, { 1 }) = 0
sched_setparam(0, { 5 })                = 0
sched_getparam(0, { 0 })                = 0
sched_setscheduler(0, SCHED_RR, { 1 })  = 0
sched_setparam(0, { 5 })                = 0
sched_getparam(0, { 0 })                = 0
sched_setscheduler(0, SCHED_OTHER, { 0 }) = 0
sched_setparam(0, { 0 })                = 0
sched_getparam(0, { 0 })                = 0
+++ exited with 5 +++
===============================================================================

--
Jeff

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] sched_setparam{02,03} failures on 3.14 and newer kernels
  2014-07-03 16:36 [LTP] sched_setparam{02,03} failures on 3.14 and newer kernels Jeffrey Bastian
@ 2014-07-03 17:28 ` chrubis
  2014-07-23 14:11   ` Jeffrey Bastian
  0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2014-07-03 17:28 UTC (permalink / raw)
  To: ltp-list

Hi!
> I'm getting failures with the sched_setparam02 and sched_setparam03 tests on
> the 3.14 and 3.15 kernels in Fedora that did not happen on 3.13.  Did something
> change in the upstream kernel?  Do the tests need to be updated?

The testcases are bit messy but there doesn't seem to be anything wrong
with them.

And it seems to work fine for me with 3.14.0 vanilla kernel, but does
not work with older 3.11 based distribution kernel (possibly some patch
got backported there).

> 3.14 getparam != setparam:
> ===============================================================================
> [root@localhost bin]# uname -r
> 3.14.9-200.fc20.x86_64
> [root@localhost bin]# strace \
>     -e trace=sched_setscheduler,sched_setparam,sched_getparam \
>     ./sched_setparam02 >/dev/null
> sched_setscheduler(0, SCHED_FIFO, { 1 }) = 0
> sched_setparam(0, { 5 })                = 0
> sched_getparam(0, { 0 })                = 0
> sched_setscheduler(0, SCHED_RR, { 1 })  = 0
> sched_setparam(0, { 5 })                = 0
> sched_getparam(0, { 0 })                = 0
> sched_setscheduler(0, SCHED_OTHER, { 0 }) = 0
> sched_setparam(0, { 0 })                = 0
> sched_getparam(0, { 0 })                = 0
> +++ exited with 5 +++
> ===============================================================================

The man 7 sched suggests that SCHED_FIFO and SCHED_RR priority must be >
0 at all times. So I guess that this is a bug and we need to find the
patch that changed the kernel behavior.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] sched_setparam{02,03} failures on 3.14 and newer kernels
  2014-07-03 17:28 ` chrubis
@ 2014-07-23 14:11   ` Jeffrey Bastian
  0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey Bastian @ 2014-07-23 14:11 UTC (permalink / raw)
  To: ltp-list

On Thu, Jul 03, 2014 at 07:28:29PM +0200, chrubis@suse.cz wrote:
> The man 7 sched suggests that SCHED_FIFO and SCHED_RR priority must be >
> 0 at all times. So I guess that this is a bug and we need to find the
> patch that changed the kernel behavior.


A patch was posted yesterday to fix this bug in the kernel.

  http://marc.info/?l=linux-kernel&m=140608259706721&w=2

Jeff

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-23 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 16:36 [LTP] sched_setparam{02,03} failures on 3.14 and newer kernels Jeffrey Bastian
2014-07-03 17:28 ` chrubis
2014-07-23 14:11   ` Jeffrey Bastian

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.