[rtems commit] psxtests/psxobj01: Fix for RTEMS_DEBUG
Sebastian Huber
sebh at rtems.org
Tue Mar 22 07:29:31 UTC 2016
Module: rtems
Branch: master
Commit: 9e2acee742cf1ce0f7d9b8ee669f717f276e7b67
Changeset: http://git.rtems.org/rtems/commit/?id=9e2acee742cf1ce0f7d9b8ee669f717f276e7b67
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Mar 22 08:24:45 2016 +0100
psxtests/psxobj01: Fix for RTEMS_DEBUG
---
testsuites/psxtests/psxobj01/init.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/testsuites/psxtests/psxobj01/init.c b/testsuites/psxtests/psxobj01/init.c
index 16b703b..5f87308 100644
--- a/testsuites/psxtests/psxobj01/init.c
+++ b/testsuites/psxtests/psxobj01/init.c
@@ -54,21 +54,28 @@ rtems_task Init(
#endif
);
+
puts( "INIT - _Objects_Get_by_name - NULL name" );
+ _Objects_Allocator_lock();
the_object = _Objects_Get_by_name( &TestClass, NULL, NULL, &error );
+ _Objects_Allocator_unlock();
rtems_test_assert( the_object == NULL );
rtems_test_assert( error == OBJECTS_GET_BY_NAME_INVALID_NAME );
puts( "INIT - _Objects_Get_by_name - name too long" );
strcpy( name, "TOOOOOOOOOOOOOOOOOO LONG" );
+ _Objects_Allocator_lock();
the_object = _Objects_Get_by_name( &TestClass, name, NULL, &error );
+ _Objects_Allocator_unlock();
rtems_test_assert( the_object == NULL );
rtems_test_assert( error == OBJECTS_GET_BY_NAME_NAME_TOO_LONG );
puts( "INIT - _Objects_Get_by_name - name of non-existent object" );
strcpy( name, "NOT FOUND" );
name_len = 123;
+ _Objects_Allocator_lock();
the_object = _Objects_Get_by_name( &TestClass, name, &name_len, &error );
+ _Objects_Allocator_unlock();
rtems_test_assert( the_object == NULL );
rtems_test_assert( error == OBJECTS_GET_BY_NAME_NO_OBJECT );
rtems_test_assert( name_len == 9 );
More information about the vc
mailing list