summaryrefslogtreecommitdiff
path: root/test/smp/regression/threadx_timer_simple_test.c
AgeCommit message (Collapse)Author
2026-09-19Restored the missing licence headers on the ThreadX SMP regression testsFrédéric Desbiens
109 of the 110 tracked files in test/smp/regression carry no copyright notice and no licence text at all. The one that does was added this month. Everything else in the repository -- common/src, common_smp/src, the ports, the samples -- carries the standard header, so this is an oversight in one directory rather than a deliberate exemption, and it has been there since the tests were first published. The monoprocessor tree had the same gap and was fixed the same way. The header added here is byte identical to the one in common_smp/src, including its SPDX identifier. Nothing else in these files changes: every hunk is ten added lines and none removed. There is deliberately no "Eclipse ThreadX contributors" line and no AI disclosure paragraph -- this commit contributes no code, it records the licence the files were always under. A later change that does contribute code to one of these files adds the contributor line and its own attribution at that point, which is when there is something to attribute. Verified: all eight build configurations build clean and pass 109 of 109, and the coverage figure is unmoved at 5386/5450 lines and 2807/3610 branches over the union of the eight. Assisted-by: Claude Code (Opus 5) <[email protected]>
2026-09-17Gave the SMP timer simple test a ceiling instead of an exact countFrédéric Desbiens
threadx_timer_simple_test's ThreadX SMP copy clears the clock, activates a timer that first expires at tick 100 and then on every tick, sleeps 120 and requires the expiration counter to read exactly 23 and the clock exactly 120. Neither equality survives this port. The thread can be given a core a tick or two after its sleep expires, and expirations are processed by the system timer thread rather than in the interrupt, so under load the counter lags the clock and catches up afterwards. Two expirations were counted before the clock was cleared, so the counter can never exceed the clock less 97. That ceiling is exact, is what catches a timer expiring too often, and is now the upper bound. The lower bound is a floor of twenty: the timer expired at least eighteen of the twenty one times it was given, where a period of two ticks reaches thirteen and fails. The clock must have reached 120 and is read once into a local, because the interrupt that advances it advances the counter too and does the clock first. Measured over four hundred runs across the eight build configurations, half with the machine deliberately loaded, the counter read 22 or 23 and the clock 120, 121 or 122. Before the port's mutex defect was fixed the same check saw 27 at a clock of 127, which the new bounds also admit. Verified in default_build_coverage: passes as before, and with the timer's reschedule period changed from one tick to two it reports ERROR #28 and exits 1. Assisted-by: Claude Code (Opus 5) <[email protected]>
2023-04-04Release ThreadX regression systemTiejun Zhou