1f08c3bdfSopenharmony_ci<assertions>
2f08c3bdfSopenharmony_ci  <assertion id="1" files="pthread_mutex_init/stress.c" tag="pt:THR">
3f08c3bdfSopenharmony_ciMutex initialization and destruction duration does not depend on the number of mutex in use in the system -- for any type of mutex.
4f08c3bdfSopenharmony_ci  </assertion>
5f08c3bdfSopenharmony_ci  <assertion id="2" files="pthread_mutex_init/s-c.c" tag="pt:THR">
6f08c3bdfSopenharmony_ciMutex initialization then destruction does not consume any system resource (memory leak, ...) -- for any type of mutex.
7f08c3bdfSopenharmony_ci  </assertion>
8f08c3bdfSopenharmony_ci  <assertion id="3" files="pthread_mutex_lock/stress.c" tag="pt:THR">
9f08c3bdfSopenharmony_ciWith a large amount of threads contending for some mutexes (of several types) with pthread_mutex_lock, pthread_mutex_trylock and pthread_mutex_timedlock, there is never more than one thread owning the same mutex at the same time.
10f08c3bdfSopenharmony_ci  </assertion>
11f08c3bdfSopenharmony_ci  <assertion id="4" files="pthread_mutex_lock/s-c1.c" tag="pt:THR">
12f08c3bdfSopenharmony_ciThere is no limit on the number of threads waiting to own the same mutex.
13f08c3bdfSopenharmony_ci  </assertion>
14f08c3bdfSopenharmony_ci  <assertion id="5" files="pthread_mutex_lock/s-c1.c" tag="pt:THR">
15f08c3bdfSopenharmony_ciThere is no limit on the number of different mutex having threads contending, at the same time.
16f08c3bdfSopenharmony_ci  </assertion>
17f08c3bdfSopenharmony_ci  <assertion id="6" files="pthread_cond_init/s-c.c" tag="pt:THR">
18f08c3bdfSopenharmony_ciCondvar initialization then destruction does not consume any system resource -- for any kind of condvar.
19f08c3bdfSopenharmony_ci  </assertion>
20f08c3bdfSopenharmony_ci  <assertion id="7" files="pthread_cond_init/stress.c" tag="pt:THR">
21f08c3bdfSopenharmony_ciCondvar Initialization and destruction duration does not depend on the number of condvars in use in the system -- for any kind of condvar.
22f08c3bdfSopenharmony_ci  </assertion>
23f08c3bdfSopenharmony_ci  <assertion id="8" files="pthread_cond_timedwait/s-c.c" tag="pt:THR">
24f08c3bdfSopenharmony_ciLatency between pthread_cond_timedwait timeout parameter and function actual return does not depend on the number of threads waiting on the condvar -- whatever kind of condvar.
25f08c3bdfSopenharmony_ci  </assertion>
26f08c3bdfSopenharmony_ci  <assertion id="9" files="pthread_cond_timedwait/stress1.c,pthread_cond_wait/stress1.c" tag="pt:THR">
27f08c3bdfSopenharmony_ciWhen inside the function, the thread releases the mutex before waiting for the conditionnal variable. Those two operations are atomic in the mean that no other thread can gain access to the mutex then signal (or broadcast) the condition without the blocked thread behaving as if this signal (or broadcast) had happened after it blocked on the conditionnal variable.
28f08c3bdfSopenharmony_ci  </assertion>
29f08c3bdfSopenharmony_ci  <assertion id="10" files="pthread_cond_timedwait/stress2.c,pthread_cond_wait/stress2.c" tag="pt:THR">
30f08c3bdfSopenharmony_ciWhen a cancel request unblocks the thread, it must not consume any pending condition signal request.
31f08c3bdfSopenharmony_ci  </assertion>
32f08c3bdfSopenharmony_ci  <assertion id="10" files="pthread_cond_wait/stress.c" tag="pt:THR">
33f08c3bdfSopenharmony_ciNo condition signaling (signal or broadcast) are lost (i.e. not received by at least one (wait) or all (broadcast) waiting threads).
34f08c3bdfSopenharmony_ci  </assertion>
35f08c3bdfSopenharmony_ci  <assertion id="11" files="pthread_create/s-c1.c" tag="pt:THR">
36f08c3bdfSopenharmony_ciThe thread creation time does not depend on the number of threads already created in the process.
37f08c3bdfSopenharmony_ci  </assertion>
38f08c3bdfSopenharmony_ci  <assertion id="12" files="pthread_mutex_trylock/stress.c" tag="pt:THR">
39f08c3bdfSopenharmony_cipthread_mutex_trylock never locks the mutex when it returns EBUSY.
40f08c3bdfSopenharmony_ci  </assertion>
41f08c3bdfSopenharmony_ci  <assertion id="13" files="pthread_exit/stress.c" tag="pt:THR">
42f08c3bdfSopenharmony_cipthread_exit() frees the thread resources.
43f08c3bdfSopenharmony_ci  </assertion>
44f08c3bdfSopenharmony_ci  <assertion id="14" files="pthread_self/stress.c" tag="pt:THR">
45f08c3bdfSopenharmony_cipthread_self() returns the thread ID.
46f08c3bdfSopenharmony_ci  </assertion>
47f08c3bdfSopenharmony_ci  <assertion id="15" files="fork/s-c1.c" tag="pt:THR">
48f08c3bdfSopenharmony_ciThe process creation time in a fork() does not depend on the number of processes already created in the system.
49f08c3bdfSopenharmony_ci  </assertion>
50f08c3bdfSopenharmony_ci  <assertion id="16" files="pthread_once/stress.c" tag="pt:THR">
51f08c3bdfSopenharmony_ciThe init_routine argument of pthread_once is never called
52f08c3bdfSopenharmony_cimore or less than once.
53f08c3bdfSopenharmony_ci  </assertion>
54f08c3bdfSopenharmony_ci  <assertion id="17" files="pthread_getschedparam/stress.c" tag="pt:THR">
55f08c3bdfSopenharmony_cipthread_getschedparam() always returns the scheduling parameters of the queried thread.
56f08c3bdfSopenharmony_ci  </assertion>
57f08c3bdfSopenharmony_ci  <assertion id="18" files="pthread_kill/stress.c" tag="pt:THR">
58f08c3bdfSopenharmony_ciHeavy signal delivery with pthread_kill() does not break the system, and no unpending signal get lost.
59f08c3bdfSopenharmony_ci  </assertion>
60f08c3bdfSopenharmony_ci  <assertion id="19" files="pthread_cancel/stress.c" tag="pt:THR">
61f08c3bdfSopenharmony_ciHeavy cancelation does not break the system or the application.
62f08c3bdfSopenharmony_ci  </assertion>
63f08c3bdfSopenharmony_ci  <assertion id="20" files="sem_open/s-c1.c" tag="pt:SEM">
64f08c3bdfSopenharmony_ciThe sem_open and sem_close duration does not depend on the number of opened
65f08c3bdfSopenharmony_cinamed semaphores.
66f08c3bdfSopenharmony_ci  </assertion>
67f08c3bdfSopenharmony_ci  <assertion id="21" files="sem_init/s-c1.c" tag="pt:SEM">
68f08c3bdfSopenharmony_ciThe sem_init and sem_destroy duration does not depend on the number of opened
69f08c3bdfSopenharmony_ciunnamed semaphores.
70f08c3bdfSopenharmony_ci  </assertion>
71f08c3bdfSopenharmony_ci  <assertion id="22" files="sem_getvalue/stress.c" tag="pt:SEM">
72f08c3bdfSopenharmony_ciThe sem_getvalue always returns the value of the semaphore at a given time
73f08c3bdfSopenharmony_ciduring the call into the sval argument.
74f08c3bdfSopenharmony_ci  </assertion>
75f08c3bdfSopenharmony_ci</assertions>
76