Skip to content
Permalink
Browse files

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>
  • Loading branch information...
ioannisg committed Jul 28, 2019
1 parent 90f5859 commit 8dc83c1d94d3507b2958ab2b43c01feb7ba76c00
@@ -10,6 +10,7 @@ CONFIG_INIT_STACKS=y
CONFIG_POLL=y
CONFIG_SCHED_SCALABLE=y
CONFIG_SMP=n
CONFIG_QEMU_TICKLESS_WORKAROUND=y

# The Zephyr CMSIS v2 emulation assumes that ticks are ms, currently
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -2,5 +2,6 @@ CONFIG_ZTEST=y
CONFIG_IRQ_OFFLOAD=y
CONFIG_TEST_USERSPACE=y
CONFIG_SCHED_MULTIQ=y
CONFIG_QEMU_TICKLESS_WORKAROUND=y
CONFIG_MAX_THREAD_BYTES=4
CONFIG_SMP=n
@@ -15,10 +15,14 @@ K_THREAD_STACK_EXTERN(ustack);

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
* where it will drop interrupts if you try to spin on the
* counter.
*
* qemu-system-arm has a similar issue of dropping interrupts
* on MPS2+ targets.
*/
k_busy_wait(ms * 1000);
#else

0 comments on commit 8dc83c1

Please sign in to comment.
You can’t perform that action at this time.