diff options
Diffstat (limited to 'testsuites/psxtests')
-rw-r--r-- | testsuites/psxtests/psx08/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psx13/test.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psx15/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxbarrier01/test.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxchroot01/test.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxcleanup02/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxcleanup02/main.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxclockrealtime01/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxconfig01/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxconfig01/psxconfig01.doc | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxftw01/init.c | 64 | ||||
-rw-r--r-- | testsuites/psxtests/psxglobalcon01/init.cc | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxglobalcon02/init.cc | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxintrcritical01/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxkey07/init.c | 42 | ||||
-rw-r--r-- | testsuites/psxtests/psxmount/test.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxonce01/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxonce01/psxonce01.doc | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxthreadname01/init.c | 2 |
19 files changed, 45 insertions, 95 deletions
diff --git a/testsuites/psxtests/psx08/init.c b/testsuites/psxtests/psx08/init.c index f4af45b5a4..3af6f83d7f 100644 --- a/testsuites/psxtests/psx08/init.c +++ b/testsuites/psxtests/psx08/init.c @@ -4,7 +4,7 @@ * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * - * Copyright (C) 2022 embedded brains GmbH + * Copyright (C) 2022 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psx13/test.c b/testsuites/psxtests/psx13/test.c index 0754dbcf30..951953ae98 100644 --- a/testsuites/psxtests/psx13/test.c +++ b/testsuites/psxtests/psx13/test.c @@ -639,6 +639,8 @@ static void FutimensTest( void ) /* EBADF test case */ /* Case: Pass an invalid file descriptor */ + _Timespec_Set_to_zero( &time[0] ); + _Timespec_Set_to_zero( &time[1] ); rv = futimens( -1, time ); rtems_test_assert( rv == -1 ); rtems_test_assert( errno == EBADF ); diff --git a/testsuites/psxtests/psx15/init.c b/testsuites/psxtests/psx15/init.c index e6ade823f7..fff3db01c3 100644 --- a/testsuites/psxtests/psx15/init.c +++ b/testsuites/psxtests/psx15/init.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* - * Copyright (c) 2010 embedded brains GmbH. All rights reserved. + * Copyright (c) 2010 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxbarrier01/test.c b/testsuites/psxtests/psxbarrier01/test.c index 3bea278aac..1f3bdb138c 100644 --- a/testsuites/psxtests/psxbarrier01/test.c +++ b/testsuites/psxtests/psxbarrier01/test.c @@ -6,7 +6,7 @@ * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * - * Copyright (c) 2017 embedded brains GmbH + * Copyright (c) 2017 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxchroot01/test.c b/testsuites/psxtests/psxchroot01/test.c index 8270bf5b58..7ac6a80d56 100644 --- a/testsuites/psxtests/psxchroot01/test.c +++ b/testsuites/psxtests/psxchroot01/test.c @@ -5,7 +5,7 @@ * On-Line Applications Research Corporation (OAR). * * Modifications to support reference counting in the file system are - * Copyright (c) 2012 embedded brains GmbH. + * Copyright (c) 2012 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxcleanup02/init.c b/testsuites/psxtests/psxcleanup02/init.c index 89ae7f1930..c123a817ea 100644 --- a/testsuites/psxtests/psxcleanup02/init.c +++ b/testsuites/psxtests/psxcleanup02/init.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 embedded brains GmbH. All rights reserved. + * Copyright (c) 2015 embedded brains GmbH & Co. KG * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at diff --git a/testsuites/psxtests/psxcleanup02/main.c b/testsuites/psxtests/psxcleanup02/main.c index 071d84c059..a72c30970a 100644 --- a/testsuites/psxtests/psxcleanup02/main.c +++ b/testsuites/psxtests/psxcleanup02/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 embedded brains GmbH. All rights reserved. + * Copyright (c) 2015 embedded brains GmbH & Co. KG * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at diff --git a/testsuites/psxtests/psxclockrealtime01/init.c b/testsuites/psxtests/psxclockrealtime01/init.c index 720e7ced52..722a756ebb 100644 --- a/testsuites/psxtests/psxclockrealtime01/init.c +++ b/testsuites/psxtests/psxclockrealtime01/init.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 embedded brains GmbH. All rights reserved. + * Copyright (c) 2017 embedded brains GmbH & Co. KG * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at diff --git a/testsuites/psxtests/psxconfig01/init.c b/testsuites/psxtests/psxconfig01/init.c index 3a0e5b3049..77a96d1c67 100644 --- a/testsuites/psxtests/psxconfig01/init.c +++ b/testsuites/psxtests/psxconfig01/init.c @@ -10,7 +10,7 @@ /* * Copyright (c) 2014. On-Line Applications Research Corporation (OAR). - * Copyright (c) 2011-2014 embedded brains GmbH. All rights reserved. + * Copyright (C) 2011, 2014 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxconfig01/psxconfig01.doc b/testsuites/psxtests/psxconfig01/psxconfig01.doc index 524c8a9994..d8f70bded3 100644 --- a/testsuites/psxtests/psxconfig01/psxconfig01.doc +++ b/testsuites/psxtests/psxconfig01/psxconfig01.doc @@ -1,6 +1,6 @@ # SPDX-License-Identifier: BSD-2-Clause -# Copyright (c) 2011 embedded brains GmbH. +# Copyright (c) 2011 embedded brains GmbH & Co. KG # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxftw01/init.c b/testsuites/psxtests/psxftw01/init.c index ee0e40c84a..5bd89928d1 100644 --- a/testsuites/psxtests/psxftw01/init.c +++ b/testsuites/psxtests/psxftw01/init.c @@ -6,7 +6,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2020 Eshan Dhawan, embedded brains GmbH, Joel Sherrill + * Copyright (C) 2020 Eshan Dhawan, embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -66,36 +66,6 @@ void *POSIX_Init (void * argument); static char file_traverse_order[6][20]; static int file_order; -static char buffer[512]; - -static const T_action actions[] = { - T_report_hash_sha256, - T_check_task_context, - T_check_file_descriptors, - T_check_rtems_barriers, - T_check_rtems_extensions, - T_check_rtems_message_queues, - T_check_rtems_partitions, - T_check_rtems_periods, - T_check_rtems_regions, - T_check_rtems_semaphores, - T_check_rtems_tasks, - T_check_rtems_timers, - T_check_posix_keys -}; - -static const T_config config = { - .name = "psxftw01", - .buf = buffer, - .buf_size = sizeof(buffer), - .putchar = rtems_put_char, - .verbosity = T_VERBOSE, - .now = T_now_clock, - .action_count = T_ARRAY_SIZE(actions), - .actions = actions -}; - - static int fn_function (const char *fpath, const struct stat *sb, int tflag, struct FTW *ftwbuf) { @@ -122,9 +92,7 @@ T_TEST_CASE(ftw) TARFILE_SIZE, &rtems_test_printer ); - if (sc != RTEMS_SUCCESSFUL) { - printf ("error: untar failed: %s\n", rtems_status_text (sc)); - } + T_rsc_success( sc ); /* Array with expected file order */ char arr_ftw_depth[5][20] = { "test_file", "test_script", "def", "abc", "home" }; @@ -136,49 +104,31 @@ T_TEST_CASE(ftw) file_order = 0; flags |= FTW_DEPTH; r = nftw( files_path, fn_function, 5, flags ); - - T_quiet_psx_success(r); + T_psx_success( r ); /*comparing the nftw file tree to the expexted file tree traversal */ for (i = 0; i < file_order; i++){ r = strcmp( arr_ftw_depth[i], file_traverse_order[i]); - if (r){ - printf( "Incorrect Order " ); - } - T_quiet_psx_success(r); + T_eq_int( r, 0 ); } /*----------------Test Block 2--------------------*/ flags = 0; file_order = 0; flags |= FTW_PHYS; r = nftw( files_path, fn_function, 5, flags ); - T_quiet_psx_success(r); + T_psx_success(r); /*comparing the nftw file tree to the expected file tree traversal*/ for (i = 0; i < file_order; i++){ r = strcmp( arr_ftw_phys[i], file_traverse_order[i]); - if (r){ - printf( "Incorrect Order " ); - } - T_quiet_psx_success(r); + T_eq_int( r, 0 ); } } void *POSIX_Init (void * argument) { - int exit_code; - - TEST_BEGIN(); - - T_register(); - exit_code = T_main(&config); - if (exit_code == 0) { - TEST_END(); - } - - rtems_test_exit(exit_code); - + rtems_test_run( (rtems_task_argument) argument, TEST_STATE ); } /* NOTICE: the clock driver is explicitly disabled */ diff --git a/testsuites/psxtests/psxglobalcon01/init.cc b/testsuites/psxtests/psxglobalcon01/init.cc index 2ccbba9e34..a61734bcd1 100644 --- a/testsuites/psxtests/psxglobalcon01/init.cc +++ b/testsuites/psxtests/psxglobalcon01/init.cc @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* - * Copyright (c) 2014 embedded brains GmbH. All rights reserved. + * Copyright (c) 2014 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxglobalcon02/init.cc b/testsuites/psxtests/psxglobalcon02/init.cc index 0e530246e0..3d8206261a 100644 --- a/testsuites/psxtests/psxglobalcon02/init.cc +++ b/testsuites/psxtests/psxglobalcon02/init.cc @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* - * Copyright (c) 2014 embedded brains GmbH. All rights reserved. + * Copyright (c) 2014 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxintrcritical01/init.c b/testsuites/psxtests/psxintrcritical01/init.c index deb95da994..27126e31ec 100644 --- a/testsuites/psxtests/psxintrcritical01/init.c +++ b/testsuites/psxtests/psxintrcritical01/init.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* - * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * Copyright (C) 2020 embedded brains GmbH & Co. KG * * COPYRIGHT (c) 1989-2012. * On-Line Applications Research Corporation (OAR). diff --git a/testsuites/psxtests/psxkey07/init.c b/testsuites/psxtests/psxkey07/init.c index 15387264ba..ff7b3a0bd0 100644 --- a/testsuites/psxtests/psxkey07/init.c +++ b/testsuites/psxtests/psxkey07/init.c @@ -39,32 +39,27 @@ const char rtems_test_name[] = "PSXKEY 7"; -/* forward declarations to avoid warnings */ -rtems_task Init(rtems_task_argument argument); -rtems_task Test_Thread(rtems_task_argument argument); +#define INITIAL_TASK_COUNT 10 -pthread_key_t Key; -int created_thread_count, setted_thread_count, got_thread_count; -int all_thread_created; -pthread_mutex_t mutex1, mutex2; -pthread_cond_t create_condition_var, set_condition_var; +#define ADDITIONAL_TASK_COUNT 13 -rtems_task Test_Thread(rtems_task_argument argument) +static pthread_key_t Key; +static int created_thread_count, setted_thread_count, got_thread_count; +static int all_thread_created; +static pthread_mutex_t mutex1, mutex2; +static pthread_cond_t create_condition_var, set_condition_var; + +static rtems_task Test_Thread(rtems_task_argument argument) { int sc; int *value_p, *value_p2; value_p = malloc( sizeof( int ) ); rtems_test_assert(value_p != NULL); -/* - * This was added to address the following warning. - * warning: 'value_p' may be used uninitialized - */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" - sc = pthread_setspecific( Key, value_p ); -#pragma GCC diagnostic pop - rtems_test_assert( !sc ); + + *value_p = 123; + sc = pthread_setspecific( Key, value_p ); + rtems_test_assert( !sc ); pthread_mutex_lock( &mutex1 ); ++setted_thread_count; @@ -86,12 +81,13 @@ rtems_task Test_Thread(rtems_task_argument argument) rtems_task_exit(); } -rtems_task Init(rtems_task_argument argument) +static rtems_task Init(rtems_task_argument argument) { rtems_status_code rc; int sc; struct timespec delay_request; - uintptr_t max_free_size = 13 * RTEMS_MINIMUM_STACK_SIZE; + uintptr_t max_free_size = + ADDITIONAL_TASK_COUNT * RTEMS_MINIMUM_STACK_SIZE; void *greedy; all_thread_created = 0; @@ -222,8 +218,10 @@ rtems_task Init(rtems_task_argument argument) #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION -#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(10) -#define CONFIGURE_MAXIMUM_POSIX_KEYS 1 +#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(INITIAL_TASK_COUNT) +#define CONFIGURE_MAXIMUM_POSIX_KEYS 1 +#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \ + (INITIAL_TASK_COUNT + ADDITIONAL_TASK_COUNT) #define CONFIGURE_UNIFIED_WORK_AREAS #define CONFIGURE_RTEMS_INIT_TASKS_TABLE diff --git a/testsuites/psxtests/psxmount/test.c b/testsuites/psxtests/psxmount/test.c index 9ce68dda59..202baed46c 100644 --- a/testsuites/psxtests/psxmount/test.c +++ b/testsuites/psxtests/psxmount/test.c @@ -5,7 +5,7 @@ * On-Line Applications Research Corporation (OAR). * * Modifications to support reference counting in the file system are - * Copyright (c) 2012 embedded brains GmbH. + * Copyright (c) 2012 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxonce01/init.c b/testsuites/psxtests/psxonce01/init.c index dfa0204d62..033b1a02f3 100644 --- a/testsuites/psxtests/psxonce01/init.c +++ b/testsuites/psxtests/psxonce01/init.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* - * Copyright (C) 2019 embedded brains GmbH + * Copyright (C) 2019 embedded brains GmbH & Co. KG * Copyright (C) 2019 Sebastian Huber * * COPYRIGHT (c) 1989-2009. diff --git a/testsuites/psxtests/psxonce01/psxonce01.doc b/testsuites/psxtests/psxonce01/psxonce01.doc index 7abbd2e037..3ca5d680c7 100644 --- a/testsuites/psxtests/psxonce01/psxonce01.doc +++ b/testsuites/psxtests/psxonce01/psxonce01.doc @@ -3,7 +3,7 @@ # COPYRIGHT (c) 1989-2009. # On-Line Applications Research Corporation (OAR). # Copyright (c) 2013 Annelies Odermann <annelies.odermann@gmail.com> -# Copyright (c) 2014 embedded brains GmbH. +# Copyright (c) 2014 embedded brains GmbH & Co. KG # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/testsuites/psxtests/psxthreadname01/init.c b/testsuites/psxtests/psxthreadname01/init.c index 3183272ce8..c5d5cef604 100644 --- a/testsuites/psxtests/psxthreadname01/init.c +++ b/testsuites/psxtests/psxthreadname01/init.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* - * Copyright (c) 2017 embedded brains GmbH. All rights reserved. + * Copyright (c) 2017 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions |