Commit Graph

230 Commits

Author SHA1 Message Date
Joel Sherrill
3a5a39c765 validation/tr-event-send-receive.c: Address -Wsign-compare warnings
Most of these warnings were between int or ssize_t and size_t.
In particular, various POSIX system calls like read() and write()
return ssize_t and comparing that value with the sizeof a buffer
is a common source of these warnings. Another common source is
using an int as the iterator in a for loop with the limit being
a size_t.

With the type change, some printf() specifiers needed to change also.
2026-01-22 23:24:35 +00:00
Joel Sherrill
e715ddc63c testsuites/.../tc-timecounter-install.c: Address << of negative value
This change was made to address GCC -Wshift-negative-value.
Shifting a negative value is undefined in the C programming language
because one's and two's complement representations give different
results.

Closes #5385.
2025-12-04 18:47:30 -06:00
Martin Erik Werner
e727b24ea3 cpukit: Add msg broadcast non-atomicity to doc
rtems_message_queue_broadcast() may, under certain circumstances, copy
the message to tasks which were not waiting on the message queue when
the broadcast started, and may copy the message multiple times to the
same task.

This behaviour is, based on discussion in #4804, something that might
not change in the short term, so expose it in the user documentation.

The wording is copied with modifications from an existing internal
requirements note.

Also correct "none-atomic" -> "non-atomic" in said internal requirements
note.

The changes were auto-generated from rtems-central.
2025-11-20 22:09:39 -06:00
Gedare Bloom
11278685f6 testsuites/validation: use default max priority
Updates #5390.
2025-11-17 16:25:27 -07:00
Sebastian Huber
e45e0d2e5b validation: Address unused parameter
Mark the parameter as unused in uniprocessor configurations.
2025-10-29 07:16:41 +00:00
Sebastian Huber
b2ca47e5a1 validation: Address unused parameters
Address unused parameters in the code generator.
2025-10-28 19:54:03 +00:00
Sebastian Huber
ce741f81cb validation: Do not use reserved "ctx" name
The name "ctx" is reserved for the test context.
2025-10-28 19:54:03 +00:00
Sebastian Huber
82ad3746f9 validation: Remove unused parameters
Remove actually unused parameters which would have been flagged by a
warning.
2025-10-28 19:54:03 +00:00
Sebastian Huber
e66a33fd7a validation: Address -Wclobbered warnings
Use functions with const parameters and const local variables
to silence -Wclobbered warnings.

Updates #5364.
2025-10-28 19:52:56 +00:00
Gedare Bloom
523b97ed40 cpukit/rtems: regenerate basedefs with fallthrough
Regenerate basedefs from specifications with RTEMS_FALL_THROUGH().
2025-10-13 19:02:19 +00:00
Gedare Bloom
cec9935c33 testsuites/validation: fix setjmp UB
Storing the return value of setjmp to a local variable is
undefined behavior.

Fixes #5373.
2025-10-09 09:22:55 -06:00
Joel Sherrill
30752f5df4 testsuites/validation/tx-thread-queue.c: Address -Wclobbered warning
Code should not rely on the contents of local variables set before
setjmp() after the longjmp() returns. In this case, it was notpossible
to reset events after the return. But analysis determined that the
longjmp() should always returns to the same stack frame. Thus local
variables should be preserved. The warning was disabled.

This case was not addressed by adding the "returns_twice" attribute
to setjmp() in setjmp.h.

Updates #5364.
2025-10-03 16:38:17 -05:00
Joel Sherrill
96c2793709 testsuites/validation/tc-task-restart.c: Address -Wclobbered warning
Code should not rely on the contents of local variables set before
setjmp() after the longjmp() returns. In this case, it was possible
to set cpu_self after the return from setjmp().

This case was not addressed by adding the "returns_twice" attribute
to setjmp() in setjmp.h.

Updates #5364.
2025-10-03 16:38:00 -05:00
Joel Sherrill
748758758b testsuites/validation/*: Address unused parameter warnings
Fixed many warnings for unused parameters. Some cases were
a simple matter of adding "(void) param" at the beginning
of the function, while others required ensuring that addition
was inside the proper conditional section. Found with GCC's
warning -Wunused-paramter.
2025-09-25 14:41:34 -05:00
Joel Sherrill
fa84f51442 testsuites/validation/tx-call-within-isr.c: Address dangling pointer
On the genmcf548x BSP variants, the "request" local variable was
flagged as having a pointer taken and passed to subroutines. GCC
is unable to detect that the "request" variable is removed from
the chain in an ISR. Disabled -Wdangling-pointer for the single
test function CallWithinISR().
2025-09-19 19:01:31 +00:00
Sebastian Huber
cfe232c935 validation: Rearrange storage-qualifier
Place _Thread_local after static to be in line with the rest of the
code.
2025-09-08 04:33:52 +02:00
Joel Sherrill
0dc1f06dbc testsuites/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Sebastian Huber
312ea98ed2 validation: Use Markdown formatting
This file is generated from specification items.  Use Markdown format.
2025-09-02 16:54:57 +00:00
Sebastian Huber
79ca48adcc rtems: Use single '`' for code phrases
These files are generated from specification items.  Use Markdown
format.
2025-09-02 16:54:57 +00:00
Sebastian Huber
10bcc955d3 validation: Fix formatting
Remove double blank lines.
2025-09-02 16:54:57 +00:00
Joel Sherrill
abc34bc5a8 testsuites/validation/tx-call-within-isr.c: Fix comparision warning.
GCC generated a warning for "comparison of distinct pointer types
lacks a cast [-Wcompare-distinct-pointer-types]." Added a cast to
fix this.
2025-07-24 17:51:27 -05:00
Sebastian Huber
7d5c08db80 validation: Check bootloader L2C settings
Update #4925.
2024-11-20 15:08:04 +00:00
Sebastian Huber
7ff3438cba validation: Test thread priority change detail
Test the proper serialization of explicit thread priority changes (for
example rtems_task_set_priority()) and thread priority changes carried
out by thread queues (locking protocols such as priority inheritance).

With RTEMS_DEBUG enabled, the new test case fails with an assertion.  It
is fixed in a follow up commit.

Update #5159.
2024-11-20 02:32:38 +01:00
Sebastian Huber
04f263ee82 validation: Add ticket lock helpers
Update #5159.
2024-11-20 02:32:11 +01:00
Sebastian Huber
f7b04e72f8 validation: Clarify SMP EDF test case
Update #3716.
2024-11-14 01:33:24 +01:00
Sebastian Huber
2aa921c3be validation: Fix synchronization issue 2024-09-19 04:35:20 +02:00
Sebastian Huber
1119981e7c tests: Enable ISR in fatal extensions
Fix code locations left over by commit
3332e54772.

Update #5067.
2024-09-19 04:34:38 +02:00
Sebastian Huber
3332e54772 score: Disable ISR for fatal extensions
Update #5067.
2024-08-23 14:54:37 +00:00
Sebastian Huber
e80883b406 score: Simplify _Terminate()
In _Terminate(), everything after invoking the fatal extensions is essentially
dead code.  Simplify this code block and provide a reasonable safe fall-back
for badly configured applications.  Just disable masked interrupts and execute
an idle loop.

Update #5067.
2024-08-23 14:54:37 +00:00
Sebastian Huber
89e795a42a validation: Fix bad thread dispatch validation
Where the robust thread dispatching is disabled, the
ISRDisabledOnDemandThreadDispatchTask() has to exit.

Update #3716.
2024-07-05 21:16:04 +00:00
Sebastian Huber
c847f4c101 validation: Fix comment
Update #5050.
2024-06-26 12:02:04 +02:00
Sebastian Huber
2953f4c6e3 rtems: Fatal error for rtems_cache_disable_data()
On some targets or configurations, the data cache cannot be disabled.
The data cache may be necessary to provide atomic operations.  In SMP
configurations, the data cache may be required to ensure data coherency.

Close #5050.
2024-06-25 03:58:34 +00:00
Sebastian Huber
19a30cfa07 validation: Fix cache invalidation test case
Make sure that the invalidated data cache lines are contained in the
buffer.
2024-06-25 03:58:34 +00:00
Sebastian Huber
050b61aab6 rtems: Add RTEMS_INTERRUPT_LOCK_NEEDS_OBJECT
If the RTEMS_INTERRUPT_LOCK_NEEDS_OBJECT define has a non-zero value,
then the interrupt lock operations require an object of type
rtems_interrupt_lock, otherwise no lock object is required.

This indication can be used to avoid the space overhead for lock objects
when they are not needed.  In this case, the lock operations will not
use a lock objects parameter.

Update #4957 and #5038.
2024-06-21 08:10:27 +02:00
Sebastian Huber
26a0bfcbc2 score: Improve _ISR_lock_Initialize()
Use do {} while (0) approach to avoid stray ';'.

Update #4957 and #5038.
2024-06-21 08:10:27 +02:00
Kinsey Moore
644041626d testsuites: Update lock init validation test
This test was broken by b031cf2b19 since
it expects the macros to evaluate to an empty string for non-SMP builds.
This updates the check for the new content.
2024-06-17 16:20:53 +00:00
Sebastian Huber
b89101116f validation: Improve interrupt controller tests
Update #3716.
2024-05-31 20:04:31 +00:00
Sebastian Huber
ab8817ca03 rtems: Add get/set interrupt priorities
Add directives to get and set the priority of an interrupt vector.

Implement the directives for the following BSP families:

* arm/lpc24xx
* arm/lpc32xx
* powerpc/mpc55xxevb
* powerpc/qoriq

Implement the directives for the following interrupt controllers:

* GICv2 and GICv3 (arm and aarch64)
* NVIC (arm)
* PLIC (riscv)

Update #5002.
2024-05-10 13:26:22 +00:00
Sebastian Huber
d7447b2a5e validation: Fix typo 2024-04-30 01:39:06 -04:00
Sebastian Huber
c594732cf2 validation: Improve bad thread dispatch validation 2024-04-30 01:39:06 -04:00
Sebastian Huber
087fc4351a bsps/xil-ttc: Improve clock driver
Make the clock driver parameters configurable.  Use the maximum counter
frequency to get the best time resolution.  Decouple the CPU counter from the
timecounter.  Make the tick catch up handling more robust.  Add a validation
test for the tick catch up.
2024-04-30 01:39:05 -04:00
Sebastian Huber
5a8e99546f bsps/xil-ttc: Add XIL_FATAL_TTC_IRQ_INSTALL 2024-04-30 01:39:05 -04:00
Sebastian Huber
7bc76732b0 validation: Fix powerpc in test case
The powerpc context switch restores the interrupt state.

Update #4955.
2024-04-30 01:39:05 -04:00
Matt Joyce
461f118ad0 validation/tc-sched-smp: Fix synchronization issue
Update #3716.
2024-03-11 14:37:55 +01:00
Sebastian Huber
93f927de26 tm27: Add TM27_INTERRUPT_VECTOR_ALTERNATIVE
The TM27 support may define TM27_INTERRUPT_VECTOR_ALTERNATIVE to provide
an alternative software generated interrupt request which is raised by
_TM27_Raise_alternative() and cleared by _TM27_Clear_alternative().
Both functions shall return an RTEMS status code.  This interrupt vector
may be used to test the interrupt controller support on targets which do
not provide generic software generated interrupts.

Update #3716.
2023-12-19 08:26:46 +01:00
Sebastian Huber
2e71bd08ba tm27: Add optional TM27_INTERRUPT_VECTOR_DEFAULT
Let the BSP define TM27_INTERRUPT_VECTOR_DEFAULT to more efficiently and
reliably get the TM27 default interrupt vector.

Update #3716.
2023-12-19 08:22:37 +01:00
Sebastian Huber
528f0e1947 validation: Add nested test case remarks
Close #4971.
2023-11-28 14:30:46 +01:00
Sebastian Huber
a180c138c7 validation: Remove superfluous includes
Update #3716.
2023-11-23 19:05:05 +01:00
Sebastian Huber
f279017882 validation: Improve MrsP validation
For uniprocessor configurations, the selection of
RTEMS_MULTIPROCESSOR_RESOURCE_SHARING results in a priority ceiling
mutex.

Build the MrsP validation tests only if RTEMS_SMP is enabled.

Update #3716.
2023-11-23 14:58:21 +01:00
Sebastian Huber
b414abcffe validation: Fix typos 2023-11-07 15:23:26 +01:00