RTEMS
tc-part-create.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
9 /*
10  * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  * notice, this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  * notice, this list of conditions and the following disclaimer in the
19  * documentation and/or other materials provided with the distribution.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 /*
35  * Do not manually edit this file. It is part of the RTEMS quality process
36  * and was automatically generated.
37  *
38  * If you find something that needs to be fixed or worded better please
39  * post a report to an RTEMS mailing list or raise a bug report:
40  *
41  * https://docs.rtems.org/branches/master/user/support/bugs.html
42  *
43  * For information on updating and regenerating please refer to:
44  *
45  * https://docs.rtems.org/branches/master/eng/req/howto.html
46  */
47 
48 #ifdef HAVE_CONFIG_H
49 #include "config.h"
50 #endif
51 
52 #include <rtems.h>
53 #include <string.h>
54 #include <rtems/score/chainimpl.h>
55 #include <rtems/score/objectimpl.h>
56 
57 #include <rtems/test.h>
58 
67 typedef enum {
68  RtemsPartReqCreate_Pre_Id_Id,
69  RtemsPartReqCreate_Pre_Id_Null,
70  RtemsPartReqCreate_Pre_Id_NA
71 } RtemsPartReqCreate_Pre_Id;
72 
73 typedef enum {
74  RtemsPartReqCreate_Pre_Name_Valid,
75  RtemsPartReqCreate_Pre_Name_Invalid,
76  RtemsPartReqCreate_Pre_Name_NA
77 } RtemsPartReqCreate_Pre_Name;
78 
79 typedef enum {
80  RtemsPartReqCreate_Pre_Start_Valid,
81  RtemsPartReqCreate_Pre_Start_Null,
82  RtemsPartReqCreate_Pre_Start_BadAlign,
83  RtemsPartReqCreate_Pre_Start_NA
84 } RtemsPartReqCreate_Pre_Start;
85 
86 typedef enum {
87  RtemsPartReqCreate_Pre_Length_Valid,
88  RtemsPartReqCreate_Pre_Length_Zero,
89  RtemsPartReqCreate_Pre_Length_Invalid,
90  RtemsPartReqCreate_Pre_Length_NA
91 } RtemsPartReqCreate_Pre_Length;
92 
93 typedef enum {
94  RtemsPartReqCreate_Pre_Size_Valid,
95  RtemsPartReqCreate_Pre_Size_Zero,
96  RtemsPartReqCreate_Pre_Size_Small,
97  RtemsPartReqCreate_Pre_Size_NA
98 } RtemsPartReqCreate_Pre_Size;
99 
100 typedef enum {
101  RtemsPartReqCreate_Pre_Parts_Avail,
102  RtemsPartReqCreate_Pre_Parts_None,
103  RtemsPartReqCreate_Pre_Parts_NA
104 } RtemsPartReqCreate_Pre_Parts;
105 
106 typedef enum {
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;
115 
119 typedef struct {
120  rtems_status_code status;
121 
122  rtems_name name;
123 
124  void *starting_address;
125 
126  uintptr_t length;
127 
128  size_t buffer_size;
129 
130  rtems_attribute attribute_set;
131 
132  rtems_id *id;
133 
134  rtems_id id_value;
135 
136  Chain_Control partitions;
137 
141  size_t pcs[ 6 ];
142 
149 
151  RtemsPartReqCreate_Instance;
152 
153 static const char * const RtemsPartReqCreate_PreDesc_Id[] = {
154  "Id",
155  "Null",
156  "NA"
157 };
158 
159 static const char * const RtemsPartReqCreate_PreDesc_Name[] = {
160  "Valid",
161  "Invalid",
162  "NA"
163 };
164 
165 static const char * const RtemsPartReqCreate_PreDesc_Start[] = {
166  "Valid",
167  "Null",
168  "BadAlign",
169  "NA"
170 };
171 
172 static const char * const RtemsPartReqCreate_PreDesc_Length[] = {
173  "Valid",
174  "Zero",
175  "Invalid",
176  "NA"
177 };
178 
179 static const char * const RtemsPartReqCreate_PreDesc_Size[] = {
180  "Valid",
181  "Zero",
182  "Small",
183  "NA"
184 };
185 
186 static const char * const RtemsPartReqCreate_PreDesc_Parts[] = {
187  "Avail",
188  "None",
189  "NA"
190 };
191 
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,
199  NULL
200 };
201 
202 #define PART_NAME rtems_build_name( 'N', 'A', 'M', 'E' )
203 
204 #define MAX_PARTITIONS 4
205 
206 #define BUFFER_COUNT 2
207 
208 #define BUFFER_SIZE ( 2 * sizeof( void * ) )
209 
211  exhaust_buffers[ MAX_PARTITIONS ][ BUFFER_COUNT ][ BUFFER_SIZE ];
212 
214  buffers[ BUFFER_COUNT ][ BUFFER_SIZE ];
215 
216 static void RtemsPartReqCreate_Pre_Id_Prepare(
218  RtemsPartReqCreate_Pre_Id state
219 )
220 {
221  switch ( state ) {
222  case RtemsPartReqCreate_Pre_Id_Id: {
223  ctx->id = &ctx->id_value;
224  break;
225  }
226 
227  case RtemsPartReqCreate_Pre_Id_Null: {
228  ctx->id = NULL;
229  break;
230  }
231 
232  case RtemsPartReqCreate_Pre_Id_NA:
233  break;
234  }
235 }
236 
237 static void RtemsPartReqCreate_Pre_Name_Prepare(
239  RtemsPartReqCreate_Pre_Name state
240 )
241 {
242  switch ( state ) {
243  case RtemsPartReqCreate_Pre_Name_Valid: {
244  ctx->name = PART_NAME;
245  break;
246  }
247 
248  case RtemsPartReqCreate_Pre_Name_Invalid: {
249  ctx->name = 0;
250  break;
251  }
252 
253  case RtemsPartReqCreate_Pre_Name_NA:
254  break;
255  }
256 }
257 
258 static void RtemsPartReqCreate_Pre_Start_Prepare(
260  RtemsPartReqCreate_Pre_Start state
261 )
262 {
263  switch ( state ) {
264  case RtemsPartReqCreate_Pre_Start_Valid: {
265  ctx->starting_address = buffers;
266  break;
267  }
268 
269  case RtemsPartReqCreate_Pre_Start_Null: {
270  ctx->starting_address = NULL;
271  break;
272  }
273 
274  case RtemsPartReqCreate_Pre_Start_BadAlign: {
275  ctx->starting_address = &buffers[ 0 ][ 1 ];
276  break;
277  }
278 
279  case RtemsPartReqCreate_Pre_Start_NA:
280  break;
281  }
282 }
283 
284 static void RtemsPartReqCreate_Pre_Length_Prepare(
286  RtemsPartReqCreate_Pre_Length state
287 )
288 {
289  switch ( state ) {
290  case RtemsPartReqCreate_Pre_Length_Valid: {
291  ctx->length = sizeof( buffers );
292  break;
293  }
294 
295  case RtemsPartReqCreate_Pre_Length_Zero: {
296  ctx->length = 0;
297  break;
298  }
299 
300  case RtemsPartReqCreate_Pre_Length_Invalid: {
301  ctx->length = sizeof( buffers[ 0 ] ) - 1;
302  break;
303  }
304 
305  case RtemsPartReqCreate_Pre_Length_NA:
306  break;
307  }
308 }
309 
310 static void RtemsPartReqCreate_Pre_Size_Prepare(
312  RtemsPartReqCreate_Pre_Size state
313 )
314 {
315  switch ( state ) {
316  case RtemsPartReqCreate_Pre_Size_Valid: {
317  ctx->buffer_size = sizeof( buffers[ 0 ] );
318  break;
319  }
320 
321  case RtemsPartReqCreate_Pre_Size_Zero: {
322  ctx->buffer_size = 0;
323  break;
324  }
325 
326  case RtemsPartReqCreate_Pre_Size_Small: {
327  ctx->buffer_size = sizeof( buffers[ 0 ] ) - 1;
328  break;
329  }
330 
331  case RtemsPartReqCreate_Pre_Size_NA:
332  break;
333  }
334 }
335 
336 static void RtemsPartReqCreate_Pre_Parts_Prepare(
338  RtemsPartReqCreate_Pre_Parts state
339 )
340 {
341  size_t i;
342 
343  switch ( state ) {
344  case RtemsPartReqCreate_Pre_Parts_Avail: {
345  /* Nothing to do */
346  break;
347  }
348 
349  case RtemsPartReqCreate_Pre_Parts_None: {
350  i = 0;
351 
352  while ( i < MAX_PARTITIONS ) {
354  rtems_id id;
355 
357  rtems_build_name( 'P', 'A', 'R', 'T' ),
358  exhaust_buffers[ i ],
359  sizeof( exhaust_buffers[ i ] ),
360  sizeof( exhaust_buffers[ i ][ 0 ] ),
362  &id
363  );
364 
365  if ( sc == RTEMS_SUCCESSFUL ) {
366  Objects_Control *obj;
367  const Objects_Information *info;
368 
369  info = _Objects_Get_information_id( id );
370  T_quiet_assert_not_null( info );
371  obj = _Objects_Get_no_protection( id, info );
372  T_quiet_assert_not_null( obj );
373  _Chain_Append_unprotected( &ctx->partitions, &obj->Node );
374  } else {
375  T_quiet_rsc( sc, RTEMS_TOO_MANY );
376  break;
377  }
378 
379  ++i;
380  }
381  break;
382  }
383 
384  case RtemsPartReqCreate_Pre_Parts_NA:
385  break;
386  }
387 }
388 
389 static void RtemsPartReqCreate_Post_Status_Check(
391  RtemsPartReqCreate_Post_Status state
392 )
393 {
395  rtems_id id;
396  size_t i;
397  void *buffers[ BUFFER_COUNT ];
398  void *no_buffer;
399 
400  switch ( state ) {
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 );
405 
406  id = 0xffffffff;
407  sc = rtems_partition_ident( PART_NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
408  T_rsc_success( sc );
409  T_eq_u32( id, ctx->id_value );
410 
411  for ( i = 0; i < BUFFER_COUNT; ++i) {
412  sc = rtems_partition_get_buffer( ctx->id_value, &buffers[ i ] );
413  T_rsc_success( sc );
414  T_not_null( buffers[ i ] );
415  }
416 
417  no_buffer = (void *) (uintptr_t) 1;
418  sc = rtems_partition_get_buffer( ctx->id_value, &no_buffer );
419  T_rsc( sc, RTEMS_UNSATISFIED );
420  T_eq_ptr( no_buffer, (void *) (uintptr_t) 1 );
421 
422  for ( i = 0; i < BUFFER_COUNT; ++i) {
423  sc = rtems_partition_return_buffer( ctx->id_value, buffers[ i ] );
424  T_rsc_success( sc );
425  }
426 
427  sc = rtems_partition_delete( ctx->id_value );
428  T_rsc_success( sc );
429  break;
430  }
431 
432  case RtemsPartReqCreate_Post_Status_InvAddress: {
433  T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
434  T_eq_u32( ctx->id_value, 0xffffffff );
435  break;
436  }
437 
438  case RtemsPartReqCreate_Post_Status_InvName: {
439  T_rsc( ctx->status, RTEMS_INVALID_NAME );
440  T_eq_u32( ctx->id_value, 0xffffffff );
441  break;
442  }
443 
444  case RtemsPartReqCreate_Post_Status_InvNumber: {
445  T_rsc( ctx->status, RTEMS_INVALID_NUMBER );
446  T_eq_u32( ctx->id_value, 0xffffffff );
447  break;
448  }
449 
450  case RtemsPartReqCreate_Post_Status_InvSize: {
451  T_rsc( ctx->status, RTEMS_INVALID_SIZE );
452  T_eq_u32( ctx->id_value, 0xffffffff );
453  break;
454  }
455 
456  case RtemsPartReqCreate_Post_Status_TooMany: {
457  T_rsc( ctx->status, RTEMS_TOO_MANY );
458  T_eq_u32( ctx->id_value, 0xffffffff );
459  break;
460  }
461 
462  case RtemsPartReqCreate_Post_Status_NA:
463  break;
464  }
465 }
466 
467 static void RtemsPartReqCreate_Setup( RtemsPartReqCreate_Context *ctx )
468 {
469  _Chain_Initialize_empty( &ctx->partitions );
470 }
471 
472 static void RtemsPartReqCreate_Setup_Wrap( void *arg )
473 {
475 
476  ctx = arg;
477  ctx->in_action_loop = false;
478  RtemsPartReqCreate_Setup( ctx );
479 }
480 
481 static size_t RtemsPartReqCreate_Scope( void *arg, char *buf, size_t n )
482 {
484 
485  ctx = arg;
486 
487  if ( ctx->in_action_loop ) {
488  return T_get_scope( RtemsPartReqCreate_PreDesc, buf, n, ctx->pcs );
489  }
490 
491  return 0;
492 }
493 
494 static T_fixture RtemsPartReqCreate_Fixture = {
495  .setup = RtemsPartReqCreate_Setup_Wrap,
496  .stop = NULL,
497  .teardown = NULL,
498  .scope = RtemsPartReqCreate_Scope,
499  .initial_context = &RtemsPartReqCreate_Instance
500 };
501 
502 static const uint8_t RtemsPartReqCreate_TransitionMap[][ 1 ] = {
503  {
504  RtemsPartReqCreate_Post_Status_Ok
505  }, {
506  RtemsPartReqCreate_Post_Status_TooMany
507  }, {
508  RtemsPartReqCreate_Post_Status_InvSize
509  }, {
510  RtemsPartReqCreate_Post_Status_InvSize
511  }, {
512  RtemsPartReqCreate_Post_Status_InvSize
513  }, {
514  RtemsPartReqCreate_Post_Status_InvSize
515  }, {
516  RtemsPartReqCreate_Post_Status_InvSize
517  }, {
518  RtemsPartReqCreate_Post_Status_InvSize
519  }, {
520  RtemsPartReqCreate_Post_Status_InvSize
521  }, {
522  RtemsPartReqCreate_Post_Status_InvSize
523  }, {
524  RtemsPartReqCreate_Post_Status_InvSize
525  }, {
526  RtemsPartReqCreate_Post_Status_InvSize
527  }, {
528  RtemsPartReqCreate_Post_Status_InvSize
529  }, {
530  RtemsPartReqCreate_Post_Status_InvSize
531  }, {
532  RtemsPartReqCreate_Post_Status_InvSize
533  }, {
534  RtemsPartReqCreate_Post_Status_InvSize
535  }, {
536  RtemsPartReqCreate_Post_Status_InvSize
537  }, {
538  RtemsPartReqCreate_Post_Status_InvSize
539  }, {
540  RtemsPartReqCreate_Post_Status_InvAddress
541  }, {
542  RtemsPartReqCreate_Post_Status_InvAddress
543  }, {
544  RtemsPartReqCreate_Post_Status_InvAddress
545  }, {
546  RtemsPartReqCreate_Post_Status_InvAddress
547  }, {
548  RtemsPartReqCreate_Post_Status_InvAddress
549  }, {
550  RtemsPartReqCreate_Post_Status_InvAddress
551  }, {
552  RtemsPartReqCreate_Post_Status_InvAddress
553  }, {
554  RtemsPartReqCreate_Post_Status_InvAddress
555  }, {
556  RtemsPartReqCreate_Post_Status_InvAddress
557  }, {
558  RtemsPartReqCreate_Post_Status_InvAddress
559  }, {
560  RtemsPartReqCreate_Post_Status_InvAddress
561  }, {
562  RtemsPartReqCreate_Post_Status_InvAddress
563  }, {
564  RtemsPartReqCreate_Post_Status_InvAddress
565  }, {
566  RtemsPartReqCreate_Post_Status_InvAddress
567  }, {
568  RtemsPartReqCreate_Post_Status_InvAddress
569  }, {
570  RtemsPartReqCreate_Post_Status_InvAddress
571  }, {
572  RtemsPartReqCreate_Post_Status_InvAddress
573  }, {
574  RtemsPartReqCreate_Post_Status_InvAddress
575  }, {
576  RtemsPartReqCreate_Post_Status_InvAddress
577  }, {
578  RtemsPartReqCreate_Post_Status_InvAddress
579  }, {
580  RtemsPartReqCreate_Post_Status_InvSize
581  }, {
582  RtemsPartReqCreate_Post_Status_InvSize
583  }, {
584  RtemsPartReqCreate_Post_Status_InvSize
585  }, {
586  RtemsPartReqCreate_Post_Status_InvSize
587  }, {
588  RtemsPartReqCreate_Post_Status_InvSize
589  }, {
590  RtemsPartReqCreate_Post_Status_InvSize
591  }, {
592  RtemsPartReqCreate_Post_Status_InvSize
593  }, {
594  RtemsPartReqCreate_Post_Status_InvSize
595  }, {
596  RtemsPartReqCreate_Post_Status_InvSize
597  }, {
598  RtemsPartReqCreate_Post_Status_InvSize
599  }, {
600  RtemsPartReqCreate_Post_Status_InvSize
601  }, {
602  RtemsPartReqCreate_Post_Status_InvSize
603  }, {
604  RtemsPartReqCreate_Post_Status_InvSize
605  }, {
606  RtemsPartReqCreate_Post_Status_InvSize
607  }, {
608  RtemsPartReqCreate_Post_Status_InvSize
609  }, {
610  RtemsPartReqCreate_Post_Status_InvSize
611  }, {
612  RtemsPartReqCreate_Post_Status_InvName
613  }, {
614  RtemsPartReqCreate_Post_Status_InvName
615  }, {
616  RtemsPartReqCreate_Post_Status_InvName
617  }, {
618  RtemsPartReqCreate_Post_Status_InvName
619  }, {
620  RtemsPartReqCreate_Post_Status_InvName
621  }, {
622  RtemsPartReqCreate_Post_Status_InvName
623  }, {
624  RtemsPartReqCreate_Post_Status_InvName
625  }, {
626  RtemsPartReqCreate_Post_Status_InvName
627  }, {
628  RtemsPartReqCreate_Post_Status_InvName
629  }, {
630  RtemsPartReqCreate_Post_Status_InvName
631  }, {
632  RtemsPartReqCreate_Post_Status_InvName
633  }, {
634  RtemsPartReqCreate_Post_Status_InvName
635  }, {
636  RtemsPartReqCreate_Post_Status_InvName
637  }, {
638  RtemsPartReqCreate_Post_Status_InvName
639  }, {
640  RtemsPartReqCreate_Post_Status_InvName
641  }, {
642  RtemsPartReqCreate_Post_Status_InvName
643  }, {
644  RtemsPartReqCreate_Post_Status_InvName
645  }, {
646  RtemsPartReqCreate_Post_Status_InvName
647  }, {
648  RtemsPartReqCreate_Post_Status_InvName
649  }, {
650  RtemsPartReqCreate_Post_Status_InvName
651  }, {
652  RtemsPartReqCreate_Post_Status_InvName
653  }, {
654  RtemsPartReqCreate_Post_Status_InvName
655  }, {
656  RtemsPartReqCreate_Post_Status_InvName
657  }, {
658  RtemsPartReqCreate_Post_Status_InvName
659  }, {
660  RtemsPartReqCreate_Post_Status_InvName
661  }, {
662  RtemsPartReqCreate_Post_Status_InvName
663  }, {
664  RtemsPartReqCreate_Post_Status_InvName
665  }, {
666  RtemsPartReqCreate_Post_Status_InvName
667  }, {
668  RtemsPartReqCreate_Post_Status_InvName
669  }, {
670  RtemsPartReqCreate_Post_Status_InvName
671  }, {
672  RtemsPartReqCreate_Post_Status_InvName
673  }, {
674  RtemsPartReqCreate_Post_Status_InvName
675  }, {
676  RtemsPartReqCreate_Post_Status_InvName
677  }, {
678  RtemsPartReqCreate_Post_Status_InvName
679  }, {
680  RtemsPartReqCreate_Post_Status_InvName
681  }, {
682  RtemsPartReqCreate_Post_Status_InvName
683  }, {
684  RtemsPartReqCreate_Post_Status_InvName
685  }, {
686  RtemsPartReqCreate_Post_Status_InvName
687  }, {
688  RtemsPartReqCreate_Post_Status_InvName
689  }, {
690  RtemsPartReqCreate_Post_Status_InvName
691  }, {
692  RtemsPartReqCreate_Post_Status_InvName
693  }, {
694  RtemsPartReqCreate_Post_Status_InvName
695  }, {
696  RtemsPartReqCreate_Post_Status_InvName
697  }, {
698  RtemsPartReqCreate_Post_Status_InvName
699  }, {
700  RtemsPartReqCreate_Post_Status_InvName
701  }, {
702  RtemsPartReqCreate_Post_Status_InvName
703  }, {
704  RtemsPartReqCreate_Post_Status_InvName
705  }, {
706  RtemsPartReqCreate_Post_Status_InvName
707  }, {
708  RtemsPartReqCreate_Post_Status_InvName
709  }, {
710  RtemsPartReqCreate_Post_Status_InvName
711  }, {
712  RtemsPartReqCreate_Post_Status_InvName
713  }, {
714  RtemsPartReqCreate_Post_Status_InvName
715  }, {
716  RtemsPartReqCreate_Post_Status_InvName
717  }, {
718  RtemsPartReqCreate_Post_Status_InvName
719  }, {
720  RtemsPartReqCreate_Post_Status_InvAddress
721  }, {
722  RtemsPartReqCreate_Post_Status_InvAddress
723  }, {
724  RtemsPartReqCreate_Post_Status_InvAddress
725  }, {
726  RtemsPartReqCreate_Post_Status_InvAddress
727  }, {
728  RtemsPartReqCreate_Post_Status_InvAddress
729  }, {
730  RtemsPartReqCreate_Post_Status_InvAddress
731  }, {
732  RtemsPartReqCreate_Post_Status_InvAddress
733  }, {
734  RtemsPartReqCreate_Post_Status_InvAddress
735  }, {
736  RtemsPartReqCreate_Post_Status_InvAddress
737  }, {
738  RtemsPartReqCreate_Post_Status_InvAddress
739  }, {
740  RtemsPartReqCreate_Post_Status_InvAddress
741  }, {
742  RtemsPartReqCreate_Post_Status_InvAddress
743  }, {
744  RtemsPartReqCreate_Post_Status_InvAddress
745  }, {
746  RtemsPartReqCreate_Post_Status_InvAddress
747  }, {
748  RtemsPartReqCreate_Post_Status_InvAddress
749  }, {
750  RtemsPartReqCreate_Post_Status_InvAddress
751  }, {
752  RtemsPartReqCreate_Post_Status_InvAddress
753  }, {
754  RtemsPartReqCreate_Post_Status_InvAddress
755  }, {
756  RtemsPartReqCreate_Post_Status_InvAddress
757  }, {
758  RtemsPartReqCreate_Post_Status_InvAddress
759  }, {
760  RtemsPartReqCreate_Post_Status_InvAddress
761  }, {
762  RtemsPartReqCreate_Post_Status_InvAddress
763  }, {
764  RtemsPartReqCreate_Post_Status_InvAddress
765  }, {
766  RtemsPartReqCreate_Post_Status_InvAddress
767  }, {
768  RtemsPartReqCreate_Post_Status_InvAddress
769  }, {
770  RtemsPartReqCreate_Post_Status_InvAddress
771  }, {
772  RtemsPartReqCreate_Post_Status_InvAddress
773  }, {
774  RtemsPartReqCreate_Post_Status_InvAddress
775  }, {
776  RtemsPartReqCreate_Post_Status_InvAddress
777  }, {
778  RtemsPartReqCreate_Post_Status_InvAddress
779  }, {
780  RtemsPartReqCreate_Post_Status_InvAddress
781  }, {
782  RtemsPartReqCreate_Post_Status_InvAddress
783  }, {
784  RtemsPartReqCreate_Post_Status_InvAddress
785  }, {
786  RtemsPartReqCreate_Post_Status_InvAddress
787  }, {
788  RtemsPartReqCreate_Post_Status_InvAddress
789  }, {
790  RtemsPartReqCreate_Post_Status_InvAddress
791  }, {
792  RtemsPartReqCreate_Post_Status_InvAddress
793  }, {
794  RtemsPartReqCreate_Post_Status_InvAddress
795  }, {
796  RtemsPartReqCreate_Post_Status_InvAddress
797  }, {
798  RtemsPartReqCreate_Post_Status_InvAddress
799  }, {
800  RtemsPartReqCreate_Post_Status_InvAddress
801  }, {
802  RtemsPartReqCreate_Post_Status_InvAddress
803  }, {
804  RtemsPartReqCreate_Post_Status_InvAddress
805  }, {
806  RtemsPartReqCreate_Post_Status_InvAddress
807  }, {
808  RtemsPartReqCreate_Post_Status_InvAddress
809  }, {
810  RtemsPartReqCreate_Post_Status_InvAddress
811  }, {
812  RtemsPartReqCreate_Post_Status_InvAddress
813  }, {
814  RtemsPartReqCreate_Post_Status_InvAddress
815  }, {
816  RtemsPartReqCreate_Post_Status_InvAddress
817  }, {
818  RtemsPartReqCreate_Post_Status_InvAddress
819  }, {
820  RtemsPartReqCreate_Post_Status_InvAddress
821  }, {
822  RtemsPartReqCreate_Post_Status_InvAddress
823  }, {
824  RtemsPartReqCreate_Post_Status_InvAddress
825  }, {
826  RtemsPartReqCreate_Post_Status_InvAddress
827  }, {
828  RtemsPartReqCreate_Post_Status_InvName
829  }, {
830  RtemsPartReqCreate_Post_Status_InvName
831  }, {
832  RtemsPartReqCreate_Post_Status_InvName
833  }, {
834  RtemsPartReqCreate_Post_Status_InvName
835  }, {
836  RtemsPartReqCreate_Post_Status_InvName
837  }, {
838  RtemsPartReqCreate_Post_Status_InvName
839  }, {
840  RtemsPartReqCreate_Post_Status_InvName
841  }, {
842  RtemsPartReqCreate_Post_Status_InvName
843  }, {
844  RtemsPartReqCreate_Post_Status_InvName
845  }, {
846  RtemsPartReqCreate_Post_Status_InvName
847  }, {
848  RtemsPartReqCreate_Post_Status_InvName
849  }, {
850  RtemsPartReqCreate_Post_Status_InvName
851  }, {
852  RtemsPartReqCreate_Post_Status_InvName
853  }, {
854  RtemsPartReqCreate_Post_Status_InvName
855  }, {
856  RtemsPartReqCreate_Post_Status_InvName
857  }, {
858  RtemsPartReqCreate_Post_Status_InvName
859  }, {
860  RtemsPartReqCreate_Post_Status_InvName
861  }, {
862  RtemsPartReqCreate_Post_Status_InvName
863  }, {
864  RtemsPartReqCreate_Post_Status_InvName
865  }, {
866  RtemsPartReqCreate_Post_Status_InvName
867  }, {
868  RtemsPartReqCreate_Post_Status_InvName
869  }, {
870  RtemsPartReqCreate_Post_Status_InvName
871  }, {
872  RtemsPartReqCreate_Post_Status_InvName
873  }, {
874  RtemsPartReqCreate_Post_Status_InvName
875  }, {
876  RtemsPartReqCreate_Post_Status_InvName
877  }, {
878  RtemsPartReqCreate_Post_Status_InvName
879  }, {
880  RtemsPartReqCreate_Post_Status_InvName
881  }, {
882  RtemsPartReqCreate_Post_Status_InvName
883  }, {
884  RtemsPartReqCreate_Post_Status_InvName
885  }, {
886  RtemsPartReqCreate_Post_Status_InvName
887  }, {
888  RtemsPartReqCreate_Post_Status_InvName
889  }, {
890  RtemsPartReqCreate_Post_Status_InvName
891  }, {
892  RtemsPartReqCreate_Post_Status_InvName
893  }, {
894  RtemsPartReqCreate_Post_Status_InvName
895  }, {
896  RtemsPartReqCreate_Post_Status_InvName
897  }, {
898  RtemsPartReqCreate_Post_Status_InvName
899  }, {
900  RtemsPartReqCreate_Post_Status_InvName
901  }, {
902  RtemsPartReqCreate_Post_Status_InvName
903  }, {
904  RtemsPartReqCreate_Post_Status_InvName
905  }, {
906  RtemsPartReqCreate_Post_Status_InvName
907  }, {
908  RtemsPartReqCreate_Post_Status_InvName
909  }, {
910  RtemsPartReqCreate_Post_Status_InvName
911  }, {
912  RtemsPartReqCreate_Post_Status_InvName
913  }, {
914  RtemsPartReqCreate_Post_Status_InvName
915  }, {
916  RtemsPartReqCreate_Post_Status_InvName
917  }, {
918  RtemsPartReqCreate_Post_Status_InvName
919  }, {
920  RtemsPartReqCreate_Post_Status_InvName
921  }, {
922  RtemsPartReqCreate_Post_Status_InvName
923  }, {
924  RtemsPartReqCreate_Post_Status_InvName
925  }, {
926  RtemsPartReqCreate_Post_Status_InvName
927  }, {
928  RtemsPartReqCreate_Post_Status_InvName
929  }, {
930  RtemsPartReqCreate_Post_Status_InvName
931  }, {
932  RtemsPartReqCreate_Post_Status_InvName
933  }, {
934  RtemsPartReqCreate_Post_Status_InvName
935  }
936 };
937 
938 static const struct {
939  uint8_t Skip : 1;
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[] = {
947  {
948  0, 0, 0, 0, 0, 0, 0
949  }, {
950  0, 0, 0, 0, 0, 0, 0
951  }, {
952  0, 0, 0, 0, 0, 0, 0
953  }, {
954  0, 0, 0, 0, 0, 0, 0
955  }, {
956  0, 0, 0, 0, 0, 0, 0
957  }, {
958  0, 0, 0, 0, 0, 0, 0
959  }, {
960  0, 0, 0, 0, 0, 0, 0
961  }, {
962  0, 0, 0, 0, 0, 0, 0
963  }, {
964  0, 0, 0, 0, 0, 0, 0
965  }, {
966  0, 0, 0, 0, 0, 0, 0
967  }, {
968  0, 0, 0, 0, 0, 0, 0
969  }, {
970  0, 0, 0, 0, 0, 0, 0
971  }, {
972  0, 0, 0, 0, 0, 0, 0
973  }, {
974  0, 0, 0, 0, 0, 0, 0
975  }, {
976  0, 0, 0, 0, 0, 0, 0
977  }, {
978  0, 0, 0, 0, 0, 0, 0
979  }, {
980  0, 0, 0, 0, 0, 0, 0
981  }, {
982  0, 0, 0, 0, 0, 0, 0
983  }, {
984  0, 0, 0, 0, 0, 0, 0
985  }, {
986  0, 0, 0, 0, 0, 0, 0
987  }, {
988  0, 0, 0, 0, 0, 0, 0
989  }, {
990  0, 0, 0, 0, 0, 0, 0
991  }, {
992  0, 0, 0, 0, 0, 0, 0
993  }, {
994  0, 0, 0, 0, 0, 0, 0
995  }, {
996  0, 0, 0, 0, 0, 0, 0
997  }, {
998  0, 0, 0, 0, 0, 0, 0
999  }, {
1000  0, 0, 0, 0, 0, 0, 0
1001  }, {
1002  0, 0, 0, 0, 0, 0, 0
1003  }, {
1004  0, 0, 0, 0, 0, 0, 0
1005  }, {
1006  0, 0, 0, 0, 0, 0, 0
1007  }, {
1008  0, 0, 0, 0, 0, 0, 0
1009  }, {
1010  0, 0, 0, 0, 0, 0, 0
1011  }, {
1012  0, 0, 0, 0, 0, 0, 0
1013  }, {
1014  0, 0, 0, 0, 0, 0, 0
1015  }, {
1016  0, 0, 0, 0, 0, 0, 0
1017  }, {
1018  0, 0, 0, 0, 0, 0, 0
1019  }, {
1020  0, 0, 0, 0, 0, 0, 0
1021  }, {
1022  0, 0, 0, 0, 0, 0, 0
1023  }, {
1024  0, 0, 0, 0, 0, 0, 0
1025  }, {
1026  0, 0, 0, 0, 0, 0, 0
1027  }, {
1028  0, 0, 0, 0, 0, 0, 0
1029  }, {
1030  0, 0, 0, 0, 0, 0, 0
1031  }, {
1032  0, 0, 0, 0, 0, 0, 0
1033  }, {
1034  0, 0, 0, 0, 0, 0, 0
1035  }, {
1036  0, 0, 0, 0, 0, 0, 0
1037  }, {
1038  0, 0, 0, 0, 0, 0, 0
1039  }, {
1040  0, 0, 0, 0, 0, 0, 0
1041  }, {
1042  0, 0, 0, 0, 0, 0, 0
1043  }, {
1044  0, 0, 0, 0, 0, 0, 0
1045  }, {
1046  0, 0, 0, 0, 0, 0, 0
1047  }, {
1048  0, 0, 0, 0, 0, 0, 0
1049  }, {
1050  0, 0, 0, 0, 0, 0, 0
1051  }, {
1052  0, 0, 0, 0, 0, 0, 0
1053  }, {
1054  0, 0, 0, 0, 0, 0, 0
1055  }, {
1056  0, 0, 0, 0, 0, 0, 0
1057  }, {
1058  0, 0, 0, 0, 0, 0, 0
1059  }, {
1060  0, 0, 0, 0, 0, 0, 0
1061  }, {
1062  0, 0, 0, 0, 0, 0, 0
1063  }, {
1064  0, 0, 0, 0, 0, 0, 0
1065  }, {
1066  0, 0, 0, 0, 0, 0, 0
1067  }, {
1068  0, 0, 0, 0, 0, 0, 0
1069  }, {
1070  0, 0, 0, 0, 0, 0, 0
1071  }, {
1072  0, 0, 0, 0, 0, 0, 0
1073  }, {
1074  0, 0, 0, 0, 0, 0, 0
1075  }, {
1076  0, 0, 0, 0, 0, 0, 0
1077  }, {
1078  0, 0, 0, 0, 0, 0, 0
1079  }, {
1080  0, 0, 0, 0, 0, 0, 0
1081  }, {
1082  0, 0, 0, 0, 0, 0, 0
1083  }, {
1084  0, 0, 0, 0, 0, 0, 0
1085  }, {
1086  0, 0, 0, 0, 0, 0, 0
1087  }, {
1088  0, 0, 0, 0, 0, 0, 0
1089  }, {
1090  0, 0, 0, 0, 0, 0, 0
1091  }, {
1092  0, 0, 0, 0, 0, 0, 0
1093  }, {
1094  0, 0, 0, 0, 0, 0, 0
1095  }, {
1096  0, 0, 0, 0, 0, 0, 0
1097  }, {
1098  0, 0, 0, 0, 0, 0, 0
1099  }, {
1100  0, 0, 0, 0, 0, 0, 0
1101  }, {
1102  0, 0, 0, 0, 0, 0, 0
1103  }, {
1104  0, 0, 0, 0, 0, 0, 0
1105  }, {
1106  0, 0, 0, 0, 0, 0, 0
1107  }, {
1108  0, 0, 0, 0, 0, 0, 0
1109  }, {
1110  0, 0, 0, 0, 0, 0, 0
1111  }, {
1112  0, 0, 0, 0, 0, 0, 0
1113  }, {
1114  0, 0, 0, 0, 0, 0, 0
1115  }, {
1116  0, 0, 0, 0, 0, 0, 0
1117  }, {
1118  0, 0, 0, 0, 0, 0, 0
1119  }, {
1120  0, 0, 0, 0, 0, 0, 0
1121  }, {
1122  0, 0, 0, 0, 0, 0, 0
1123  }, {
1124  0, 0, 0, 0, 0, 0, 0
1125  }, {
1126  0, 0, 0, 0, 0, 0, 0
1127  }, {
1128  0, 0, 0, 0, 0, 0, 0
1129  }, {
1130  0, 0, 0, 0, 0, 0, 0
1131  }, {
1132  0, 0, 0, 0, 0, 0, 0
1133  }, {
1134  0, 0, 0, 0, 0, 0, 0
1135  }, {
1136  0, 0, 0, 0, 0, 0, 0
1137  }, {
1138  0, 0, 0, 0, 0, 0, 0
1139  }, {
1140  0, 0, 0, 0, 0, 0, 0
1141  }, {
1142  0, 0, 0, 0, 0, 0, 0
1143  }, {
1144  0, 0, 0, 0, 0, 0, 0
1145  }, {
1146  0, 0, 0, 0, 0, 0, 0
1147  }, {
1148  0, 0, 0, 0, 0, 0, 0
1149  }, {
1150  0, 0, 0, 0, 0, 0, 0
1151  }, {
1152  0, 0, 0, 0, 0, 0, 0
1153  }, {
1154  0, 0, 0, 0, 0, 0, 0
1155  }, {
1156  0, 0, 0, 0, 0, 0, 0
1157  }, {
1158  0, 0, 0, 0, 0, 0, 0
1159  }, {
1160  0, 0, 0, 0, 0, 0, 0
1161  }, {
1162  0, 0, 0, 0, 0, 0, 0
1163  }, {
1164  0, 0, 0, 0, 0, 0, 0
1165  }, {
1166  0, 0, 0, 0, 0, 0, 0
1167  }, {
1168  0, 0, 0, 0, 0, 0, 0
1169  }, {
1170  0, 0, 0, 0, 0, 0, 0
1171  }, {
1172  0, 0, 0, 0, 0, 0, 0
1173  }, {
1174  0, 0, 0, 0, 0, 0, 0
1175  }, {
1176  0, 0, 0, 0, 0, 0, 0
1177  }, {
1178  0, 0, 0, 0, 0, 0, 0
1179  }, {
1180  0, 0, 0, 0, 0, 0, 0
1181  }, {
1182  0, 0, 0, 0, 0, 0, 0
1183  }, {
1184  0, 0, 0, 0, 0, 0, 0
1185  }, {
1186  0, 0, 0, 0, 0, 0, 0
1187  }, {
1188  0, 0, 0, 0, 0, 0, 0
1189  }, {
1190  0, 0, 0, 0, 0, 0, 0
1191  }, {
1192  0, 0, 0, 0, 0, 0, 0
1193  }, {
1194  0, 0, 0, 0, 0, 0, 0
1195  }, {
1196  0, 0, 0, 0, 0, 0, 0
1197  }, {
1198  0, 0, 0, 0, 0, 0, 0
1199  }, {
1200  0, 0, 0, 0, 0, 0, 0
1201  }, {
1202  0, 0, 0, 0, 0, 0, 0
1203  }, {
1204  0, 0, 0, 0, 0, 0, 0
1205  }, {
1206  0, 0, 0, 0, 0, 0, 0
1207  }, {
1208  0, 0, 0, 0, 0, 0, 0
1209  }, {
1210  0, 0, 0, 0, 0, 0, 0
1211  }, {
1212  0, 0, 0, 0, 0, 0, 0
1213  }, {
1214  0, 0, 0, 0, 0, 0, 0
1215  }, {
1216  0, 0, 0, 0, 0, 0, 0
1217  }, {
1218  0, 0, 0, 0, 0, 0, 0
1219  }, {
1220  0, 0, 0, 0, 0, 0, 0
1221  }, {
1222  0, 0, 0, 0, 0, 0, 0
1223  }, {
1224  0, 0, 0, 0, 0, 0, 0
1225  }, {
1226  0, 0, 0, 0, 0, 0, 0
1227  }, {
1228  0, 0, 0, 0, 0, 0, 0
1229  }, {
1230  0, 0, 0, 0, 0, 0, 0
1231  }, {
1232  0, 0, 0, 0, 0, 0, 0
1233  }, {
1234  0, 0, 0, 0, 0, 0, 0
1235  }, {
1236  0, 0, 0, 0, 0, 0, 0
1237  }, {
1238  0, 0, 0, 0, 0, 0, 0
1239  }, {
1240  0, 0, 0, 0, 0, 0, 0
1241  }, {
1242  0, 0, 0, 0, 0, 0, 0
1243  }, {
1244  0, 0, 0, 0, 0, 0, 0
1245  }, {
1246  0, 0, 0, 0, 0, 0, 0
1247  }, {
1248  0, 0, 0, 0, 0, 0, 0
1249  }, {
1250  0, 0, 0, 0, 0, 0, 0
1251  }, {
1252  0, 0, 0, 0, 0, 0, 0
1253  }, {
1254  0, 0, 0, 0, 0, 0, 0
1255  }, {
1256  0, 0, 0, 0, 0, 0, 0
1257  }, {
1258  0, 0, 0, 0, 0, 0, 0
1259  }, {
1260  0, 0, 0, 0, 0, 0, 0
1261  }, {
1262  0, 0, 0, 0, 0, 0, 0
1263  }, {
1264  0, 0, 0, 0, 0, 0, 0
1265  }, {
1266  0, 0, 0, 0, 0, 0, 0
1267  }, {
1268  0, 0, 0, 0, 0, 0, 0
1269  }, {
1270  0, 0, 0, 0, 0, 0, 0
1271  }, {
1272  0, 0, 0, 0, 0, 0, 0
1273  }, {
1274  0, 0, 0, 0, 0, 0, 0
1275  }, {
1276  0, 0, 0, 0, 0, 0, 0
1277  }, {
1278  0, 0, 0, 0, 0, 0, 0
1279  }, {
1280  0, 0, 0, 0, 0, 0, 0
1281  }, {
1282  0, 0, 0, 0, 0, 0, 0
1283  }, {
1284  0, 0, 0, 0, 0, 0, 0
1285  }, {
1286  0, 0, 0, 0, 0, 0, 0
1287  }, {
1288  0, 0, 0, 0, 0, 0, 0
1289  }, {
1290  0, 0, 0, 0, 0, 0, 0
1291  }, {
1292  0, 0, 0, 0, 0, 0, 0
1293  }, {
1294  0, 0, 0, 0, 0, 0, 0
1295  }, {
1296  0, 0, 0, 0, 0, 0, 0
1297  }, {
1298  0, 0, 0, 0, 0, 0, 0
1299  }, {
1300  0, 0, 0, 0, 0, 0, 0
1301  }, {
1302  0, 0, 0, 0, 0, 0, 0
1303  }, {
1304  0, 0, 0, 0, 0, 0, 0
1305  }, {
1306  0, 0, 0, 0, 0, 0, 0
1307  }, {
1308  0, 0, 0, 0, 0, 0, 0
1309  }, {
1310  0, 0, 0, 0, 0, 0, 0
1311  }, {
1312  0, 0, 0, 0, 0, 0, 0
1313  }, {
1314  0, 0, 0, 0, 0, 0, 0
1315  }, {
1316  0, 0, 0, 0, 0, 0, 0
1317  }, {
1318  0, 0, 0, 0, 0, 0, 0
1319  }, {
1320  0, 0, 0, 0, 0, 0, 0
1321  }, {
1322  0, 0, 0, 0, 0, 0, 0
1323  }, {
1324  0, 0, 0, 0, 0, 0, 0
1325  }, {
1326  0, 0, 0, 0, 0, 0, 0
1327  }, {
1328  0, 0, 0, 0, 0, 0, 0
1329  }, {
1330  0, 0, 0, 0, 0, 0, 0
1331  }, {
1332  0, 0, 0, 0, 0, 0, 0
1333  }, {
1334  0, 0, 0, 0, 0, 0, 0
1335  }, {
1336  0, 0, 0, 0, 0, 0, 0
1337  }, {
1338  0, 0, 0, 0, 0, 0, 0
1339  }, {
1340  0, 0, 0, 0, 0, 0, 0
1341  }, {
1342  0, 0, 0, 0, 0, 0, 0
1343  }, {
1344  0, 0, 0, 0, 0, 0, 0
1345  }, {
1346  0, 0, 0, 0, 0, 0, 0
1347  }, {
1348  0, 0, 0, 0, 0, 0, 0
1349  }, {
1350  0, 0, 0, 0, 0, 0, 0
1351  }, {
1352  0, 0, 0, 0, 0, 0, 0
1353  }, {
1354  0, 0, 0, 0, 0, 0, 0
1355  }, {
1356  0, 0, 0, 0, 0, 0, 0
1357  }, {
1358  0, 0, 0, 0, 0, 0, 0
1359  }, {
1360  0, 0, 0, 0, 0, 0, 0
1361  }, {
1362  0, 0, 0, 0, 0, 0, 0
1363  }, {
1364  0, 0, 0, 0, 0, 0, 0
1365  }, {
1366  0, 0, 0, 0, 0, 0, 0
1367  }, {
1368  0, 0, 0, 0, 0, 0, 0
1369  }, {
1370  0, 0, 0, 0, 0, 0, 0
1371  }, {
1372  0, 0, 0, 0, 0, 0, 0
1373  }, {
1374  0, 0, 0, 0, 0, 0, 0
1375  }, {
1376  0, 0, 0, 0, 0, 0, 0
1377  }, {
1378  0, 0, 0, 0, 0, 0, 0
1379  }
1380 };
1381 
1382 static void RtemsPartReqCreate_Prepare( RtemsPartReqCreate_Context *ctx )
1383 {
1384  rtems_status_code sc;
1385  rtems_id id;
1386 
1387  ctx->id_value = 0xffffffff;
1388  ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES;
1389 
1390  id = 0xffffffff;
1391  sc = rtems_partition_ident( PART_NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
1392  T_rsc( sc, RTEMS_INVALID_NAME );
1393  T_eq_u32( id, 0xffffffff );
1394 }
1395 
1396 static void RtemsPartReqCreate_Action( RtemsPartReqCreate_Context *ctx )
1397 {
1398  ctx->status = rtems_partition_create(
1399  ctx->name,
1400  ctx->starting_address,
1401  ctx->length,
1402  ctx->buffer_size,
1403  ctx->attribute_set,
1404  ctx->id
1405  );
1406 }
1407 
1408 static void RtemsPartReqCreate_Cleanup( RtemsPartReqCreate_Context *ctx )
1409 {
1410  Chain_Node *node;
1411 
1412  while ( ( node = _Chain_Get_unprotected( &ctx->partitions ) ) ) {
1413  Objects_Control *obj;
1414  rtems_status_code sc;
1415 
1416  obj = (Objects_Control *) node;
1417  sc = rtems_partition_delete( obj->id );
1418  T_quiet_rsc_success( sc );
1419  }
1420 }
1421 
1425 T_TEST_CASE_FIXTURE( RtemsPartReqCreate, &RtemsPartReqCreate_Fixture )
1426 {
1428  size_t index;
1429 
1430  ctx = T_fixture_context();
1431  ctx->in_action_loop = true;
1432  index = 0;
1433 
1434  for (
1435  ctx->pcs[ 0 ] = RtemsPartReqCreate_Pre_Id_Id;
1436  ctx->pcs[ 0 ] < RtemsPartReqCreate_Pre_Id_NA;
1437  ++ctx->pcs[ 0 ]
1438  ) {
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;
1447  }
1448 
1449  for (
1450  ctx->pcs[ 1 ] = RtemsPartReqCreate_Pre_Name_Valid;
1451  ctx->pcs[ 1 ] < RtemsPartReqCreate_Pre_Name_NA;
1452  ++ctx->pcs[ 1 ]
1453  ) {
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;
1461  }
1462 
1463  for (
1464  ctx->pcs[ 2 ] = RtemsPartReqCreate_Pre_Start_Valid;
1465  ctx->pcs[ 2 ] < RtemsPartReqCreate_Pre_Start_NA;
1466  ++ctx->pcs[ 2 ]
1467  ) {
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;
1474  }
1475 
1476  for (
1477  ctx->pcs[ 3 ] = RtemsPartReqCreate_Pre_Length_Valid;
1478  ctx->pcs[ 3 ] < RtemsPartReqCreate_Pre_Length_NA;
1479  ++ctx->pcs[ 3 ]
1480  ) {
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;
1486  }
1487 
1488  for (
1489  ctx->pcs[ 4 ] = RtemsPartReqCreate_Pre_Size_Valid;
1490  ctx->pcs[ 4 ] < RtemsPartReqCreate_Pre_Size_NA;
1491  ++ctx->pcs[ 4 ]
1492  ) {
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;
1497  }
1498 
1499  for (
1500  ctx->pcs[ 5 ] = RtemsPartReqCreate_Pre_Parts_Avail;
1501  ctx->pcs[ 5 ] < RtemsPartReqCreate_Pre_Parts_NA;
1502  ++ctx->pcs[ 5 ]
1503  ) {
1504  if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Parts_NA ) {
1505  ctx->pcs[ 5 ] = RtemsPartReqCreate_Pre_Parts_NA;
1506  index += ( RtemsPartReqCreate_Pre_Parts_NA - 1 );
1507  }
1508 
1509  if ( RtemsPartReqCreate_TransitionInfo[ index ].Skip ) {
1510  ++index;
1511  continue;
1512  }
1513 
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(
1523  ctx,
1524  RtemsPartReqCreate_TransitionMap[ index ][ 0 ]
1525  );
1526  RtemsPartReqCreate_Cleanup( ctx );
1527  ++index;
1528  }
1529  }
1530  }
1531  }
1532  }
1533  }
1534 }
1535 
This status code indicates you have attempted to create too many instances of a particular object cla...
Definition: status.h:112
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.
Definition: partgetbuffer.c:23
uint32_t rtems_name
This type is used to represent a Classic API object name.
Definition: types.h:227
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.
Definition: status.h:154
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.
Definition: attr.h:140
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.
Definition: partcreate.c:30
#define rtems_build_name(_C1, _C2, _C3, _C4)
%
Definition: object.h:179
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.
Definition: status.h:138
rtems_status_code rtems_partition_delete(rtems_id id)
Deletes the specified partition.
Definition: partdelete.c:24
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.
Definition: status.h:86
static __inline__ void _Chain_Append_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Appends a node (unprotected).
Definition: chainimpl.h:680
Inlined Routines in the Object Handler.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
#define RTEMS_ALIGNED(_alignment)
Instructs the compiler in a declaration or definition to enforce the specified alignment.
Definition: basedefs.h:389
Chain_Node Node
Definition: objectdata.h:41
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
Chain Handler API.
This status code indicates that a specified address was invalid.
Definition: status.h:133
Definition: test.h:61
This header file defines the RTEMS Classic API.
uint32_t rtems_attribute
This type is used to represent Classic API attributes.
Definition: attr.h:91
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition: types.h:99
static __inline__ void _Chain_Initialize_empty(Chain_Control *the_chain)
Initializes this chain as empty.
Definition: chainimpl.h:505
rtems_status_code rtems_partition_ident(rtems_name name, uint32_t node, rtems_id *id)
Identifies a partition object by the specified object name.
Definition: partident.c:44
This status code indicates that an object name was invalid.
Definition: status.h:101
#define RTEMS_SEARCH_LOCAL_NODE
%
Definition: object.h:400
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.
Definition: status.h:128
static __inline__ Chain_Node * _Chain_Get_unprotected(Chain_Control *the_chain)
Gets the first node (unprotected).
Definition: chainimpl.h:630
#define RTEMS_PARTITION_ALIGNMENT
This constant defines the minimum alignment of a partition buffer in bytes.
Definition: part.h:89
Objects_Id id
Definition: objectdata.h:43