1# FIXME: this should be under tests/unit/timeutil but will not work due to #90029
2common:
3  tags:
4    - timeutils
5  # 1 tier0 platform per supported architecture
6  platform_key:
7    - arch
8    - simulation
9  integration_platforms:
10    - native_sim
11    - native_sim/native/64
12tests:
13  libraries.timespec_utils: {}
14  libraries.timespec_utils.timeout_32bit:
15    extra_configs:
16      - CONFIG_TIMEOUT_64BIT=n
17
18  # Using platform_allow below because some platforms such as qemu_cortex_r5/zynqmp_rpu throw
19  # build errors when the timer tick frequency is not divisible by the system tick frequency.
20  #
21  # The test configurations below are mainly for numerical coverage and correctness.
22  libraries.timespec_utils.speed.timeout_32bit:
23    platform_allow:
24      - native_sim
25      - native_sim/native/64
26    extra_configs:
27      - CONFIG_TIMEOUT_64BIT=n
28      - CONFIG_SPEED_OPTIMIZATIONS=y
29  libraries.timespec_utils.speed.timeout_64bit:
30    platform_allow:
31      - native_sim
32      - native_sim/native/64
33    extra_configs:
34      - CONFIG_TIMEOUT_64BIT=y
35      - CONFIG_SPEED_OPTIMIZATIONS=y
36  libraries.timespec_utils.low_tick_rate.timeout_32bit:
37    platform_allow:
38      - native_sim
39      - native_sim/native/64
40    extra_configs:
41      - CONFIG_TIMEOUT_64BIT=n
42      - CONFIG_SYS_CLOCK_TICKS_PER_SEC=1
43  libraries.timespec_utils.low_tick_rate.timeout_64bit:
44    platform_allow:
45      - native_sim
46      - native_sim/native/64
47    extra_configs:
48      - CONFIG_TIMEOUT_64BIT=y
49      - CONFIG_SYS_CLOCK_TICKS_PER_SEC=1
50  libraries.timespec_utils.high_tick_rate.timeout_32bit:
51    platform_allow:
52      - native_sim
53      - native_sim/native/64
54    extra_configs:
55      - CONFIG_TIMEOUT_64BIT=n
56      - CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000000
57  libraries.timespec_utils.high_tick_rate.timeout_64bit:
58    platform_allow:
59      - native_sim
60      - native_sim/native/64
61    extra_configs:
62      - CONFIG_TIMEOUT_64BIT=y
63      - CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000000
64  libraries.timespec_utils.32k_tick_rate.timeout_32bit:
65    platform_allow:
66      - native_sim
67      - native_sim/native/64
68    extra_configs:
69      - CONFIG_TIMEOUT_64BIT=n
70      - CONFIG_SYS_CLOCK_TICKS_PER_SEC=32768
71  libraries.timespec_utils.32k_tick_rate.timeout_64bit:
72    platform_allow:
73      - native_sim
74      - native_sim/native/64
75    extra_configs:
76      - CONFIG_TIMEOUT_64BIT=y
77      - CONFIG_SYS_CLOCK_TICKS_PER_SEC=32768
78  libraries.timespec_utils.prime_tick_rate.timeout_32bit:
79    platform_allow:
80      - native_sim
81      - native_sim/native/64
82    extra_configs:
83      - CONFIG_TIMEOUT_64BIT=n
84      - CONFIG_SYS_CLOCK_TICKS_PER_SEC=10007
85  libraries.timespec_utils.prime_tick_rate.timeout_64bit:
86    platform_allow:
87      - native_sim
88      - native_sim/native/64
89    extra_configs:
90      - CONFIG_TIMEOUT_64BIT=y
91      - CONFIG_SYS_CLOCK_TICKS_PER_SEC=10007
92