<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rt-thread.git/src/utest/smp, branch v5.3.0-beta</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/rt-thread.git/atom/src/utest/smp?h=v5.3.0-beta</id>
<link rel='self' href='http://cgit.235523.xyz/rt-thread.git/atom/src/utest/smp?h=v5.3.0-beta'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/'/>
<updated>2026-06-17T01:51:13Z</updated>
<entry>
<title>fix: stabilize smp_bind_affinity_tc on SMP CI</title>
<updated>2026-06-17T01:51:13Z</updated>
<author>
<name>GuEe-GUI</name>
<email>2991707448@qq.com</email>
</author>
<published>2026-06-16T06:20:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=6fc3e18912e60505fa6e2a6a4d444ab84e326e9b'/>
<id>urn:sha1:6fc3e18912e60505fa6e2a6a4d444ab84e326e9b</id>
<content type='text'>
This change fixes intermittent failures of the `core.smp_bind_affinity`
utest across SMP CI targets. The original failure was a flaky assertion on
unbound threads (`thread_inc[x] != thread_tic[x]` in thread_entry), not
incorrect bind_cpu behavior. CI logs already showed T0 binding worked
(thread_inc[0] == thread_tic[0] == 100) while the not_equal check failed.
The root issue is that unbound-thread CPU placement is platform-dependent
and outside the bind_cpu contract. On dual-core RISC-V/ARMv7 CI, an
unbound thread may legitimately run all iterations on core 0 while T0
delays on the same core, so any assertion requiring cross-core migration
(thread_inc != thread_tic, or core_mask with multiple bits) remains flaky.
This patch narrows the test to what bind_affinity actually verifies: T0
bound to core 0 must always execute on core 0. Unbound threads only add
scheduling pressure; their core_mask is printed for observation but not
asserted.
Changes:
- Sample `rt_hw_cpu_id()` and update counters under `rt_sched_lock` to
  avoid migration skew between counting and CPU sampling.
- Track `thread_core_mask` for diagnostics; assert only T0 binding via
  `thread_inc[0] == thread_tic[0]` and `thread_core_mask[0] == 1`.
- Remove flaky unbound-thread assertions (`thread_inc != thread_tic` and
  multi-core core_mask checks).
- Move T0 assertions to the main test thread after all workers finish.
- Use atomic `finsh_flag`; reset counters and `threads[]` in `utest_tc_init`.
- Spin in worker loops after `run_num` until cleanup deletes them (do not
  return from thread_entry or use `RT_WAITING_FOREVER` with `rt_thread_delay`).
- Guard `rt_thread_delete` in cleanup with non-NULL checks.

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
</content>
</entry>
<entry>
<title>[bsp][zynqmp-a53-dfzu2eg] enable full dm</title>
<updated>2026-06-08T06:57:37Z</updated>
<author>
<name>GuEe-GUI</name>
<email>2991707448@qq.com</email>
</author>
<published>2026-03-06T13:10:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=63965cb103e5dcc6fe253579a063019542bdb35c'/>
<id>urn:sha1:63965cb103e5dcc6fe253579a063019542bdb35c</id>
<content type='text'>
This is a builtin fdt example BSP

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
</content>
</entry>
<entry>
<title> [utest][smp]Add descriptions for the SMP test cases (interrupt_pri and spinlock) #11011</title>
<updated>2025-12-11T03:14:43Z</updated>
<author>
<name>Teng mengchen</name>
<email>80439417+Tm-C-mT@users.noreply.github.com</email>
</author>
<published>2025-12-11T03:14:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=957bac0434db9331a702232f37e09732922ad230'/>
<id>urn:sha1:957bac0434db9331a702232f37e09732922ad230</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[docs][utest]:Add comments for smp_thread_preemption</title>
<updated>2025-12-10T09:06:41Z</updated>
<author>
<name>Tm-C-mT</name>
<email>490534897@qq.com</email>
</author>
<published>2025-12-09T13:57:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=d9ca9c449b7aaa48a26e2860f8755d5a18fc94e7'/>
<id>urn:sha1:d9ca9c449b7aaa48a26e2860f8755d5a18fc94e7</id>
<content type='text'>
Add comments for smp_thread_preemption.

Signed-off-by: Mengchen Teng &lt;teng_mengchen@163.com&gt;
</content>
</entry>
<entry>
<title>[utest]:Modify the execution logic of smp_thread_preemptions</title>
<updated>2025-12-10T09:06:41Z</updated>
<author>
<name>Tm-C-mT</name>
<email>490534897@qq.com</email>
</author>
<published>2025-12-02T10:16:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=d56d3d95d508950b40bb646685ae8f583de1f7e9'/>
<id>urn:sha1:d56d3d95d508950b40bb646685ae8f583de1f7e9</id>
<content type='text'>
Currently, the print information of this test case fails to demonstrate that
the high-priority thread has preempted the low-priority thread. This is because
when the high-priority thread prints the thread list, there is no information
about the low-priority thread (tlow), as tlow has already completed execution
and been destroyed. Therefore, the current execution logic cannot confirm the
successful completion of the preemption operation.

Solution: After the low-priority thread (tlow) releases the lock, add a busy-wait
loop while(!finish_flag);. At this point, when the high-priority thread (thigh)
prints the thread list information, tlow can be observed in the ready state, indicating
that it has been preempted by thigh.

Signed-off-by: Mengchen Teng &lt;teng_mengchen@163.com&gt;
</content>
</entry>
<entry>
<title>[utest]: Solve the address misalignment issue of atomic operations</title>
<updated>2025-12-04T03:17:50Z</updated>
<author>
<name>Tm-C-mT</name>
<email>490534897@qq.com</email>
</author>
<published>2025-12-03T11:33:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=dd19c0eb7205b00a8f5c9a179d95d345b5a0f6d4'/>
<id>urn:sha1:dd19c0eb7205b00a8f5c9a179d95d345b5a0f6d4</id>
<content type='text'>
In smp_assigned_idle_cores_tc, the finish_flag involves atomic operations
and thus requires address alignment.

Signed-off-by: Mengchen Teng &lt;teng_mengchen@163.com&gt;
</content>
</entry>
<entry>
<title>[docs][utest]:Add comments for smp_bind_affinity</title>
<updated>2025-11-26T14:51:25Z</updated>
<author>
<name>Tm-C-mT</name>
<email>490534897@qq.com</email>
</author>
<published>2025-11-20T03:42:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=9c2279acdc526a25cd6abdccee18640c4d4ebc5e'/>
<id>urn:sha1:9c2279acdc526a25cd6abdccee18640c4d4ebc5e</id>
<content type='text'>
Add comments for smp_bind_affinity, And fixed some comment issues in smp_affinity_pri2_tc.

Signed-off-by: Mengchen Teng &lt;teng_mengchen@163.com&gt;
</content>
</entry>
<entry>
<title>[docs][utest]:Add comments for smp_affinity_pri2</title>
<updated>2025-11-26T14:51:25Z</updated>
<author>
<name>Tm-C-mT</name>
<email>490534897@qq.com</email>
</author>
<published>2025-11-20T03:28:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=cafd9c6dfea305eb664d1d94c5713d6a5f53ad47'/>
<id>urn:sha1:cafd9c6dfea305eb664d1d94c5713d6a5f53ad47</id>
<content type='text'>
Add comments for smp_affinity_pri2

Signed-off-by: Mengchen Teng &lt;teng_mengchen@163.com&gt;
</content>
</entry>
<entry>
<title>[docs][utest]:Add comments for smp_affinity_pri1</title>
<updated>2025-11-26T14:51:25Z</updated>
<author>
<name>Tm-C-mT</name>
<email>490534897@qq.com</email>
</author>
<published>2025-11-20T02:49:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=ea37d4c2c931c3efb6da8b7cc68854fcf93ddfd0'/>
<id>urn:sha1:ea37d4c2c931c3efb6da8b7cc68854fcf93ddfd0</id>
<content type='text'>
Add comments for smp_affinity_pri1

Signed-off-by: Mengchen Teng &lt;teng_mengchen@163.com&gt;
</content>
</entry>
<entry>
<title>[docs][utest]:Add explanatory comments for the utest of thread allocation for idle harts</title>
<updated>2025-11-19T08:15:47Z</updated>
<author>
<name>Tm-C-mT</name>
<email>490534897@qq.com</email>
</author>
<published>2025-11-19T08:02:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=573c5489fa61f2466ed41e66d47792d803703443'/>
<id>urn:sha1:573c5489fa61f2466ed41e66d47792d803703443</id>
<content type='text'>
Add explanatory comments for the utest of smp_assigned_idle_cores.

Signed-off-by: Mengchen Teng &lt;teng_mengchen@163.com&gt;
</content>
</entry>
</feed>
