Commit Graph

388 Commits

Author SHA1 Message Date
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
Joel Sherrill
748a12629a pppd/Makefile.am: Add support/include 2017-11-09 15:06:19 -06:00
Sebastian Huber
1055ff2020 tests: Use normal console for user input tests 2017-11-07 08:31:40 +01:00
Sebastian Huber
7b00c2fac5 tests: Use <tmacros.h> in all tests
Update #3170.
Update #3199.
2017-11-06 09:06:20 +01:00
Sebastian Huber
c4b8b147dd tests: Use simple console driver
Update #3170.
Update #3199.
2017-11-06 07:26:42 +01:00
Sebastian Huber
8c1f4064ad tests: Use printf() instead of fprintf()
Update #3170.
Update #3199.
2017-11-02 14:08:32 +01: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
46ddc3c5da tests: Use rtems_print_printer_fprintf_putc()
Use rtems_print_printer_fprintf_putc() instead of
rtems_print_printer_printf() to output via rtems_putc().

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
80a13ec48d samples/fileio: Give command availability hint
Close #3088.
2017-08-24 08:44:22 +02:00
Sebastian Huber
07e178005a tests: Use floating point task
These tests directly or indirectly use fprintf(), etc. which may use the
floating point unit.

Update #3076.
2017-07-18 14:14:34 +02: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
cb056d02c5 cdtest: Print begin of test only once 2017-03-03 09:04:12 +01:00
Sebastian Huber
05006c9017 cdtest: Print proper begin/end of test messages 2016-12-09 08:26:47 +01:00
Chris Johns
8c637ee324 cdtest: Add std::runtime_error() test case
Update #2830.
2016-12-09 08:26:47 +01:00
Sebastian Huber
29770e122e tests: CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
Avoid unnecessary use of CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM.
2016-09-19 07:22:30 +02:00
Sebastian Huber
506bfc8580 Move printer initialization to separate header
The RTEMS print user need to know nothing about a particular printer
implementation.  In particular get rid of the <stdio.h> include which
would be visible via <rtems.h>.
2016-06-22 07:29:26 +02:00
Sebastian Huber
ede1a4182d Make rtems/print.h independent of rtems/bspIo.h 2016-06-22 07:29:26 +02:00
Joel Sherrill
07ac1735c8 samples/base_mp/apptask.c: Fix warning and clean up 2016-06-16 09:03:23 -05:00
Chris Johns
3039e1840c testsuite: Fix networking samples to use the RTEMS printer. 2016-05-26 15:52:19 +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
Sebastian Huber
a8ac273c85 samples/base_mp: Check directive status 2016-03-29 07:26:43 +02:00
Sebastian Huber
ccd54344d9 score: Introduce Thread_Entry_information
This avoids potential dead code in _Thread_Handler().  It gets rid of
the dangerous function pointer casts.

Update #2514.
2016-01-11 08:47:01 +01:00
Sebastian Huber
cdf30f0550 rtems: Add rtems_interrupt_local_disable|enable()
Add rtems_interrupt_local_disable|enable() as suggested by Pavel Pisa to
emphasize that interrupts are only disabled on the current processor.
Do not define the rtems_interrupt_disable|enable|flash() macros and
functions on SMP configurations since they don't ensure system wide
mutual exclusion.
2015-06-22 08:40:26 +02:00
Joel Sherrill
d05d31ff41 samples/minimum/init.c: Add cast to avoid warning 2015-03-24 08:17:00 -05:00
Joel Sherrill
0e6f915c8e testsuites/samples/minimum/init.c: Notepads no longer need to be disabled
They are disabled by default as they are deprecated.
2015-03-17 10:05:04 -05:00
Sebastian Huber
a9df916988 IMFS: Add fine grained configuration
Remove miniIMFS.  Statically initialize the root IMFS.

Add configuration options to disable individual
features of the root IMFS, e.g.
  o CONFIGURE_IMFS_DISABLE_CHOWN,
  o CONFIGURE_IMFS_DISABLE_FCHMOD,
  o CONFIGURE_IMFS_DISABLE_LINK,
  o CONFIGURE_IMFS_DISABLE_MKNOD,
  o CONFIGURE_IMFS_DISABLE_MOUNT,
  o CONFIGURE_IMFS_DISABLE_READLINK,
  o CONFIGURE_IMFS_DISABLE_RENAME,
  o CONFIGURE_IMFS_DISABLE_RMNOD,
  o CONFIGURE_IMFS_DISABLE_SYMLINK,
  o CONFIGURE_IMFS_DISABLE_UNMOUNT, and
  o CONFIGURE_IMFS_DISABLE_UTIME.
2015-02-12 20:53:36 +01:00
Sebastian Huber
f87ede57a2 libnetworking: Fix close of active sockets
Send a special event to notify tasks waiting for a socket state change
in case this socket gets closed.  This prevents a use after free.

Close #785.
2015-01-20 07:11:58 +01:00
Sebastian Huber
a0b1b5edb8 Delete CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
This define was superfluous, undocumented and used inconsistently.
2014-12-16 11:34:38 +01:00
Sebastian Huber
1207288022 Update bug report URL 2014-12-05 07:47:32 +01:00
Sebastian Huber
11925eef78 Delete or rename MIN/MAX macros and defines
Include <sys/param.h> if necessary to get the MIN()/MAX() macros.
2014-11-21 08:52:29 +01:00
Sebastian Huber
fa028bb2ef shell: Do chroot() after successful login 2014-11-20 10:30:24 +01:00
Sebastian Huber
0b3fcf5efe samples/fileio: Use unlimited objects 2014-11-20 10:30:23 +01:00
Sebastian Huber
ab085c92eb samples/fileio: Fix warning 2014-11-20 10:30:23 +01:00
Sebastian Huber
acf9a8dd54 shell: Use crypt_r() in rtems_shell_login_check()
Use '*" to disable shell login instead of '!' according to the Linux man
page.  Use getpwnam_r() instead of getpwnam().  Do not access the user
environment directly.  Update the user environment only after a
successful login check.
2014-11-20 10:30:22 +01:00
Joel Sherrill
945f31b9a9 nsecs/init.c: Use long to avoid overflow on 16-bit targets 2014-10-13 11:13:11 -05:00
Joel Sherrill
eb7f306dc8 samples/base_sp: Fix printf() warning 2014-10-09 10:11:57 -05:00
Joel Sherrill
51a95ff9df samples/unlimited: Fix printf() warning and clean up 2014-10-09 10:11:57 -05:00
Sebastian Huber
805360b8e5 pppd: Fix warnings 2014-09-30 14:06:09 +02:00
Sebastian Huber
8ae6f264af samples/iostream: Produce proper begin/end message 2014-09-01 17:16:53 +02:00
Sebastian Huber
647859e9bb samples/pppd: Fix extra drivers initializer 2014-06-11 14:38:32 +02:00
Chris Johns
3cbedb1ba8 testsuite: Add a user keypress to start pppd.
Allow the test to run and pass when automatic testing.
2014-05-22 19:56:50 +10:00
Joel Sherrill
3324383ce0 testsuites: Remove BSP_SMALL_MEMORY 2014-05-06 18:31:00 -05:00
Chris Johns
1461b648b7 testsuite: Add a per BSP test check for tests not to build.
Provide a file per BSP to list tests that do not build for a BSP. This change
removes the BSP_SMALL_MEMORY hack from the code. That hack was a
mistake.

Provide configuration files for each BSP with tests that cannot build.
2014-05-05 10:24:41 +10:00
Sebastian Huber
1a6093dc60 samples/fileio: Fix configuration 2014-04-03 12:53:24 +02:00
Sebastian Huber
0cd2b777eb samples/base_mp: Include missing header file 2014-03-27 14:52:36 +01:00
Sebastian Huber
8c26e79867 tests: Produce proper begin/end messages 2014-03-25 16:46:37 +01:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Christian Mauderer
6cd4a5ca2e cpukit/shell: Replace task variables with posix keys.
Use posix keys for current shell environment instead of task variables. With
this patch the shell needs one posix-key and one posix-key-value-pair
configured.

Update documentation for the shell.

Adapt samples/fileio:
- Add necessary objects.
- Add login function and custom device name for better testing of the shell.
2014-03-20 09:10:26 +01:00