proc_sched_rt01 from ubuntu_ltp failed

Bug #2057734 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Won't Fix
Undecided
Unassigned
Bionic
Won't Fix
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned
Mantic
Fix Committed
Medium
GuoqingJiang

Bug Description

[Impact]
The updated LTP has added proc_sched_rt01 testcase which can't pass
since several commits are missed from kernel side.

Test log:
INFO: Test start time: Tue Mar 12 11:52:21 UTC 2024
COMMAND: /opt/ltp/bin/ltp-pan -q -e -S -a 163430 -n 163430 -f /tmp/ltp-X3Nz2HWCQe/alltests -l /dev/null -C /dev/null -T /dev/null
LOG File: /dev/null
FAILED COMMAND File: /dev/null
TCONF COMMAND File: /dev/null
Running tests.......
tst_kconfig.c:87: TINFO: Parsing kernel config '/lib/modules/6.5.0-27-generic/build/.config'
tst_test.c:1741: TINFO: LTP version: 20230929-406-gcbc2d0568
tst_test.c:1625: TINFO: Timeout per run is 0h 00m 30s
proc_sched_rt01.c:45: TFAIL: Expect: timeslice_ms > 0 after reset to default
proc_sched_rt01.c:51: TPASS: echo 0 > /proc/sys/kernel/sched_rt_period_us : EINVAL (22)
proc_sched_rt01.c:53: TFAIL: echo -1 > /proc/sys/kernel/sched_rt_period_us invalid retval 2: SUCCESS (0)
proc_sched_rt01.c:59: TPASS: echo -2 > /proc/sys/kernel/sched_rt_runtime_us : EINVAL (22)
proc_sched_rt01.c:72: TFAIL: echo rt_period_us+1 > /proc/sys/kernel/sched_rt_runtime_us invalid retval 1: SUCCESS (0)

HINT: You _MAY_ be missing kernel fixes:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c1fc6484e1fb
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=079be8fc6309

[Fix]
There are 3 relevant commits from upstream.

1. 079be8fc6309 sched/rt: Disallow writing invalid values to sched_rt_period_us
2. c1fc6484e1fb sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
3. c7fcb99877f9 sched/rt: Fix sysctl_sched_rr_timeslice intial value

Mantic: the 3rd is already in master-next.
Jammy: stable v5.15.150 includes the three commits.
Focal: master-next has include them after update to v5.4.270
Bionic: all the three commits are needed.

[Test case]
Run LTP update 20240312 to check the log of proc_sched_rt01.

[Regression potential]
Low risk since these content are existed in upstream for a while.

Cyril Hrubis (2):
  sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
  sched/rt: Disallow writing invalid values to sched_rt_period_us

 kernel/sched/rt.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

[Original Bug Description]
This is a new test case, issue found on M/J/F/B when testing LTP update 20240312

Test log:
INFO: Test start time: Tue Mar 12 11:52:21 UTC 2024
COMMAND: /opt/ltp/bin/ltp-pan -q -e -S -a 163430 -n 163430 -f /tmp/ltp-X3Nz2HWCQe/alltests -l /dev/null -C /dev/null -T /dev/null
LOG File: /dev/null
FAILED COMMAND File: /dev/null
TCONF COMMAND File: /dev/null
Running tests.......
tst_kconfig.c:87: TINFO: Parsing kernel config '/lib/modules/6.5.0-27-generic/build/.config'
tst_test.c:1741: TINFO: LTP version: 20230929-406-gcbc2d0568
tst_test.c:1625: TINFO: Timeout per run is 0h 00m 30s
proc_sched_rt01.c:45: TFAIL: Expect: timeslice_ms > 0 after reset to default
proc_sched_rt01.c:51: TPASS: echo 0 > /proc/sys/kernel/sched_rt_period_us : EINVAL (22)
proc_sched_rt01.c:53: TFAIL: echo -1 > /proc/sys/kernel/sched_rt_period_us invalid retval 2: SUCCESS (0)
proc_sched_rt01.c:59: TPASS: echo -2 > /proc/sys/kernel/sched_rt_runtime_us : EINVAL (22)
proc_sched_rt01.c:72: TFAIL: echo rt_period_us+1 > /proc/sys/kernel/sched_rt_runtime_us invalid retval 1: SUCCESS (0)

HINT: You _MAY_ be missing kernel fixes:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c1fc6484e1fb
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=079be8fc6309

Summary:
passed 2
failed 3
broken 0
skipped 0
warnings 0
INFO: ltp-pan reported some tests FAIL
LTP Version: 20230929-406-gcbc2d0568
INFO: Test end time: Tue Mar 12 11:52:21 UTC 2024

Po-Hsu Lin (cypressyew)
tags: added: ltp-20240312
Po-Hsu Lin (cypressyew)
description: updated
tags: added: 4.15 bionic
Revision history for this message
GuoqingJiang (guoqingjiang) wrote :

Looks we need the two series per the HINT

https://<email address hidden>/
https://<email address hidden>/

Revision history for this message
Portia Stephens (portias) wrote (last edit ):

Seen on focal:linux-oracle-5.15.0-1055.61~20.04.1

Revision history for this message
GuoqingJiang (guoqingjiang) wrote :

Updates:

1. bionic master-next and stable 4.15 don't include relevant commits. Probably need to backport
commits from original commits, and we can refer to below commits in v4.19 stable

2d931472d474 sched/rt: Disallow writing invalid values to sched_rt_period_us
1f80bc015277 sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
41b7572dea9f sched/rt: Fix sysctl_sched_rr_timeslice intial value

2. focal master-next has include them after update to v5.4.270

5d4fb99a29e7 sched/rt: Disallow writing invalid values to sched_rt_period_us
356eab98ed49 sched/rt: Fix sysctl_sched_rr_timeslice intial value
c1c86af48246 sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset

3. jammy will include them after update to v5.15.150 given below commits had been included in v5.15.150.

0766e7317aab sched/rt: Disallow writing invalid values to sched_rt_period_us
5295b5f2e561 sched/rt: Fix sysctl_sched_rr_timeslice intial value
50349893930a sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset

4. both mantic master-next and stable 6.5 only have this one, so the other two commits are needed.

8d74fc7bb6e6 sched/rt: Fix sysctl_sched_rr_timeslice intial value

Revision history for this message
GuoqingJiang (guoqingjiang) wrote :

Given ESM kernel only accepts CVE patches, will only send patches against Mantic

[Impact]
The updated LTP has added proc_sched_rt01 testcase which can't pass
since several commits are missed from kernel side.

Test log:
INFO: Test start time: Tue Mar 12 11:52:21 UTC 2024
COMMAND: /opt/ltp/bin/ltp-pan -q -e -S -a 163430 -n 163430 -f /tmp/ltp-X3Nz2HWCQe/alltests -l /dev/null -C /dev/null -T /dev/null
LOG File: /dev/null
FAILED COMMAND File: /dev/null
TCONF COMMAND File: /dev/null
Running tests.......
tst_kconfig.c:87: TINFO: Parsing kernel config '/lib/modules/6.5.0-27-generic/build/.config'
tst_test.c:1741: TINFO: LTP version: 20230929-406-gcbc2d0568
tst_test.c:1625: TINFO: Timeout per run is 0h 00m 30s
proc_sched_rt01.c:45: TFAIL: Expect: timeslice_ms > 0 after reset to default
proc_sched_rt01.c:51: TPASS: echo 0 > /proc/sys/kernel/sched_rt_period_us : EINVAL (22)
proc_sched_rt01.c:53: TFAIL: echo -1 > /proc/sys/kernel/sched_rt_period_us invalid retval 2: SUCCESS (0)
proc_sched_rt01.c:59: TPASS: echo -2 > /proc/sys/kernel/sched_rt_runtime_us : EINVAL (22)
proc_sched_rt01.c:72: TFAIL: echo rt_period_us+1 > /proc/sys/kernel/sched_rt_runtime_us invalid retval 1: SUCCESS (0)

HINT: You _MAY_ be missing kernel fixes:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c1fc6484e1fb
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=079be8fc6309

[Fix]
There are 3 relevant commits from upstream.

1. 079be8fc6309 sched/rt: Disallow writing invalid values to sched_rt_period_us
2. c1fc6484e1fb sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
3. c7fcb99877f9 sched/rt: Fix sysctl_sched_rr_timeslice intial value

Mantic: the 3rd is already in master-next.
Jammy: stable v5.15.150 includes the three commits.
Focal: master-next has include them after update to v5.4.270
Bionic: all the three commits are needed.

[Test case]
Run LTP update 20240312 to check the log of proc_sched_rt01.

[Regression potential]
Low risk since these content are existed in upstream for a while.

Cyril Hrubis (2):
  sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
  sched/rt: Disallow writing invalid values to sched_rt_period_us

 kernel/sched/rt.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Changed in linux (Ubuntu Mantic):
milestone: none → mantic-updates
no longer affects: linux (Ubuntu Mantic)
Changed in linux (Ubuntu):
milestone: none → mantic-updates
Changed in linux (Ubuntu Mantic):
assignee: nobody → GuoqingJiang (guoqingjiang)
importance: Undecided → Medium
status: New → In Progress
Changed in linux (Ubuntu):
status: New → Invalid
milestone: mantic-updates → noble-updates
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
milestone: noble-updates → none
Revision history for this message
GuoqingJiang (guoqingjiang) wrote :

focal master-next has those fix commits

Changed in linux (Ubuntu Focal):
status: New → Won't Fix
Revision history for this message
GuoqingJiang (guoqingjiang) wrote :

jammy will include them after update to v5.15.150

Changed in linux (Ubuntu Jammy):
status: New → Won't Fix
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Focal):
status: Won't Fix → Confirmed
Changed in linux (Ubuntu Jammy):
status: Won't Fix → Confirmed
Po-Hsu Lin (cypressyew)
description: updated
Changed in linux (Ubuntu Xenial):
status: New → Confirmed
Changed in linux (Ubuntu Bionic):
status: New → Confirmed
Changed in linux (Ubuntu Mantic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Xenial):
status: Confirmed → Won't Fix
Changed in linux (Ubuntu Bionic):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.