57 #include <rtems/test.h> 68 RtemsPartReqCreate_Pre_Id_Id,
69 RtemsPartReqCreate_Pre_Id_Null,
70 RtemsPartReqCreate_Pre_Id_NA
71 } RtemsPartReqCreate_Pre_Id;
74 RtemsPartReqCreate_Pre_Name_Valid,
75 RtemsPartReqCreate_Pre_Name_Invalid,
76 RtemsPartReqCreate_Pre_Name_NA
77 } RtemsPartReqCreate_Pre_Name;
80 RtemsPartReqCreate_Pre_Start_Valid,
81 RtemsPartReqCreate_Pre_Start_Null,
82 RtemsPartReqCreate_Pre_Start_BadAlign,
83 RtemsPartReqCreate_Pre_Start_NA
84 } RtemsPartReqCreate_Pre_Start;
87 RtemsPartReqCreate_Pre_Length_Valid,
88 RtemsPartReqCreate_Pre_Length_Zero,
89 RtemsPartReqCreate_Pre_Length_Invalid,
90 RtemsPartReqCreate_Pre_Length_NA
91 } RtemsPartReqCreate_Pre_Length;
94 RtemsPartReqCreate_Pre_Size_Valid,
95 RtemsPartReqCreate_Pre_Size_Zero,
96 RtemsPartReqCreate_Pre_Size_Small,
97 RtemsPartReqCreate_Pre_Size_NA
98 } RtemsPartReqCreate_Pre_Size;
101 RtemsPartReqCreate_Pre_Parts_Avail,
102 RtemsPartReqCreate_Pre_Parts_None,
103 RtemsPartReqCreate_Pre_Parts_NA
104 } RtemsPartReqCreate_Pre_Parts;
107 RtemsPartReqCreate_Post_Status_Ok,
108 RtemsPartReqCreate_Post_Status_InvAddress,
109 RtemsPartReqCreate_Post_Status_InvName,
110 RtemsPartReqCreate_Post_Status_InvNumber,
111 RtemsPartReqCreate_Post_Status_InvSize,
112 RtemsPartReqCreate_Post_Status_TooMany,
113 RtemsPartReqCreate_Post_Status_NA
114 } RtemsPartReqCreate_Post_Status;
124 void *starting_address;
151 RtemsPartReqCreate_Instance;
153 static const char *
const RtemsPartReqCreate_PreDesc_Id[] = {
159 static const char *
const RtemsPartReqCreate_PreDesc_Name[] = {
165 static const char *
const RtemsPartReqCreate_PreDesc_Start[] = {
172 static const char *
const RtemsPartReqCreate_PreDesc_Length[] = {
179 static const char *
const RtemsPartReqCreate_PreDesc_Size[] = {
186 static const char *
const RtemsPartReqCreate_PreDesc_Parts[] = {
192 static const char *
const *
const RtemsPartReqCreate_PreDesc[] = {
193 RtemsPartReqCreate_PreDesc_Id,
194 RtemsPartReqCreate_PreDesc_Name,
195 RtemsPartReqCreate_PreDesc_Start,
196 RtemsPartReqCreate_PreDesc_Length,
197 RtemsPartReqCreate_PreDesc_Size,
198 RtemsPartReqCreate_PreDesc_Parts,
202 #define PART_NAME rtems_build_name( 'N', 'A', 'M', 'E' ) 204 #define MAX_PARTITIONS 4 206 #define BUFFER_COUNT 2 208 #define BUFFER_SIZE ( 2 * sizeof( void * ) ) 211 exhaust_buffers[ MAX_PARTITIONS ][ BUFFER_COUNT ][ BUFFER_SIZE ];
214 buffers[ BUFFER_COUNT ][ BUFFER_SIZE ];
216 static void RtemsPartReqCreate_Pre_Id_Prepare(
218 RtemsPartReqCreate_Pre_Id state
222 case RtemsPartReqCreate_Pre_Id_Id: {
223 ctx->id = &ctx->id_value;
227 case RtemsPartReqCreate_Pre_Id_Null: {
232 case RtemsPartReqCreate_Pre_Id_NA:
237 static void RtemsPartReqCreate_Pre_Name_Prepare(
239 RtemsPartReqCreate_Pre_Name state
243 case RtemsPartReqCreate_Pre_Name_Valid: {
244 ctx->name = PART_NAME;
248 case RtemsPartReqCreate_Pre_Name_Invalid: {
253 case RtemsPartReqCreate_Pre_Name_NA:
258 static void RtemsPartReqCreate_Pre_Start_Prepare(
260 RtemsPartReqCreate_Pre_Start state
264 case RtemsPartReqCreate_Pre_Start_Valid: {
265 ctx->starting_address = buffers;
269 case RtemsPartReqCreate_Pre_Start_Null: {
270 ctx->starting_address = NULL;
274 case RtemsPartReqCreate_Pre_Start_BadAlign: {
275 ctx->starting_address = &buffers[ 0 ][ 1 ];
279 case RtemsPartReqCreate_Pre_Start_NA:
284 static void RtemsPartReqCreate_Pre_Length_Prepare(
286 RtemsPartReqCreate_Pre_Length state
290 case RtemsPartReqCreate_Pre_Length_Valid: {
291 ctx->length =
sizeof( buffers );
295 case RtemsPartReqCreate_Pre_Length_Zero: {
300 case RtemsPartReqCreate_Pre_Length_Invalid: {
301 ctx->length =
sizeof( buffers[ 0 ] ) - 1;
305 case RtemsPartReqCreate_Pre_Length_NA:
310 static void RtemsPartReqCreate_Pre_Size_Prepare(
312 RtemsPartReqCreate_Pre_Size state
316 case RtemsPartReqCreate_Pre_Size_Valid: {
317 ctx->buffer_size =
sizeof( buffers[ 0 ] );
321 case RtemsPartReqCreate_Pre_Size_Zero: {
322 ctx->buffer_size = 0;
326 case RtemsPartReqCreate_Pre_Size_Small: {
327 ctx->buffer_size =
sizeof( buffers[ 0 ] ) - 1;
331 case RtemsPartReqCreate_Pre_Size_NA:
336 static void RtemsPartReqCreate_Pre_Parts_Prepare(
338 RtemsPartReqCreate_Pre_Parts state
344 case RtemsPartReqCreate_Pre_Parts_Avail: {
349 case RtemsPartReqCreate_Pre_Parts_None: {
352 while ( i < MAX_PARTITIONS ) {
358 exhaust_buffers[ i ],
359 sizeof( exhaust_buffers[ i ] ),
360 sizeof( exhaust_buffers[ i ][ 0 ] ),
370 T_quiet_assert_not_null( info );
372 T_quiet_assert_not_null( obj );
384 case RtemsPartReqCreate_Pre_Parts_NA:
389 static void RtemsPartReqCreate_Post_Status_Check(
391 RtemsPartReqCreate_Post_Status state
397 void *buffers[ BUFFER_COUNT ];
401 case RtemsPartReqCreate_Post_Status_Ok: {
402 T_rsc_success( ctx->status );
403 T_eq_ptr( ctx->id, &ctx->id_value );
404 T_ne_u32( ctx->id_value, 0xffffffff );
409 T_eq_u32(
id, ctx->id_value );
411 for ( i = 0; i < BUFFER_COUNT; ++i) {
414 T_not_null( buffers[ i ] );
417 no_buffer = (
void *) (uintptr_t) 1;
420 T_eq_ptr( no_buffer, (
void *) (uintptr_t) 1 );
422 for ( i = 0; i < BUFFER_COUNT; ++i) {
432 case RtemsPartReqCreate_Post_Status_InvAddress: {
434 T_eq_u32( ctx->id_value, 0xffffffff );
438 case RtemsPartReqCreate_Post_Status_InvName: {
440 T_eq_u32( ctx->id_value, 0xffffffff );
444 case RtemsPartReqCreate_Post_Status_InvNumber: {
446 T_eq_u32( ctx->id_value, 0xffffffff );
450 case RtemsPartReqCreate_Post_Status_InvSize: {
452 T_eq_u32( ctx->id_value, 0xffffffff );
456 case RtemsPartReqCreate_Post_Status_TooMany: {
458 T_eq_u32( ctx->id_value, 0xffffffff );
462 case RtemsPartReqCreate_Post_Status_NA:
472 static void RtemsPartReqCreate_Setup_Wrap(
void *arg )
478 RtemsPartReqCreate_Setup( ctx );
481 static size_t RtemsPartReqCreate_Scope(
void *arg,
char *buf,
size_t n )
488 return T_get_scope( RtemsPartReqCreate_PreDesc, buf, n, ctx->
pcs );
494 static T_fixture RtemsPartReqCreate_Fixture = {
495 .setup = RtemsPartReqCreate_Setup_Wrap,
498 .scope = RtemsPartReqCreate_Scope,
499 .initial_context = &RtemsPartReqCreate_Instance
502 static const uint8_t RtemsPartReqCreate_TransitionMap[][ 1 ] = {
504 RtemsPartReqCreate_Post_Status_Ok
506 RtemsPartReqCreate_Post_Status_TooMany
508 RtemsPartReqCreate_Post_Status_InvSize
510 RtemsPartReqCreate_Post_Status_InvSize
512 RtemsPartReqCreate_Post_Status_InvSize
514 RtemsPartReqCreate_Post_Status_InvSize
516 RtemsPartReqCreate_Post_Status_InvSize
518 RtemsPartReqCreate_Post_Status_InvSize
520 RtemsPartReqCreate_Post_Status_InvSize
522 RtemsPartReqCreate_Post_Status_InvSize
524 RtemsPartReqCreate_Post_Status_InvSize
526 RtemsPartReqCreate_Post_Status_InvSize
528 RtemsPartReqCreate_Post_Status_InvSize
530 RtemsPartReqCreate_Post_Status_InvSize
532 RtemsPartReqCreate_Post_Status_InvSize
534 RtemsPartReqCreate_Post_Status_InvSize
536 RtemsPartReqCreate_Post_Status_InvSize
538 RtemsPartReqCreate_Post_Status_InvSize
540 RtemsPartReqCreate_Post_Status_InvAddress
542 RtemsPartReqCreate_Post_Status_InvAddress
544 RtemsPartReqCreate_Post_Status_InvAddress
546 RtemsPartReqCreate_Post_Status_InvAddress
548 RtemsPartReqCreate_Post_Status_InvAddress
550 RtemsPartReqCreate_Post_Status_InvAddress
552 RtemsPartReqCreate_Post_Status_InvAddress
554 RtemsPartReqCreate_Post_Status_InvAddress
556 RtemsPartReqCreate_Post_Status_InvAddress
558 RtemsPartReqCreate_Post_Status_InvAddress
560 RtemsPartReqCreate_Post_Status_InvAddress
562 RtemsPartReqCreate_Post_Status_InvAddress
564 RtemsPartReqCreate_Post_Status_InvAddress
566 RtemsPartReqCreate_Post_Status_InvAddress
568 RtemsPartReqCreate_Post_Status_InvAddress
570 RtemsPartReqCreate_Post_Status_InvAddress
572 RtemsPartReqCreate_Post_Status_InvAddress
574 RtemsPartReqCreate_Post_Status_InvAddress
576 RtemsPartReqCreate_Post_Status_InvAddress
578 RtemsPartReqCreate_Post_Status_InvAddress
580 RtemsPartReqCreate_Post_Status_InvSize
582 RtemsPartReqCreate_Post_Status_InvSize
584 RtemsPartReqCreate_Post_Status_InvSize
586 RtemsPartReqCreate_Post_Status_InvSize
588 RtemsPartReqCreate_Post_Status_InvSize
590 RtemsPartReqCreate_Post_Status_InvSize
592 RtemsPartReqCreate_Post_Status_InvSize
594 RtemsPartReqCreate_Post_Status_InvSize
596 RtemsPartReqCreate_Post_Status_InvSize
598 RtemsPartReqCreate_Post_Status_InvSize
600 RtemsPartReqCreate_Post_Status_InvSize
602 RtemsPartReqCreate_Post_Status_InvSize
604 RtemsPartReqCreate_Post_Status_InvSize
606 RtemsPartReqCreate_Post_Status_InvSize
608 RtemsPartReqCreate_Post_Status_InvSize
610 RtemsPartReqCreate_Post_Status_InvSize
612 RtemsPartReqCreate_Post_Status_InvName
614 RtemsPartReqCreate_Post_Status_InvName
616 RtemsPartReqCreate_Post_Status_InvName
618 RtemsPartReqCreate_Post_Status_InvName
620 RtemsPartReqCreate_Post_Status_InvName
622 RtemsPartReqCreate_Post_Status_InvName
624 RtemsPartReqCreate_Post_Status_InvName
626 RtemsPartReqCreate_Post_Status_InvName
628 RtemsPartReqCreate_Post_Status_InvName
630 RtemsPartReqCreate_Post_Status_InvName
632 RtemsPartReqCreate_Post_Status_InvName
634 RtemsPartReqCreate_Post_Status_InvName
636 RtemsPartReqCreate_Post_Status_InvName
638 RtemsPartReqCreate_Post_Status_InvName
640 RtemsPartReqCreate_Post_Status_InvName
642 RtemsPartReqCreate_Post_Status_InvName
644 RtemsPartReqCreate_Post_Status_InvName
646 RtemsPartReqCreate_Post_Status_InvName
648 RtemsPartReqCreate_Post_Status_InvName
650 RtemsPartReqCreate_Post_Status_InvName
652 RtemsPartReqCreate_Post_Status_InvName
654 RtemsPartReqCreate_Post_Status_InvName
656 RtemsPartReqCreate_Post_Status_InvName
658 RtemsPartReqCreate_Post_Status_InvName
660 RtemsPartReqCreate_Post_Status_InvName
662 RtemsPartReqCreate_Post_Status_InvName
664 RtemsPartReqCreate_Post_Status_InvName
666 RtemsPartReqCreate_Post_Status_InvName
668 RtemsPartReqCreate_Post_Status_InvName
670 RtemsPartReqCreate_Post_Status_InvName
672 RtemsPartReqCreate_Post_Status_InvName
674 RtemsPartReqCreate_Post_Status_InvName
676 RtemsPartReqCreate_Post_Status_InvName
678 RtemsPartReqCreate_Post_Status_InvName
680 RtemsPartReqCreate_Post_Status_InvName
682 RtemsPartReqCreate_Post_Status_InvName
684 RtemsPartReqCreate_Post_Status_InvName
686 RtemsPartReqCreate_Post_Status_InvName
688 RtemsPartReqCreate_Post_Status_InvName
690 RtemsPartReqCreate_Post_Status_InvName
692 RtemsPartReqCreate_Post_Status_InvName
694 RtemsPartReqCreate_Post_Status_InvName
696 RtemsPartReqCreate_Post_Status_InvName
698 RtemsPartReqCreate_Post_Status_InvName
700 RtemsPartReqCreate_Post_Status_InvName
702 RtemsPartReqCreate_Post_Status_InvName
704 RtemsPartReqCreate_Post_Status_InvName
706 RtemsPartReqCreate_Post_Status_InvName
708 RtemsPartReqCreate_Post_Status_InvName
710 RtemsPartReqCreate_Post_Status_InvName
712 RtemsPartReqCreate_Post_Status_InvName
714 RtemsPartReqCreate_Post_Status_InvName
716 RtemsPartReqCreate_Post_Status_InvName
718 RtemsPartReqCreate_Post_Status_InvName
720 RtemsPartReqCreate_Post_Status_InvAddress
722 RtemsPartReqCreate_Post_Status_InvAddress
724 RtemsPartReqCreate_Post_Status_InvAddress
726 RtemsPartReqCreate_Post_Status_InvAddress
728 RtemsPartReqCreate_Post_Status_InvAddress
730 RtemsPartReqCreate_Post_Status_InvAddress
732 RtemsPartReqCreate_Post_Status_InvAddress
734 RtemsPartReqCreate_Post_Status_InvAddress
736 RtemsPartReqCreate_Post_Status_InvAddress
738 RtemsPartReqCreate_Post_Status_InvAddress
740 RtemsPartReqCreate_Post_Status_InvAddress
742 RtemsPartReqCreate_Post_Status_InvAddress
744 RtemsPartReqCreate_Post_Status_InvAddress
746 RtemsPartReqCreate_Post_Status_InvAddress
748 RtemsPartReqCreate_Post_Status_InvAddress
750 RtemsPartReqCreate_Post_Status_InvAddress
752 RtemsPartReqCreate_Post_Status_InvAddress
754 RtemsPartReqCreate_Post_Status_InvAddress
756 RtemsPartReqCreate_Post_Status_InvAddress
758 RtemsPartReqCreate_Post_Status_InvAddress
760 RtemsPartReqCreate_Post_Status_InvAddress
762 RtemsPartReqCreate_Post_Status_InvAddress
764 RtemsPartReqCreate_Post_Status_InvAddress
766 RtemsPartReqCreate_Post_Status_InvAddress
768 RtemsPartReqCreate_Post_Status_InvAddress
770 RtemsPartReqCreate_Post_Status_InvAddress
772 RtemsPartReqCreate_Post_Status_InvAddress
774 RtemsPartReqCreate_Post_Status_InvAddress
776 RtemsPartReqCreate_Post_Status_InvAddress
778 RtemsPartReqCreate_Post_Status_InvAddress
780 RtemsPartReqCreate_Post_Status_InvAddress
782 RtemsPartReqCreate_Post_Status_InvAddress
784 RtemsPartReqCreate_Post_Status_InvAddress
786 RtemsPartReqCreate_Post_Status_InvAddress
788 RtemsPartReqCreate_Post_Status_InvAddress
790 RtemsPartReqCreate_Post_Status_InvAddress
792 RtemsPartReqCreate_Post_Status_InvAddress
794 RtemsPartReqCreate_Post_Status_InvAddress
796 RtemsPartReqCreate_Post_Status_InvAddress
798 RtemsPartReqCreate_Post_Status_InvAddress
800 RtemsPartReqCreate_Post_Status_InvAddress
802 RtemsPartReqCreate_Post_Status_InvAddress
804 RtemsPartReqCreate_Post_Status_InvAddress
806 RtemsPartReqCreate_Post_Status_InvAddress
808 RtemsPartReqCreate_Post_Status_InvAddress
810 RtemsPartReqCreate_Post_Status_InvAddress
812 RtemsPartReqCreate_Post_Status_InvAddress
814 RtemsPartReqCreate_Post_Status_InvAddress
816 RtemsPartReqCreate_Post_Status_InvAddress
818 RtemsPartReqCreate_Post_Status_InvAddress
820 RtemsPartReqCreate_Post_Status_InvAddress
822 RtemsPartReqCreate_Post_Status_InvAddress
824 RtemsPartReqCreate_Post_Status_InvAddress
826 RtemsPartReqCreate_Post_Status_InvAddress
828 RtemsPartReqCreate_Post_Status_InvName
830 RtemsPartReqCreate_Post_Status_InvName
832 RtemsPartReqCreate_Post_Status_InvName
834 RtemsPartReqCreate_Post_Status_InvName
836 RtemsPartReqCreate_Post_Status_InvName
838 RtemsPartReqCreate_Post_Status_InvName
840 RtemsPartReqCreate_Post_Status_InvName
842 RtemsPartReqCreate_Post_Status_InvName
844 RtemsPartReqCreate_Post_Status_InvName
846 RtemsPartReqCreate_Post_Status_InvName
848 RtemsPartReqCreate_Post_Status_InvName
850 RtemsPartReqCreate_Post_Status_InvName
852 RtemsPartReqCreate_Post_Status_InvName
854 RtemsPartReqCreate_Post_Status_InvName
856 RtemsPartReqCreate_Post_Status_InvName
858 RtemsPartReqCreate_Post_Status_InvName
860 RtemsPartReqCreate_Post_Status_InvName
862 RtemsPartReqCreate_Post_Status_InvName
864 RtemsPartReqCreate_Post_Status_InvName
866 RtemsPartReqCreate_Post_Status_InvName
868 RtemsPartReqCreate_Post_Status_InvName
870 RtemsPartReqCreate_Post_Status_InvName
872 RtemsPartReqCreate_Post_Status_InvName
874 RtemsPartReqCreate_Post_Status_InvName
876 RtemsPartReqCreate_Post_Status_InvName
878 RtemsPartReqCreate_Post_Status_InvName
880 RtemsPartReqCreate_Post_Status_InvName
882 RtemsPartReqCreate_Post_Status_InvName
884 RtemsPartReqCreate_Post_Status_InvName
886 RtemsPartReqCreate_Post_Status_InvName
888 RtemsPartReqCreate_Post_Status_InvName
890 RtemsPartReqCreate_Post_Status_InvName
892 RtemsPartReqCreate_Post_Status_InvName
894 RtemsPartReqCreate_Post_Status_InvName
896 RtemsPartReqCreate_Post_Status_InvName
898 RtemsPartReqCreate_Post_Status_InvName
900 RtemsPartReqCreate_Post_Status_InvName
902 RtemsPartReqCreate_Post_Status_InvName
904 RtemsPartReqCreate_Post_Status_InvName
906 RtemsPartReqCreate_Post_Status_InvName
908 RtemsPartReqCreate_Post_Status_InvName
910 RtemsPartReqCreate_Post_Status_InvName
912 RtemsPartReqCreate_Post_Status_InvName
914 RtemsPartReqCreate_Post_Status_InvName
916 RtemsPartReqCreate_Post_Status_InvName
918 RtemsPartReqCreate_Post_Status_InvName
920 RtemsPartReqCreate_Post_Status_InvName
922 RtemsPartReqCreate_Post_Status_InvName
924 RtemsPartReqCreate_Post_Status_InvName
926 RtemsPartReqCreate_Post_Status_InvName
928 RtemsPartReqCreate_Post_Status_InvName
930 RtemsPartReqCreate_Post_Status_InvName
932 RtemsPartReqCreate_Post_Status_InvName
934 RtemsPartReqCreate_Post_Status_InvName
938 static const struct {
940 uint8_t Pre_Id_NA : 1;
941 uint8_t Pre_Name_NA : 1;
942 uint8_t Pre_Start_NA : 1;
943 uint8_t Pre_Length_NA : 1;
944 uint8_t Pre_Size_NA : 1;
945 uint8_t Pre_Parts_NA : 1;
946 } RtemsPartReqCreate_TransitionInfo[] = {
1387 ctx->id_value = 0xffffffff;
1393 T_eq_u32(
id, 0xffffffff );
1400 ctx->starting_address,
1418 T_quiet_rsc_success( sc );
1425 T_TEST_CASE_FIXTURE( RtemsPartReqCreate, &RtemsPartReqCreate_Fixture )
1430 ctx = T_fixture_context();
1435 ctx->
pcs[ 0 ] = RtemsPartReqCreate_Pre_Id_Id;
1436 ctx->
pcs[ 0 ] < RtemsPartReqCreate_Pre_Id_NA;
1439 if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Id_NA ) {
1440 ctx->
pcs[ 0 ] = RtemsPartReqCreate_Pre_Id_NA;
1441 index += ( RtemsPartReqCreate_Pre_Id_NA - 1 )
1442 * RtemsPartReqCreate_Pre_Name_NA
1443 * RtemsPartReqCreate_Pre_Start_NA
1444 * RtemsPartReqCreate_Pre_Length_NA
1445 * RtemsPartReqCreate_Pre_Size_NA
1446 * RtemsPartReqCreate_Pre_Parts_NA;
1450 ctx->
pcs[ 1 ] = RtemsPartReqCreate_Pre_Name_Valid;
1451 ctx->
pcs[ 1 ] < RtemsPartReqCreate_Pre_Name_NA;
1454 if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Name_NA ) {
1455 ctx->
pcs[ 1 ] = RtemsPartReqCreate_Pre_Name_NA;
1456 index += ( RtemsPartReqCreate_Pre_Name_NA - 1 )
1457 * RtemsPartReqCreate_Pre_Start_NA
1458 * RtemsPartReqCreate_Pre_Length_NA
1459 * RtemsPartReqCreate_Pre_Size_NA
1460 * RtemsPartReqCreate_Pre_Parts_NA;
1464 ctx->
pcs[ 2 ] = RtemsPartReqCreate_Pre_Start_Valid;
1465 ctx->
pcs[ 2 ] < RtemsPartReqCreate_Pre_Start_NA;
1468 if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Start_NA ) {
1469 ctx->
pcs[ 2 ] = RtemsPartReqCreate_Pre_Start_NA;
1470 index += ( RtemsPartReqCreate_Pre_Start_NA - 1 )
1471 * RtemsPartReqCreate_Pre_Length_NA
1472 * RtemsPartReqCreate_Pre_Size_NA
1473 * RtemsPartReqCreate_Pre_Parts_NA;
1477 ctx->
pcs[ 3 ] = RtemsPartReqCreate_Pre_Length_Valid;
1478 ctx->
pcs[ 3 ] < RtemsPartReqCreate_Pre_Length_NA;
1481 if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Length_NA ) {
1482 ctx->
pcs[ 3 ] = RtemsPartReqCreate_Pre_Length_NA;
1483 index += ( RtemsPartReqCreate_Pre_Length_NA - 1 )
1484 * RtemsPartReqCreate_Pre_Size_NA
1485 * RtemsPartReqCreate_Pre_Parts_NA;
1489 ctx->
pcs[ 4 ] = RtemsPartReqCreate_Pre_Size_Valid;
1490 ctx->
pcs[ 4 ] < RtemsPartReqCreate_Pre_Size_NA;
1493 if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Size_NA ) {
1494 ctx->
pcs[ 4 ] = RtemsPartReqCreate_Pre_Size_NA;
1495 index += ( RtemsPartReqCreate_Pre_Size_NA - 1 )
1496 * RtemsPartReqCreate_Pre_Parts_NA;
1500 ctx->
pcs[ 5 ] = RtemsPartReqCreate_Pre_Parts_Avail;
1501 ctx->
pcs[ 5 ] < RtemsPartReqCreate_Pre_Parts_NA;
1504 if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Parts_NA ) {
1505 ctx->
pcs[ 5 ] = RtemsPartReqCreate_Pre_Parts_NA;
1506 index += ( RtemsPartReqCreate_Pre_Parts_NA - 1 );
1509 if ( RtemsPartReqCreate_TransitionInfo[ index ].Skip ) {
1514 RtemsPartReqCreate_Prepare( ctx );
1515 RtemsPartReqCreate_Pre_Id_Prepare( ctx, ctx->
pcs[ 0 ] );
1516 RtemsPartReqCreate_Pre_Name_Prepare( ctx, ctx->
pcs[ 1 ] );
1517 RtemsPartReqCreate_Pre_Start_Prepare( ctx, ctx->
pcs[ 2 ] );
1518 RtemsPartReqCreate_Pre_Length_Prepare( ctx, ctx->
pcs[ 3 ] );
1519 RtemsPartReqCreate_Pre_Size_Prepare( ctx, ctx->
pcs[ 4 ] );
1520 RtemsPartReqCreate_Pre_Parts_Prepare( ctx, ctx->
pcs[ 5 ] );
1521 RtemsPartReqCreate_Action( ctx );
1522 RtemsPartReqCreate_Post_Status_Check(
1524 RtemsPartReqCreate_TransitionMap[ index ][ 0 ]
1526 RtemsPartReqCreate_Cleanup( ctx );
This status code indicates you have attempted to create too many instances of a particular object cla...
Test context for spec:/rtems/part/req/create test case.
rtems_status_code rtems_partition_get_buffer(rtems_id id, void **buffer)
Tries to get a buffer from the specified partition.
uint32_t rtems_name
This type is used to represent a Classic API object name.
bool in_action_loop
This member indicates if the test action loop is currently executed.
This status code indicates that the request was not satisfied.
Objects_Information * _Objects_Get_information_id(Objects_Id id)
Gets information of an object from an ID.
#define RTEMS_DEFAULT_ATTRIBUTES
This is the default value for an attribute set.
rtems_status_code rtems_partition_create(rtems_name name, void *starting_address, uintptr_t length, size_t buffer_size, rtems_attribute attribute_set, rtems_id *id)
Creates a partition.
#define rtems_build_name(_C1, _C2, _C3, _C4)
%
size_t pcs[6]
This member defines the pre-condition states for the next action.
This status code indicates that a specified number was invalid.
rtems_status_code rtems_partition_delete(rtems_id id)
Deletes the specified partition.
rtems_status_code rtems_partition_return_buffer(rtems_id id, void *buffer)
Returns a buffer to the specified partition.
This status code indicates successful completion.
static __inline__ void _Chain_Append_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Appends a node (unprotected).
Inlined Routines in the Object Handler.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
#define RTEMS_ALIGNED(_alignment)
Instructs the compiler in a declaration or definition to enforce the specified alignment.
This status code indicates that a specified address was invalid.
This header file defines the RTEMS Classic API.
uint32_t rtems_attribute
This type is used to represent Classic API attributes.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
static __inline__ void _Chain_Initialize_empty(Chain_Control *the_chain)
Initializes this chain as empty.
rtems_status_code rtems_partition_ident(rtems_name name, uint32_t node, rtems_id *id)
Identifies a partition object by the specified object name.
This status code indicates that an object name was invalid.
#define RTEMS_SEARCH_LOCAL_NODE
%
Objects_Control * _Objects_Get_no_protection(Objects_Id id, const Objects_Information *information)
Maps object ids to object control blocks.
This status code indicates that a specified size was invalid.
static __inline__ Chain_Node * _Chain_Get_unprotected(Chain_Control *the_chain)
Gets the first node (unprotected).
#define RTEMS_PARTITION_ALIGNMENT
This constant defines the minimum alignment of a partition buffer in bytes.