Commit Graph
83 Commits
Author SHA1 Message Date
Sebastian Huber 64d9fc6e01 doxygen: Fix group memberships in libtest 2023-07-28 12:25:01 +02:00
Sebastian Huber 3ba43da922 score: Move <rtems/score/gcov.h>
Move <rtems/score/gcov.h> to <rtems/test-gcov.h>.  These functions do
not belong to an super core service.
2023-07-28 11:58:32 +02:00
Sebastian Huber 527af2b7f2 score: Move formatted I/O functions
These functions do not belong to an super core service.
2023-07-28 11:58:32 +02:00
Sebastian Huber f99f5cec85 libtest: Place files into a Doxygen group
Canonicalize the file headers.

Update #3707.
2023-07-26 07:18:29 +02:00
Sebastian Huber bcef89f236 Update company name
The embedded brains GmbH & Co. KG is the legal successor of embedded
brains GmbH.
2023-05-20 11:05:26 +02:00
Sebastian Huber 1be6dc18d3 libtest: Fix warnings without a pragma
It seems that recent GCC versions expect that functions with a "const type *"
parameter will read from the referenced location.

Update #4662.
2022-08-31 13:20:49 +02:00
Sebastian Huber 7219d3c0e9 libtest: Add T_report_hash_sha256_update()
Update #3716.
2022-08-10 07:51:14 +02:00
Sebastian Huber 7452f67dd9 gcov: Add wrapper to dump the gcov info
Update #4670.
2022-07-04 08:29:52 +02:00
Sebastian Huber 4f87edbb75 gcov: Add functions to dump the gcov information
Update #4670.
2022-07-04 08:29:52 +02:00
Ryan Long a0a9248d64 t-test-checks-psx.c: Add file headers and licenses
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
2022-05-04 09:12:07 -05:00
Sebastian Huber 6aa0552403 libtest: Increase line length
Update #3716.
2022-03-24 11:10:48 +01:00
Sebastian Huber cc1c944042 libtest: Add scheduler test support
Add support to record scheduler operations.  This support is especially
important for tests in SMP configurations since the thread switch extension is
quite difficult to use due to the asynchronous nature of thread dispatching.
In contrast, the scheduler operations occur normally in a deterministic order.

Update #3716.
2022-03-24 11:10:48 +01:00
Joel Sherrill 1db3d3c3ee cpukit/libtest: Change license to BSD-2
Updates #3053.
2022-03-22 11:34:23 -05:00
Joel Sherrill 255fe433fd cpukit/: Scripted embedded brains header file clean up
Updates #4625.
2022-03-10 08:43:49 +01:00
Sebastian Huber 8657986989 libtest: Check for pending events
Make sure there are no pending events after a test case.
2021-12-22 10:29:13 +01:00
Sebastian Huber e543a1695b libtest: Fix sample reporting
The sample reporting wronly added values to the wrong bin in some cases.
2021-12-07 12:53:40 +01:00
Sebastian Huber 5e3607bc7d libtest: Fix overlap in measurement context 2021-12-07 12:53:39 +01:00
Sebastian Huber 69aaf58745 libtest: Improve the interrupt test timing
If no state change occurred during the test action, then assume a late
interrupt.
2021-11-15 08:56:53 +01:00
Sebastian Huber 0221da5f56 rtems: Fix rate monotonic statistics
The rate monotonic period statistics were affected by
rtems_cpu_usage_reset().  The logic to detect and work around a CPU
usage reset was broken.

The Thread_Contol::cpu_time_used is changed to contain the processor
time used throughout the entire lifetime of the thread.  The new member
Thread_Contol::cpu_time_used_at_last_reset is added to contain the
processor time used at the time of the last reset through
rtems_cpu_usage_reset().  This decouples the resets of the CPU usage and
the rate monotonic period statistics.

Update #4528.
2021-10-25 08:01:02 +02:00
Sebastian Huber a6636d9957 libtest: Improve T_now_tick()
The T_now_tick() is a fall back time measurement using the CPU counter
in case no Clock Driver is configured.  Some CPU counter may overflow
during the test execution.  Accumulate the elapsed time to reduce the
chance of CPU counter overflows.
2021-09-21 07:39:09 +02:00
Sebastian Huber 34099baa9c libtest: Return fixture context in T_case_begin()
This makes it similar to T_push_fixture().
2021-09-02 08:54:58 +02:00
Sebastian Huber 98a57511b6 score: Add _Per_CPU_Submit_job() 2021-07-29 09:03:50 +02:00
Sebastian Huber 5b97821bc8 libtest: Fix use of flexible array member
Flexible array members must not appear in the middle of a structure.
2021-05-03 06:58:53 +02:00
Sebastian Huber c96644e873 libtest: Print SHA256 hash in base64url 2021-02-26 09:10:09 +01:00
Sebastian Huber 74eff26c1d libtest: Report target hash
Update #4267.
2021-02-26 09:10:09 +01:00
Sebastian Huber da8ad67e88 libtest: Report build label
Update #4269.
2021-02-25 16:16:20 +01:00
Sebastian Huber 5be6e61481 libtest: Add support to seize/surrender objects 2021-02-24 09:22:36 +01:00
Sebastian Huber 788fa865fb libtest: Add T_get_thread_timer_state() 2021-02-08 08:44:14 +01:00
Sebastian Huber 8f7baef4a6 libtest: Remove double definition 2021-02-01 14:19:28 +01:00
Sebastian Huber 23f4e5b6c9 libtest: Fix implicit type conversions
This fix relates to a Coverity issue (PW.MIXED_ENUM_TYPE).
2021-02-01 06:22:20 +01:00
Sebastian Huber 3b8137b094 libtest: Check return values with RTEMS_DEBUG
This fix relates to a Coverity issue (UNINIT).
2021-02-01 06:22:20 +01:00
Sebastian Huber e269e389ea libtest: Remove superfluous NULL pointer check
This fix relates to CID 1468683 (REVERSE_INULL).
2021-01-27 19:08:29 +01:00
Sebastian Huber 426b6cdba9 libtest: Use dependency injection
This helps static analyzers.
2021-01-27 19:08:29 +01:00
Sebastian Huber aa1c6ddd5c libtest: Fix undefined setjmp() behaviour
Bug was introduced by 78baeb7579.

Update #3199.
2020-11-24 07:38:41 +01:00
Sebastian Huber c542345b25 libtest: Simplify "Load" environment reporting
Report all runtime measurement environments with a name only and encode
the worker count of the "Load" environment in the name.

Update #3199.
2020-11-19 08:39:02 +01:00
Sebastian Huber 78baeb7579 libtest: Allow assert checks during test begin
Allow assert checks in test begin actions and setup fixture methods.
2020-11-19 08:39:02 +01:00
Sebastian Huber d2bc5945d3 libtest: Rename ValidCache in FullCache
This name better reflects the execution envirnoment in which the cache
is fully loaded with valid data unrelated to the body request handler.
2020-11-19 08:39:02 +01:00
Sebastian Huber 8882635636 libtest: Add primitive test case memory allocator
This primitive test case memory allocator uses memory from the low-level
memory information provided by the BSP.  At the beginning of each test
case, the memory available to the test case is reinitialized.  This
allows the use of a simple allocate only allocator.
2020-11-19 08:39:02 +01:00
Sebastian Huber 33cd037bf1 libtest: Simplify runtime measurement support
Use the test case allocator functions T_zalloc() and T_malloc().
Restore the task affinity of the runner task.
2020-11-19 08:39:02 +01:00
Sebastian Huber eae22cc03e libtest: Make test case allocator configurable 2020-11-19 08:39:02 +01:00
Sebastian Huber a72419b4de libtest: Remove superfluous assignment
Issue found by Coverity (CID 1437643).
2020-09-24 18:07:50 +02:00
Sebastian Huber 98d2adb935 libtest: Fix T_thread_switch_record()
If RTEMS_DEBUG is not defined, then we have to explicitly set the node
off the chain.

Update #3199.
2020-09-17 17:42:25 +02:00
Sebastian Huber c728948434 libtest: Add T_push_plan() and T_pop_plan()
Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber 13acd90003 libtest: Use a destructor
Do not set up a new test steps environment.

Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber 72960bc7d4 libtest: Change T_step() and T_assert_step()
Normally, the expected test step must be a compile time constant.  Allow
variable expected test steps for the T_step() and T_assert_step().  This
can be used for parameterized test loops with individual fixtures.

Remove the ability to use custom failure messages due to some
implementation constraints.

Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber 5383d4db04 libtest: Add fixture steps
Support a new test plan for each nested fixture.

Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber 33eb113c36 libtest: Add T_check_steps()
Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber cbc1ba341d libtest: Use line buffer in T_check()
Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber 5d614fdfa7 libtest: Add T_puts()
Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber a7af34d0cf libtest: Add T_do_is_runner()
Update #3199.
2020-08-18 07:08:51 +02:00