Changeset fafa9e2 in rtems-libbsd
- Timestamp:
- Nov 13, 2013, 4:20:01 PM (7 years ago)
- Branches:
- 4.11, b96abfd647154f10ea8f7fac68e25676636eded5, debc0aed8b9bef9996b8ec0ae7a70b0b41912e27, 68e79b6d187fe09b0a6f3f1d22c69b4121a3f76e, freebsd-9.3, 33bfaee89aa71d2252eb48d6b9a9ec17183faced
- Children:
- 6ab78d6
- Parents:
- c2f6513
- git-author:
- Sebastian Huber <sebastian.huber@…> (11/13/13 16:20:01)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (11/13/13 16:44:40)
- Location:
- testsuite
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuite/commands01/test_main.c
rc2f6513 rfafa9e2 41 41 42 42 #include <rtems/libcsupport.h> 43 #include <rtems/stackchk.h>44 43 45 44 #define TEST_NAME "LIBBSD COMMANDS 1" 46 45 47 46 #define ARGC(x) (nitems(x) - 1) 48 49 static void50 set_self_prio(rtems_task_priority prio)51 {52 rtems_status_code sc;53 54 sc = rtems_task_set_priority(RTEMS_SELF, prio, &prio);55 assert(sc == RTEMS_SUCCESSFUL);56 }57 47 58 48 static void … … 271 261 test_main(void) 272 262 { 273 /*274 * Let other tasks run to complete background work that frees allocated275 * resources.276 */277 set_self_prio(RTEMS_MAXIMUM_PRIORITY - 1);278 279 263 test_route_without_if(); 280 264 test_ifconfig_lo0(); … … 284 268 test_netstat(); 285 269 286 rtems_stack_checker_report_usage_with_plugin(NULL,287 rtems_printf_plugin);288 289 puts("*** END OF " TEST_NAME " TEST ***");290 270 exit(0); 291 271 } -
testsuite/include/rtems/bsd/test/default-init.h
rc2f6513 rfafa9e2 7 7 8 8 #include <bsp.h> 9 #include <assert.h> 9 10 #include <stdlib.h> 10 11 #include <stdio.h> 12 #include <rtems/stackchk.h> 11 13 #include <rtems/bsd/bsd.h> 14 15 static void default_set_self_prio( rtems_task_priority prio ) 16 { 17 rtems_status_code sc; 18 19 sc = rtems_task_set_priority(RTEMS_SELF, prio, &prio); 20 assert(sc == RTEMS_SUCCESSFUL); 21 } 22 23 static void default_on_exit( int exit_code, void *arg ) 24 { 25 rtems_stack_checker_report_usage_with_plugin( 26 NULL, 27 rtems_printf_plugin 28 ); 29 30 if ( exit_code == 0 ) { 31 puts( "*** END OF TEST " TEST_NAME " ***" ); 32 } 33 } 12 34 13 35 rtems_task Init( … … 15 37 ) 16 38 { 39 rtems_status_code sc; 40 17 41 puts( "*** " TEST_NAME " TEST ***" ); 18 42 … … 23 47 */ 24 48 49 on_exit( default_on_exit, NULL ); 50 51 /* Let other tasks run to complete background work */ 52 default_set_self_prio( RTEMS_MAXIMUM_PRIORITY - 1 ); 53 25 54 rtems_bsd_initialize_with_interrupt_server(); 55 56 /* Let the callout timer allocate its resources */ 57 sc = rtems_task_wake_after( 2 ); 58 assert(sc == RTEMS_SUCCESSFUL); 26 59 27 60 test_main(); 28 61 /* should not return */ 29 62 30 printf( "*** Test main returned and should not have ***\n" ); 31 exit( 5 ); 63 assert( 0 ); 32 64 } 33 65 -
testsuite/init01/test_main.c
rc2f6513 rfafa9e2 15 15 sleep( 5 ); 16 16 17 puts( "*** END OF " TEST_NAME " TEST ***" );18 17 exit( 0 ); 19 18 } -
testsuite/loopback01/test_main.c
rc2f6513 rfafa9e2 296 296 waitForClientEvents(argToClientEvent(4) | argToClientEvent(5) | argToClientEvent(6)); 297 297 298 puts( "*** END OF " TEST_NAME " TEST ***" );299 298 exit( 0 ); 300 299 } -
testsuite/netshell01/test_main.c
rc2f6513 rfafa9e2 23 23 rtems_shell_main_loop( &env ); 24 24 25 puts( "*** END OF " TEST_NAME " TEST ***" );26 25 exit( 0 ); 27 26 } -
testsuite/rwlock01/test_main.c
rc2f6513 rfafa9e2 44 44 45 45 #include <rtems/libcsupport.h> 46 #include <rtems/stackchk.h>47 46 #include <rtems.h> 48 47 … … 507 506 alloc_basic_resources(void) 508 507 { 509 rtems_status_code sc;510 511 508 curthread; 512 513 sc = rtems_task_wake_after(2);514 assert(sc == RTEMS_SUCCESSFUL);515 509 } 516 510 … … 549 543 assert(rtems_resource_snapshot_check(&snapshot_0)); 550 544 551 rtems_stack_checker_report_usage_with_plugin(NULL,552 rtems_printf_plugin);553 554 puts("*** END OF " TEST_NAME " TEST ***");555 545 exit(0); 556 546 } -
testsuite/selectpollkqueue01/test_main.c
rc2f6513 rfafa9e2 54 54 55 55 #include <rtems/libcsupport.h> 56 #include <rtems/stackchk.h>57 56 #include <rtems.h> 58 57 … … 988 987 test_kqueue_close(ctx); 989 988 990 rtems_stack_checker_report_usage_with_plugin(NULL,991 rtems_printf_plugin);992 993 puts("*** END OF " TEST_NAME " TEST ***");994 989 exit(0); 995 990 } -
testsuite/sleep01/test_main.c
rc2f6513 rfafa9e2 44 44 45 45 #include <rtems/libcsupport.h> 46 #include <rtems/stackchk.h>47 46 48 47 #define TEST_NAME "LIBBSD SLEEP 1" … … 210 209 alloc_basic_resources(void) 211 210 { 212 rtems_status_code sc;213 214 211 curthread; 215 216 sc = rtems_task_wake_after(2);217 assert(sc == RTEMS_SUCCESSFUL);218 212 } 219 213 … … 235 229 assert(rtems_resource_snapshot_check(&snapshot)); 236 230 237 rtems_stack_checker_report_usage_with_plugin(NULL,238 rtems_printf_plugin);239 240 puts("*** END OF " TEST_NAME " TEST ***");241 231 exit(0); 242 232 } -
testsuite/syscalls01/test_main.c
rc2f6513 rfafa9e2 1719 1719 test_err(); 1720 1720 1721 puts("*** END OF " TEST_NAME " TEST ***");1722 1721 exit(0); 1723 1722 } -
testsuite/thread01/test_main.c
rc2f6513 rfafa9e2 284 284 test_main(void) 285 285 { 286 rtems_status_code sc;287 rtems_task_priority prio = RTEMS_MAXIMUM_PRIORITY - 1;288 289 286 main_task_id = rtems_task_self(); 290 291 sc = rtems_task_set_priority(RTEMS_SELF, prio, &prio);292 assert(sc == RTEMS_SUCCESSFUL);293 287 294 288 test_non_bsd_thread(); … … 298 292 test_rtems_bsd_get_curthread_or_null(); 299 293 300 puts("*** END OF " TEST_NAME " TEST ***");301 294 exit(0); 302 295 }
Note: See TracChangeset
for help on using the changeset viewer.