Commit Graph

154 Commits

Author SHA1 Message Date
Sebastian Huber
b422aa3f4a tests: Remove configure feature checks
Update #3409.
2018-05-02 07:11:03 +02:00
Sebastian Huber
3205fd6ad9 tests: Use vprintk() in locked_printf()
This avoids blocking output and the use of the floating-point unit.
2018-01-19 09:53:34 +01:00
Sebastian Huber
047e8aa952 tests: Remove unused locked_printk() 2018-01-19 09:53:18 +01:00
Sebastian Huber
c59479faa8 tests: Use exponential backoff in locked_vprintf()
Without the exponential backoff a livelock was observed on a QorIQ P2020
with test SMP 5.
2017-11-22 09:40:24 +01:00
Chris Johns
e6df806a3f tests: Use ld to map (wrap) printf, puts and putchar to tester functions.
- Remove the macro defines and the need for tmacro.h by remapping the
  symbols using ld's wrap option.
- Remove FLUSH_OUTPUT, it was empty.
- Move rtems_test_exit to libmisc/testsupport as a function.

Update #3199.
2017-11-11 16:14:59 +11:00
Chris Johns
bcd0c06c9b tests: Use rtems_test_begin and rtems_test_end.
Add a tests enum and move all test banner test to the library in libmisc.

Update #3199.
2017-11-11 16:14:59 +11:00
Sebastian Huber
af4355459e tests: Remove TEST_INIT
The TEST_EXTERN is a used only by the system.h style tests and they use
CONFIGURE_INIT appropriately.

Update #3170.
Update #3199.
2017-10-28 13:33:56 +02:00
Sebastian Huber
7e1029158e tests: Use rtems_test_printer in general
Update #3170.
Update #3199.
2017-10-28 13:33:55 +02:00
Sebastian Huber
f703e7f5c7 tests: Move rtems_test_printer definition
Statically initialize it to use printk().

Update #3170.
Update #3199.
2017-10-28 13:33:55 +02:00
Chris Johns
98c6d50145 testsuite: Use printk for all test output where possible.
- Remove the printf support leaving the direct printk support configured
  with TESTS_USE_PRINTK and all other output goes via a buffered vsniprintf
  call to printk.
- Control the test's single init for functions and global data with
  TEST_INIT and not CONFIGURE_INIT. They are now separate.

Updates #3170.
2017-10-23 16:25:45 +11:00
Sebastian Huber
533ac1126c tests: Use more integer print functions
This avoids an unnecessary use of the floating point unit.

Update #3076.
2017-07-18 14:13:47 +02:00
Joel Sherrill
d420b679af Merge tmacros.h PRIxxx constants from testsuites/ into <rtems/inttypes.h>
This completes the initial creation of rtems/inttypes.h based on all
existing PRIxxx definitions contained in RTEMS Project owned code.

closes #2983.
2017-04-18 11:24:46 -05:00
Chris Johns
258bda306b testsuite: Add a common test configuration. Fix configure.ac and Makefile.am errors.
- Add a top level test configuration file for test states that are common
  to all BSPs. This saves adding a test configuration (tcfg) file for
  every BSP.

- Add the test states 'user-input' and 'benchmark'. This
  lets 'rtems-test' stop the test rather than waiting for a timeout or
  letting a benchmark run without the user asking for it to run.

- Implement rtems-test-check in Python to make it faster. The shell script
  had grown to a point it was noticably slowing the build down.

- Fix the configure.ac and Makefile.am files for a number of the
  test directories. The files are difficiult to keep in sync with the
  number of tests and mistakes can happen such as tests being left
  out of the build. The test fsrofs01 is an example. Also a there was
  a mix of SUBDIRS and _SUBDIRS being used and only _SUBDIRS should be
  used.

- Fix the test fsrofs01 so it compiles.

Closes #2963.
2017-04-04 08:24:22 +10:00
Sebastian Huber
c341463c97 tmacros.h: Fix print defines 2017-02-14 08:59:23 +01:00
Chris Johns
28fda6279b testsuite: Add test states to the testsuit configuration files.
Change the testsuite configuration files to hold state information about
a test. The states are:

 exclude        - Do not build the test
 expected-fail  - The test is expected to fail
 indeterminate  - The test may pass or may fail

A message is printed just after the test's BEGIN message to indicate
there is a special state for the test. No state message means the test
is expected to pass.

This support requires tests are correctly written to the use standard
support to begin and end a test.
2016-12-07 17:22:41 +11:00
Sebastian Huber
ede1a4182d Make rtems/print.h independent of rtems/bspIo.h 2016-06-22 07:29:26 +02:00
Sebastian Huber
dbedcf93f0 testsuites: Fix locked_printf() test printer 2016-05-26 21:41:47 +02:00
Chris Johns
61ea345158 testsuite: Fix printk formating warning. 2016-05-25 15:47:34 +10:00
Chris Johns
24d0ee57a4 cpukit, testsuite: Add rtems_printf and rtems_printer support.
This change adds rtems_printf and related functions and wraps the
RTEMS print plugin support into a user API. All references to the
plugin are removed and replaced with the rtems_printer interface.

Printk and related functions are made to return a valid number of
characters formatted and output.

The function attribute to check printf functions has been added
to rtems_printf and printk. No changes to remove warrnings are part
of this patch set.

The testsuite has been moved over to the rtems_printer. The testsuite
has a mix of rtems_printer access and direct print control via the
tmacros.h header file. The support for begink/endk has been removed
as it served no purpose and only confused the code base. The testsuite
has not been refactored to use rtems_printf. This is future work.
2016-05-25 15:47:34 +10:00
Joel Sherrill
15068f4c9a Remove AVR port
closes #2443.
2016-01-19 19:40:42 -06:00
Sebastian Huber
ec84273de4 score: Replace _API_Mutex_Is_locked()
Replace _API_Mutex_Is_locked() with _API_Mutex_Is_owner().
2015-05-27 12:24:24 +02:00
Joel Sherrill
fc0756e8d9 Add test assertion for allocator mutex being unlocked
The Allocator Mutex should not be locked outside a tested
service call. In an SMP test or heavily multithreaded test,
this is possible since another thread could have the lock
for an extended period of time but this is not the norm
for the tests.

updates 2319.
2015-04-14 11:17:10 -05:00
Joel Sherrill
f7d27953cb testsuites/.../tmacros.h: Add parentheses to fix warning 2014-11-24 13:57:21 -06:00
Joel Sherrill
163519a055 libtests/malloctest/init.c: Fix warning
posix_memalign() is prototyped to take a non-NULL parameter. But our
test is deliberately passing one in. With the -Wnon-null warning flag
enabled, we will always get warnings on this test unless we disable
that warning for this single test case.
2014-11-20 12:57:33 -06:00
Sebastian Huber
3e739ae95f testsuites: Move include for C++ compatibility 2014-10-23 10:21:41 +02:00
Joel Sherrill
8fbe2e69b5 Use correct prototype of benchmark_timer_read()
This change starts with removing the effectively empty file
timerdrv.h. The prototypes for benchmark_timer_XXX() were in
btimer.h which was not universally used. Thus every use of
timerdrv.h had to be changed to btimer.h. Then the prototypes
for benchmark_timer_read() had to be adjusted to return
benchmark_timer_t rather than int or uint32_t.

I took this opportunity to also correct the file headers to
separate the copyright from the file description comments which
is needed to ensure the copyright isn't propagated into Doxygen
output.
2014-09-16 16:09:12 -05:00
Sebastian Huber
b97bc8bc71 tests: Add locked_printf_plugin()
Add locked_vprintf().  Return an int just like printf(), etc.
2014-05-07 18:27:19 +02:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
840ae715a9 sapi: Add <rtems/test.h>
Provide support functions to print the begin/end of test message.
Provide a test fatal extension to print out profiling reports in the
future.
2014-03-17 09:17:36 +01:00
Sebastian Huber
e11d9287cf testsuites: Add TESTS_USE_PRINTF
Make it possible to use normal printf() if requested to allow output of
floating point numbers.
2014-02-12 09:18:00 +01:00
Sebastian Huber
5618c37a7a score: Create thread implementation header
Move implementation specific parts of thread.h and thread.inl into new
header file threadimpl.h.  The thread.h contains now only the
application visible API.

Remove superfluous header file includes from various files.
2013-07-26 11:55:44 +02:00
Sebastian Huber
a9127a2e65 testsuites: Include missing header files 2013-07-22 16:45:59 +02:00
Sebastian Huber
49cdf40afa score: Add and use _Thread_Dispatch_is_enabled()
Delete _Thread_Dispatch_in_critical_section() and
_Thread_Is_dispatching_enabled().
2013-06-14 16:26:06 +02:00
Sebastian Huber
ac2bb464a5 smptests: Use priority ceiling for locked print
In case the printf() blocks on a semaphore it was possible to end up in
a livelock.
2013-05-31 15:20:30 +02:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Ralf Corsépius
ac165341df 2011-03-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/src/spin.c: Include "test_support.h".
2012-03-02 18:16:33 +01:00
Sebastian Huber
77998753b5 Use alternative API
Replaced Allocate_majority_of_workspace() with
rtems_workspace_allocate().  Replaced Allocate_majority_of_heap() with
rtems_heap_greedy_allocate().
2012-02-17 16:56:17 +01:00
Ralf Corsepius
436ef337de 2011-12-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/include/tmtests_empty_function.h: New.
	* support/src/tmtests_empty_function.c,
	support/src/tmtests_support.c:
	Include "tmtests_empty_function.h".
	Remove local decls (Missing prototypes).
2011-12-11 06:49:22 +00:00
Sebastian Huber
abe56121c7 2011-11-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
* support/src/test_support.c: Avoid magic numbers.
2011-11-04 09:55:04 +00:00
Ralf Corsepius
5008f65e6f 2011-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/include/tmacros.h:
	Remove fatal_posix_service_pointer_minus_one (unused).
2011-10-25 16:30:35 +00:00
Ralf Corsepius
7036ed0049 2011-10-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/include/primode.h: New.
	* Makefile.am: Add support/include/primode.h
2011-10-13 13:08:12 +00:00
Ralf Corsepius
bf08a0f2a7 2011-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/include/tmacros.h: Remove PRItime_t.
2011-09-30 02:58:15 +00:00
Ralf Corsepius
30e49544d5 2011-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/include/pritime.h: New.
	* Makefile.am: Add support/include/pritime.h
2011-09-30 02:31:25 +00:00
Jennifer Averett
d4a0934bf4 2011-07-29 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* support/include/test_support.h: Fixed incorrect name in prototype.
2011-07-29 13:48:16 +00:00
Jennifer Averett
d504e48b29 2011-07-01 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* support/include/tmacros.h: Disable the check for dispatch disable
	level for SMP tests. Another CPU may be inside RTEMS by the time
	these checks are being done which would result in false failures.
2011-07-01 14:28:03 +00:00
Joel Sherrill
152a284188 2011-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac, support/include/test_support.h:
	* support/src/locked_print.c: New file.
2011-06-28 21:09:13 +00:00
Jennifer Averett
1c95d94af6 2011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.com
PR 1777/cpukit
	* support/include/tmacros.h, tmtests/tm26/task1.c,
	tmtests/tm27/task1.c: Consolidated access to
	_Thread_Dispatch_disable_level.
2011-04-21 19:05:34 +00:00
Ralf Corsepius
9fa8d0eed5 2011-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/src/tmtests_support.c:
	loop_overhead and end_time are uint32_t's.
2011-02-22 14:41:17 +00:00
Ralf Corsepius
b1305bb945 Add HAVE_CONFIG_H. 2011-02-22 11:11:44 +00:00
Ralf Corsepius
5aa9263ff0 2011-02-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/include/tmacros.h: Remove PRIxblksize_t, PRIxblkcnt_t.
2011-02-08 06:39:57 +00:00