diff options
-rw-r--r-- | testsuites/ChangeLog | 4 | ||||
-rw-r--r-- | testsuites/support/include/tmacros.h | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/ChangeLog b/testsuites/ChangeLog index 7745191fcb..444fa82834 100644 --- a/testsuites/ChangeLog +++ b/testsuites/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill <joel.sherrill@OARcorp.com> + + * support/include/tmacros.h: Add new helper for POSIX tests. + 2007-09-21 Ralf Corsépius <ralf.corsepius@rtems.org> * aclocal/version.m4: Bump RTEMS_API to 4.9. diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h index be8ca9f17d..563fcd0cb1 100644 --- a/testsuites/support/include/tmacros.h +++ b/testsuites/support/include/tmacros.h @@ -96,6 +96,16 @@ extern "C" { fatal_posix_service_status_with_level( \ _dirstat, RTEMS_SUCCESSFUL, _failmsg, _level ) +#define fatal_posix_service_status_errno( _stat, _desired, _msg ) \ + if ( (_stat != -1) && (errno) != (_desired) ) { \ + check_dispatch_disable_level( 0 ); \ + printf( "\n%s FAILED -- expected (%d - %s) got (%d %d - %s)\n", \ + (_msg), _desired, strerror(_desired), \ + _stat, errno, strerror(errno) ); \ + FLUSH_OUTPUT(); \ + rtems_test_exit( _stat ); \ + } + #define fatal_posix_service_status( _stat, _desired, _msg ) \ fatal_posix_service_status_with_level( _stat, _desired, _msg, 0 ) |