Commit Graph

5321 Commits

Author SHA1 Message Date
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
Joel Sherrill
a37204f86f tmtests/tm05/task1.c : Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:58:44 -06:00
Joel Sherrill
e4a63b12d5 testsuites/psxtests: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:58:44 -06:00
Joel Sherrill
16234ea47b libtests/tar01/init.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:58:44 -06: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
Kinsey Moore
20faa90860 bsps/shared/dev/flash: Add a flashdev simulation backend
This adds a backend for flashdev that simulates a flash device with
adjustable delays to simulate real flash devices and offers
configurable flash parameters. This also migrates the JFFS2
filesystem tests to the flashdev framework and eliminates the
purpose-built simulated flash in the testsuite in favor of a more
generic and widely usable solution.
2025-12-04 14:12:55 -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
802b761ef6 sptest/spedfsched03: verify priority APIs for EDF
Ensure that deadline-driven tasks return a priority of 0, and
that maximum priority values are configurable.

Updates #5390.
2025-11-17 16:26:11 -07:00
Gedare Bloom
11278685f6 testsuites/validation: use default max priority
Updates #5390.
2025-11-17 16:25:27 -07:00
Gedare Bloom
22e9ccdda2 smptests/smpscheduler02: use default max priority
Updates #5390.
2025-11-17 16:25:27 -07:00
Gedare Bloom
c951686b13 cpukit: Use CONFIGURE_MAXIMUM_PRIORITY with EDF
Uses the CONFIGURE_MAXIMUM_PRIORITY to set the priority range for
EDF and CBS schedulers under the control of applications.
The default priority behavior is now the same as other schedulers.
The user API to get a task's current priority returns 0 for deadline
driven tasks.

Fixes #5390
2025-11-17 16:25:27 -07:00
Sepehr Ganji
bff18c05b9 libfs/fatfs: Add FatFS with tests
This adds FatFS wrapper layer to RTEMS
including tests as part of GSoC 2025.
2025-11-10 16:09:07 -07:00
Aaron Nyholm
0e20f50870 testsuites/fstests/fsclose01: Fix expected flags
close() now holds a reference to the IOP this changes the
expected flags in the test. This change reflects that.
Updates #5311
2025-11-05 19:50:46 +00: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
Joel Sherrill
c49cfbf9a9 testsuites/psxtests/*/init.c: Address type limit warnings
GCC generates type limit warnings when comparison is always true or
always false due to the limited range of the data type, This was in a
termios structure. For most of the cases in RTEMS, this was when
a variable of an unsigned type was compared to be < or <= 0.
2025-10-28 19:33:35 +00:00
Joel Sherrill
363afebd67 spclock_todhook01/init.c: Address missing field initializer warning (tm)
These were struct tm declarations with initialization. The initialization
was changed to using named fields.

Updates #5325.
2025-10-14 14:39:20 -05:00
Joel Sherrill
5c24413f4d psxclassic01/init.c: Address missing field initializer warning (siginfo)
This one a siginfo_t declaration with initialization.  The initialization
was changed to using named fields.

Updates #5325.
2025-10-14 14:28:27 -05:00
Joel Sherrill
1d08df678b testsuites/*: Address missing field initializer warnings (extensions)
Address missing field initializer warnings.

These were rtems_extensions_table declarations with initialization.
The initialization was changed to using named fields.

Updates #5325.
2025-10-14 14:24:30 -05:00
Joel Sherrill
87f5aa145b testsuites/samples/fileio: Address missing field initializer warnings
Address missing field initializer warnings.

These were rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization.  The initialization was changed to using named
fields.

Updates #5325.
2025-10-14 14:23:59 -05: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
Joel Sherrill
abe86999de testsuites/smptests: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00
Joel Sherrill
d3370aa627 testsuites/mptests: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00
Joel Sherrill
474b034cca testsuites/psxtests: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00