public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] sched_rr_get_interval01 , sched_rr_get_interval02 , sched_rr_get_interval03 testcase failure
@ 2020-06-08 12:19 Pankaj Vinadrao Joshi
  2020-06-08 14:52 ` Jan Stancek
  0 siblings, 1 reply; 5+ messages in thread
From: Pankaj Vinadrao Joshi @ 2020-06-08 12:19 UTC (permalink / raw)
  To: ltp

Hi,
I am running sched_rr_get_interval01 , sched_rr_get_interval02 ,sched_rr_get_interval03 test on riscv with linux kernel 5.5.6 but i am getting following error(same kinf error for sched_rr_get_interval01 sched_rr_get_interval02,sched_rr_get_interval03)

i am attaching the result produced after running this test..can someone help me out with this

root@exaleapsemi-r2:/opt/ltp# ./runltp -s sched_rr_get_interval01
INFO: creating /opt/ltp/results directory
INFO: no command files were provided. Executing following runtest scenario files:
syscalls fs fs_perms_simple fsx dio io mm ipc sched math nptl pty containers fs_bind controllers filecaps cap_bounds fcntl-locktests connectors power_management_tests hugetlb commands hyperthreading can cpuhotplug net.ipv6_lib input cve crypto kernel_misc uevent

Checking for required user/group ids

'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

/etc/os-release
ID="Exaleap-riscv-linux"
NAME="Exaleap-riscv-linux"
VERSION="Exaleap-riscv-linux-r1.10"
VERSION_ID="exaleap-riscv-linux-r1.10"
PRETTY_NAME="Exaleap-riscv-linux Exaleap-riscv-linux-r1.10"

uname:
Linux exaleapsemi-r2.00 5.5.6 #1 SMP Wed Jun 3 08:57:06 UTC 2020 riscv64 riscv64 riscv64 GNU/Linux

/proc/cmdline
earlycon=sbi earlycon=sbi root=/dev/mmcblk0p3 rootwait console=ttySIF0 console=tty0

Gnu C                  gcc (GCC) 8.3.0
Clang
Gnu make               4.2.1
util-linux             2.34
mount                  linux 2.34 (libmount 2.34.0: btrfs, namespaces, assert, debug)
modutils               26
e2fsprogs              1.45.4
PPP                    2.4.7
Linux C Library        > libc.2.30
Dynamic linker (ldd)   2.30
Linux C++ Library      6.0.25
Procps                 3.3.15
Net-tools              1.60
iproute2               iproute2-ss190924
iputils                'V'
ethtool                5.3
Kbd                    2.2.0
Sh-utils               8.31
Modules Loaded         nls_cp437 btrfs blake2b_generic xor zstd_decompress zstd_compress xxhash lzo_compress zlib_deflate raid6_pq fuse xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo iptable_filter iptable_nat nf_nat ip_tables overlay xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c xt_addrtype

free reports:
              total        used        free      shared  buff/cache   available
Mem:        8165700      160228     7027496       26152      977976     7890824
Swap:             0           0           0

cpuinfo:
Architecture:        riscv64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  4
Core(s) per socket:  1
Socket(s):           1
L1d cache:           32 KiB
L1i cache:           32 KiB
L2 cache:            2 MiB

AppArmor disabled

SELinux mode: unknown
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND:    /opt/ltp/bin/ltp-pan   -e -S   -a 40320     -n 40320 -p -f /tmp/ltp-s8OHAGE4Sl/alltests -l /opt/ltp/results/LTP_RUN_ON-2020_06_08-08h_20m_33s.log  -C /opt/ltp/output/LTP_RUN_ON-2020_06_08-08h_20m_33s.failed -T /opt/ltp/output/LTP_RUN_ON-2020_06_08-08h_20m_33s.tconf
INFO: Restricted to sched_rr_get_interval01
LOG File: /opt/ltp/results/LTP_RUN_ON-2020_06_08-08h_20m_33s.log
FAILED COMMAND File: /opt/ltp/output/LTP_RUN_ON-2020_06_08-08h_20m_33s.failed
TCONF COMMAND File: /opt/ltp/output/LTP_RUN_ON-2020_06_08-08h_20m_33s.tconf
Running tests.......
<<<test_start>>>
tag=sched_rr_get_interval01 stime=1591604435
cmdline="sched_rr_get_interval01"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
sched_rr_get_interval01    1  TBROK  :  sched_rr_get_interval01.c:131: sched_setscheduler() failed
sched_rr_get_interval01    2  TBROK  :  sched_rr_get_interval01.c:131: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=0
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20200515-28-gb54247721

       ###############################################################

            Done executing testcases.
            LTP Version:  20200515-28-gb54247721
       ###############################################################

How i can ressolve this issue??

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200608/ce756452/attachment-0001.htm>

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

* [LTP] sched_rr_get_interval01 , sched_rr_get_interval02 , sched_rr_get_interval03 testcase failure
  2020-06-08 12:19 [LTP] sched_rr_get_interval01 , sched_rr_get_interval02 , sched_rr_get_interval03 testcase failure Pankaj Vinadrao Joshi
@ 2020-06-08 14:52 ` Jan Stancek
       [not found]   ` <BMXPR01MB2344728D919729E8F7F007EBEE820@BMXPR01MB2344.INDPRD01.PROD.OUTLOOK.COM>
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2020-06-08 14:52 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> <<<test_output>>>
> incrementing stop
> sched_rr_get_interval01 1 TBROK : sched_rr_get_interval01.c:131:
> sched_setscheduler() failed

Common cause is that you run tests in cgroup that has zero cpu.rt_runtime_us.

1. Are sched_setparam02 and sched_getscheduler01 passing?

2. Can you rerun with this patch:
     https://github.com/linux-test-project/ltp/commit/94e6163082055700db700c33ed0eab537420fdaf.patch
   or use strace? 


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

* [LTP] sched_rr_get_interval01 , sched_rr_get_interval02 , sched_rr_get_interval03 testcase failure
       [not found]   ` <BMXPR01MB2344728D919729E8F7F007EBEE820@BMXPR01MB2344.INDPRD01.PROD.OUTLOOK.COM>
@ 2020-06-09  6:25     ` Jan Stancek
  2020-06-09  6:39       ` Pankaj Vinadrao Joshi
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2020-06-09  6:25 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> Hi Jan Stancek,
> Thanks for your response.All of the following test are failing w.r.t sched
> 
> 1) sched_setparam02
> 2) sched_setparam03
> 3) sched_getscheduler01

That suggests it could be cpu.rt_runtime_us == 0, since all tests are
trying to use realtime scheduler.

> 
> root@exaleapsemi-r2:/opt/ltp# strace ./runltp -s sched_setparam02

Above doesn't help much, since you are not tracing child processes.

1. Can you run this instead:
 /opt/ltp# strace ./testcases/bin/sched_setparam02

2. Can you check what is the cpu.rt_runtime_us for pid that runs the test?

# cpu_mnt=$(mount | grep "type cgroup (.*cpu[,)]" | awk '{print $3}')
# p=$(cat /proc/self/cgroup | grep ":cpu[:,]" | sed "s/.*://")
# cat $cpu_mnt/$p/cpu.rt_runtime_us


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

* [LTP] sched_rr_get_interval01 , sched_rr_get_interval02 , sched_rr_get_interval03 testcase failure
  2020-06-09  6:25     ` Jan Stancek
@ 2020-06-09  6:39       ` Pankaj Vinadrao Joshi
  2020-06-09  6:48         ` Jan Stancek
  0 siblings, 1 reply; 5+ messages in thread
From: Pankaj Vinadrao Joshi @ 2020-06-09  6:39 UTC (permalink / raw)
  To: ltp

1)root@exaleapsemi-r2:/opt/ltp# strace ./testcases/bin/sched_setparam02

execve("./testcases/bin/sched_setparam02", ["./testcases/bin/sched_setparam02"], 0x3fffa4bcb0 /* 16 vars */) = 0
brk(NULL)                               = 0x2e000
uname({sysname="Linux", nodename="exaleapsemi-r2.00", ...}) = 0
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=70080, ...}) = 0
mmap(NULL, 70080, PROT_READ, MAP_PRIVATE, 3, 0) = 0x3fe2e3b000
close(3)                                = 0
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\363\0\1\0\0\0d5\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1065488, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fe2e39000
mmap(NULL, 1076752, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fe2d32000
mmap(0x3fe2e30000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfd000) = 0x3fe2e30000
mmap(0x3fe2e36000, 11792, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3fe2e36000
close(3)                                = 0
mprotect(0x3fe2e30000, 12288, PROT_READ) = 0
mprotect(0x27000, 4096, PROT_READ)      = 0
mprotect(0x3fe2e67000, 4096, PROT_READ) = 0
munmap(0x3fe2e3b000, 70080)             = 0
brk(NULL)                               = 0x2e000
brk(0x4f000)                            = 0x4f000
geteuid()                               = 0
rt_sigaction(SIGHUP, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGILL, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTRAP, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGFPE, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR1, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR2, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSTKFLT, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGCHLD, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTSTP, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTTIN, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTTOU, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGURG, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXCPU, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXFSZ, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGVTALRM, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPROF, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGWINCH, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGIO, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPWR, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSYS, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_16, {sa_handler=0x196ac, sa_mask=[], sa_flags=SA_RESTART}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
sched_setscheduler(0, SCHED_FIFO, [1])  = -1 EPERM (Operation not permitted)
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x2), ...}) = 0
write(1, "sched_setparam02    1  \33[1;31mTB"..., 97sched_setparam02    1  TBROK  :  sched_setparam02.c:118: sched_setscheduler()  failed
) = 97
write(1, "sched_setparam02    2  \33[1;31mTB"..., 91sched_setparam02    2  TBROK  :  sched_setparam02.c:118: Remaining cases broken
) = 91
exit_group(2)                           = ?
+++ exited with 2 +++

2)
root@exaleapsemi-r2:/opt/ltp# pu_mnt=$(mount | grep "type cgroup (.*cpu[,)]" | awk '{print $3}')
root@exaleapsemi-r2:/opt/ltp# cpu_mnt=$(mount | grep "type cgroup (.*cpu[,)]" | awk '{print $3}')
root@exaleapsemi-r2:/opt/ltp# p=$(cat /proc/self/cgroup | grep ":cpu[:,]" | sed "s/.*://")
root@exaleapsemi-r2:/opt/ltp# cat $cpu_mnt/$p/cpu.rt_runtime_us
cat: //system.slice/system-sshd.slice/cpu.rt_runtime_us: No such file or directory

it didnt gave any info about cpu.rt_runtime_us??

Thanks!


________________________________
From: Jan Stancek <jstancek@redhat.com>
Sent: Tuesday, June 9, 2020 11:55 AM
To: Pankaj Vinadrao Joshi <Pankaj.VJ@exaleapsemi.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] sched_rr_get_interval01 , sched_rr_get_interval02 , sched_rr_get_interval03 testcase failure



----- Original Message -----
> Hi Jan Stancek,
> Thanks for your response.All of the following test are failing w.r.t sched
>
> 1) sched_setparam02
> 2) sched_setparam03
> 3) sched_getscheduler01

That suggests it could be cpu.rt_runtime_us == 0, since all tests are
trying to use realtime scheduler.

>
> root@exaleapsemi-r2:/opt/ltp# strace ./runltp -s sched_setparam02

Above doesn't help much, since you are not tracing child processes.

1. Can you run this instead:
 /opt/ltp# strace ./testcases/bin/sched_setparam02

2. Can you check what is the cpu.rt_runtime_us for pid that runs the test?

# cpu_mnt=$(mount | grep "type cgroup (.*cpu[,)]" | awk '{print $3}')
# p=$(cat /proc/self/cgroup | grep ":cpu[:,]" | sed "s/.*://")
# cat $cpu_mnt/$p/cpu.rt_runtime_us

[EXT]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200609/4da667ee/attachment-0001.htm>

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

* [LTP] sched_rr_get_interval01 , sched_rr_get_interval02 , sched_rr_get_interval03 testcase failure
  2020-06-09  6:39       ` Pankaj Vinadrao Joshi
@ 2020-06-09  6:48         ` Jan Stancek
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Stancek @ 2020-06-09  6:48 UTC (permalink / raw)
  To: ltp

----- Original Message ----- 

> sched_setscheduler(0, SCHED_FIFO, [1]) = -1 EPERM (Operation not permitted)

Thanks, that aligns with the theory.

> 2)
> root@exaleapsemi-r2:/opt/ltp# pu_mnt=$(mount | grep "type cgroup (.*cpu[,)]"
> | awk '{print $3}')
> root@exaleapsemi-r2:/opt/ltp# cpu_mnt=$(mount | grep "type cgroup (.*cpu[,)]"
> | awk '{print $3}')
> root@exaleapsemi-r2:/opt/ltp# p=$(cat /proc/self/cgroup | grep ":cpu[:,]" |
> sed "s/.*://")
> root@exaleapsemi-r2:/opt/ltp# cat $cpu_mnt/$p/cpu.rt_runtime_us
> cat: //system.slice/system-sshd.slice/cpu.rt_runtime_us: No such file or
> directory

> it didnt gave any info about cpu.rt_runtime_us??

That could be because your distro is mounting cgroup2.

# mount | grep cgroup

Do you see any change if you run following?

# echo $$ > /sys/fs/cgroup/cgroup.procs
# /opt/ltp/testcases/bin/sched_setparam02


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

end of thread, other threads:[~2020-06-09  6:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-08 12:19 [LTP] sched_rr_get_interval01 , sched_rr_get_interval02 , sched_rr_get_interval03 testcase failure Pankaj Vinadrao Joshi
2020-06-08 14:52 ` Jan Stancek
     [not found]   ` <BMXPR01MB2344728D919729E8F7F007EBEE820@BMXPR01MB2344.INDPRD01.PROD.OUTLOOK.COM>
2020-06-09  6:25     ` Jan Stancek
2020-06-09  6:39       ` Pankaj Vinadrao Joshi
2020-06-09  6:48         ` Jan Stancek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox