apache / nuttx-apps

Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS
https://nuttx.apache.org/
Apache License 2.0
278 stars 529 forks source link

ostest RR scheduler testing #1989

Open TaiJuWu opened 1 year ago

TaiJuWu commented 1 year ago

I have a question about RR scheduler

https://github.com/apache/nuttx-apps/blob/d73e6412b7d8453b25c91f324c81d88f8abbcd51/testing/ostest/roundrobin.c#L227 The comment shows thread_1 and thread_2 should start and complete at about the same time. But I did not see any assert condition about it.

Is it needed to modify or it is correct? I try to add some assert to this problem at https://github.com/TaiJuWu/nuttx-apps/blob/30038063e2b9958202118d4b4c3724eec7069622/testing/ostest/roundrobin.c#L254 Im not sure it's useful and is this method great? If anyone can give me some suggestion, I will be very grateful.

acassis commented 11 months ago

@TaiJuWu I think this could be a good idea! We need more people testing RR SCHED. Did you have chance to test RR with Tickeless mode?

TaiJuWu commented 11 months ago

No. I just used nsh:smp as my default setting. I will try using tickless mode this weekend.

TaiJuWu commented 11 months ago

@TaiJuWu I think this could be a good idea! We need more people testing RR SCHED. Did you have chance to test RR with Tickeless mode?

It also can work on qemu-armv8a:nsh_smp_tickless but why we need to use tickless mode? Actually, I can't image what condition will make this test fail....