Commit Graph

5347 Commits

Author SHA1 Message Date
Sebastian Huber
8c5fa6e1fc sptests: Do not use deprecated volatile operation
C++20 deprecated some volatile operations including increments.

Update #5505.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-03-06 11:30:16 -06:00
Sebastian Huber
632b1a755b smptests: Fix variable set but not used
Fix this warning.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-03-02 23:21:49 +01:00
Sebastian Huber
69c80e8ec9 libtests: Fix variable 'remains' set but not used
Fix this warning.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-03-02 23:21:49 +01:00
Sebastian Huber
2f6518d639 libtests: Fix variable 'i' set but not used
Fix this warning.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-03-02 23:21:49 +01:00
Gedare Bloom
d0ed4843ff validation: regenerate from central
updates #5143
2026-03-02 10:04:32 -06:00
zak liang
82a4e3dfc2 cpukit: Support dates later than 2100
These changes eliminate the year 2100 as a limit for TOD. The new
limit is the year 4096. This limit is not due to any RTEMS limitation
but just before the year 4183 when the rounding error in the length
of the year adds up to an entire day. See
https://de.wikipedia.org/wiki/Schaltjahr for details.

There are still limits on Classic APIs which use the 32-bit rtems_interval
type. This corresponds to the Score Watchdog_Interval type. This impacts
delays, timeouts, and Classic API "after" timers.

Closes #5143

Co-authored-by: Joel Sherrill <joel@rtems.org>
Co-authored-by: Gedare Bloom <gedare@rtems.org>
2026-03-02 10:04:32 -06:00
Kinsey Moore
3d396291c3 testsuites/spclock_err02: Fix status assert descriptors
This fixes the descriptors provided in asserts that check the status to
reflect the function that is actually being checked.
2026-02-26 16:31:09 -06:00
Kinsey Moore
fd017c4628 testsuite/sp2038: Fix screen capture content
The screen capture sample content does not have a correct test header or
footer.
2026-02-26 16:30:07 -06:00
Sam Price
03a2e44c9c tc-cpuuse.c: magic number cleanup
Cleanup magic number for readability.
2026-02-12 18:32:13 -06:00
Prashant Rahul
97e4174c62 cpukit/stringto: return RTEMS_INVALID_ADDRESS when null input string
libc's strto* functions' behaviour isn't defined when the passed string
is NULL. In glibc it causes a seg fault when I tested it. This could
cause inconsistency.
rtem's stringto* functions didnt previously checked for null before
passing to underlying strto* functions.

Added the check which returns `RTEMS_INVALID_ADDRESS` on failure.

Also added a test case for the same

Signed-off-by: Prashant Rahul <prashantrahul141@protonmail.com>
2026-02-06 17:47:28 +00:00
Joel Sherrill
ec5d809fa2 fstests/fsrdwr: Address -Wsign-compare warnings
This warning occurs when comparing a signed variable to an unsigned one.
This addresses warnings that only occurred on 64-bit targets.  For the
ones which only appeared on 64-bit targets, the cause was frequently
a mismatch when comparing a combination off_t, ssize_t, and int.
2026-02-05 17:39:08 +00:00
Joel Sherrill
d1ae8a1805 smptests: Address warnings
Most of the warnings were -Wsign-compare.
2026-02-05 00:15:43 +00:00
Preetam Das
d2a3897992 testsuites/samples: Fix minor typo in cdtest output
Corrected spelling of 'execption' to 'exception' in foo_function.
2026-02-04 23:55:01 +00:00
Joel Sherrill
c9f85784d3 bsps & testsuites: Fix SPDX/license mismatch
These files had BSD-2 Clause SPDX but the license text still
was the historical license.

Updates #3053.
2026-02-02 15:19:52 -06:00
Gedare Bloom
da0c99d2a1 testsuites/fstests: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
689913555d testsuites/sptests: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
c9101cef19 testsuites/mptests: reformat with clang-format
Updates #3860.
Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
834a0350b5 testsuites/tmtests: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
7c24bcced0 testsuites/support: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
f5d93a7421 testsuites/smptests: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
57ea3fe79f testsuites/samples: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
f2b17295cb testsuites/rhealstone: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
87e4f79bd1 testsuites/psxtmtests: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
077fbf519b testsuites/psxtests: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
4d1604efb6 testsuites/libtests: reformat with clang-format
Updates #3860.

Updates #5358.
2026-02-02 14:35:59 -06:00
Gedare Bloom
71ec6ca8c7 libtests/stringto01: remove duplicated macros
The __STRING and __XSTRING are defined in cdefs.h. Delete from the test.
2026-02-02 14:35:59 -06:00
Joel Sherrill
efe6dd524c testsuites/fstests/fsrdwr/init.c: Address -Wsign-compare warnings
This warning occurs when comparing a signed variable to an unsigned one.
This addresses warnings that only occurred on 64-bit targets.  For the
ones which only appeared on 64-bit targets, the cause was frequently
a mismatch when comparing a combination off_t, ssize_t, and int.
2026-02-02 12:48:43 -06:00
Joel Sherrill
55d18c302e fstests: Address -Wsign-compare warnings
This warning occurs when comparing a signed variable to an unsigned one.
This is frequently an int or ssize_t variable compared to a uint32_t or
size_t. Sometimes the size_t is from a sizeof() use.
2026-01-28 19:14:53 +00:00
Joel Sherrill
3a61921132 mp misc: Address build failures and warnings
Changes required to build with RTEMS_MULTIPROCESSING and
associated tests without warnings.
2026-01-27 18:20:55 +00:00
Joel Sherrill
b8d245499e testsuites/sptests/spcache01/init.c: Address -Wclobbered warning
This warning indicates the potential for using a local variable which
is not guaranteed to be preserved across a setjmp()/longjmp() pair.

Updates #5364.
2026-01-24 00:07:29 -06:00
Kinsey Moore
5efed52222 cpukit/sapi/src/interrtext.c: Add missing definition
This adds a missing text description for an internal error and updates
the spinternalerror02 test to check for the correct end of internal
error definitions.
2026-01-23 01:30:49 +00:00
Joel Sherrill
a5d3e5e8ef smptests: 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 17:30:54 -06:00
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
f7911033b5 testsuites/samples/fileio/init.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
3e0cf85d9c sptests: 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:19:32 +00:00
Joel Sherrill
38fa44e802 psxtests, psxtmtests: Correct spelling
Caught by Codespell
2026-01-22 23:15:56 +00:00
Joel Sherrill
9292d681af psxtests, psxtmtests: 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:15:56 +00:00
Joel Sherrill
5ba440ce86 libtests: Address -Wsign-compare warnings
Most of these warnings were between int or ssize_t and size_t.
In particular, read() and write() return ssize_t and comparing
that value with the sizeof a buffer is a source of these warnings.

With the type change, some printf() specifiers needed to change also.
2026-01-22 23:10:51 +00:00
Joel Sherrill
babe771820 fstests: Correct spelling
Caught by Codespell
2026-01-22 11:52:27 -06:00
Joel Sherrill
bd2055cf5a fstests: 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 11:52:27 -06:00
prashantrahul141
c2eb7644ce tests/psximfs03: reduce MEMORY_SIZE to 8k, add prefix g_ to globals
psximfs configures block size to 16, which sets maximum file size to be
1328 bytes. see
https://docs.rtems.org/docs/main/c-user/config/filesystem.html#configure-imfs-memfile-bytes-per-block

Using 8k would suffice and also some bsps, like the sparc/erc32 simply
doesnt have enough memory to be able to allocate 1000000000 bytes.

the global binding `memory` is confusing because deallocator() and
fill_space() have a parameter with the same name.

Signed-off-by: prashantrahul141 <prashantrahul141@protonmail.com>
2026-01-04 00:59:16 +05:30
Karthikey Kadati
d88a475194 testsuites/psxtests: Fix unused parameter warnings in Init
Silences -Werror=unused-parameter warnings in psximfs and psximfs04
tests by explicitly casting the unused argument to void. This fixes
the build on strict compilers.
2025-12-18 18:56:02 -06:00
Mazen Adel Elmessady
1477839d2a testsuites/psxtests: Added API header OK tests for Posix 8
Added API header OK test in psxtests/psxhdrs
as a part of my work to GSoC 25
note that functions ppoll(), sem_clockwait() and timespec_get()
don't have a prototype yet so the tests will fail. I won't
add them to the libpsxhdrs.yml file until my PR is approved in newlib.
2025-12-12 09:30:28 -06:00
Bhavya Shah
1b440d2807 imfs/large_block_size: Modified imfs for large block size
- Added testcase psximfs04 to test the block size
- Modified confdefs/libio.h for block size 1024
2025-12-11 17:51:35 -06:00
Bhavya Shah
6367099ec0 imfs/user_allocator: Add user-configurable allocator support
- Extend IMFS and libio headers to define default allocator/deallocator ops
  and logic for configuring memfile_ops.
- Update imfs_memfile to use custom allocators for memory blocks.
- Fix imfs_statvfs.f_bfree calculation to respect user-defined ops.
- Add psximfs03 test case to validate custom allocator behavior.
- Refactor psximfs01 to share helper functions with psximfs03.
2025-12-11 17:45:13 -06:00
Ayush Daga
05629d07e2 bsps: Fix obsolete libbsp paths
Updated comments and documentation files across the bsps directory
to replace obsolete references to libbsp with their new locations
in the bsps directory.

Updates #5323
2025-12-11 12:03:56 -06:00
yang.zhang
fa4fa33864 testsuites/psxtests/psxtimes01/init.c: Fix build error 2025-12-09 15:42:06 +08:00
Joel Sherrill
75df51e7fd testsuites/unit/tc-score-msgq.c: Fix enum conversion warnings
The GCC warning -Wenum-conversion flagged the call to
_Core_message_queue_Submit() as returning a Status_Control
but the caller assigned it to a variable of type rtems_status_code.
2025-12-08 20:10:02 +00:00
Joel Sherrill
c9297992a2 testsuites/sptests/spsimplesched02/init.c: Fix enum conversion warning
The GCC warning -Wenum-conversion flagged assigning the return value
from _Objects_Name_to_id_u32 to an rtems_status_code variable. It
returns a Status_Control value.
2025-12-08 20:10:02 +00:00
Mazen Adel Elmessady
ff63275812 cpukit/posix: Add timespec_get() support to RTEMS
Added the implementation of timespec_get() with tests.
The implementation used clock_gettime() as a reference.
The tests used psxtimes01 as a reference.

Updates
rtems/programs/gsoc#69
2025-12-05 17:00:55 -05:00