tests: several tweaks for passing tests on qemu
This commit includes tweaks in several tests, so that the tests can be passing on ARM QEMU targets, mps2_an385 and mps2_an521 with Qemu 4.x release. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
90f5859f86
commit
8dc83c1d94
3 changed files with 7 additions and 1 deletions
|
@ -10,6 +10,7 @@ CONFIG_INIT_STACKS=y
|
||||||
CONFIG_POLL=y
|
CONFIG_POLL=y
|
||||||
CONFIG_SCHED_SCALABLE=y
|
CONFIG_SCHED_SCALABLE=y
|
||||||
CONFIG_SMP=n
|
CONFIG_SMP=n
|
||||||
|
CONFIG_QEMU_TICKLESS_WORKAROUND=y
|
||||||
|
|
||||||
# The Zephyr CMSIS v2 emulation assumes that ticks are ms, currently
|
# The Zephyr CMSIS v2 emulation assumes that ticks are ms, currently
|
||||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
||||||
|
|
|
@ -2,5 +2,6 @@ CONFIG_ZTEST=y
|
||||||
CONFIG_IRQ_OFFLOAD=y
|
CONFIG_IRQ_OFFLOAD=y
|
||||||
CONFIG_TEST_USERSPACE=y
|
CONFIG_TEST_USERSPACE=y
|
||||||
CONFIG_SCHED_MULTIQ=y
|
CONFIG_SCHED_MULTIQ=y
|
||||||
|
CONFIG_QEMU_TICKLESS_WORKAROUND=y
|
||||||
CONFIG_MAX_THREAD_BYTES=4
|
CONFIG_MAX_THREAD_BYTES=4
|
||||||
CONFIG_SMP=n
|
CONFIG_SMP=n
|
||||||
|
|
|
@ -15,10 +15,14 @@ K_THREAD_STACK_EXTERN(ustack);
|
||||||
|
|
||||||
void spin_for_ms(int ms)
|
void spin_for_ms(int ms)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_X86_64) && defined(CONFIG_QEMU_TARGET)
|
#if (defined(CONFIG_SOC_SERIES_MPS2) || defined(CONFIG_X86_64)) \
|
||||||
|
&& defined(CONFIG_QEMU_TARGET)
|
||||||
/* qemu-system-x86_64 has a known bug with the hpet device
|
/* qemu-system-x86_64 has a known bug with the hpet device
|
||||||
* where it will drop interrupts if you try to spin on the
|
* where it will drop interrupts if you try to spin on the
|
||||||
* counter.
|
* counter.
|
||||||
|
*
|
||||||
|
* qemu-system-arm has a similar issue of dropping interrupts
|
||||||
|
* on MPS2+ targets.
|
||||||
*/
|
*/
|
||||||
k_busy_wait(ms * 1000);
|
k_busy_wait(ms * 1000);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue