#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stdint.h>#include <hipc/client.h>
Go to the source code of this file.
Data Structures | |
| struct | log | 
Macros | |
| #define | IMG_SIZE 256U | 
Functions | |
| static void | loggerInit () | 
| static void | loggerAdd (void *const scur_p, void *const ccur_p, const size_t n) | 
| static int | loggerCmp (const struct log l[], const unsigned int nl) | 
| static void | test_logger (void) | 
| static int | routine_hipcClientEachMbr (const size_t offset, const size_t size, const struct log l[], const unsigned int nl) | 
| static void | test_hipcClientEachMbr (void) | 
| static void | test_hipcClientEachMbr_err (void) | 
| static void | test_hipcClientPack (void) | 
| static void | test_hipcClientPack_NULLarg (void) | 
| static void | test_hipcClientUnpack (void) | 
| static void | test_hipcClientUnpack_NULLarg (void) | 
| static void | test_hipcClientCheckMbrSize (void) | 
| int | main (int argc, char *argv[]) | 
Variables | |
| const struct HIPC_cl_indp_mbr | Mock_indp_member_s0 [] | 
| const struct HIPC_cl_indp_mbr | Mock_indp_member_s1 [] | 
| const size_t | Mock_indp_member_idxs_ary [] = { 3, 2 } | 
| const size_t | Mock_indp_member_idxs_as [] = { 2 } | 
| const struct HIPC_cl_indp_mbr | Mock_indp_member_base [] | 
| const struct HIPC_cl_indp_stru | Mock_indp_struct [] | 
| const struct HIPC_cl_indp | Mock_indp | 
| unsigned char | Mock_smdp_s0_offset [] = { 0,1,2,3 } | 
| unsigned char | Mock_smdp_s0_size [] = { 1,1,1,1 } | 
| unsigned char | Mock_cmdp_s0_offset [] = { 0,1,2,3 } | 
| unsigned char | Mock_cmdp_s0_size [] = { 1,1,1,1 } | 
| unsigned char | Mock_smdp_s1_offset [] = { 0,2 } | 
| unsigned char | Mock_smdp_s1_size [] = { 2,1 } | 
| unsigned char | Mock_cmdp_s1_offset [] = { 0,4 } | 
| unsigned char | Mock_cmdp_s1_size [] = { 4,1 } | 
| unsigned char | Mock_smdp_base_offset [] = { 0,1,2, 6, 12,26 } | 
| unsigned char | Mock_smdp_base_size [] = { 1,1,4,1*6,6*2, 4 } | 
| unsigned char | Mock_cmdp_base_offset [] = { 0,4,8, 12, 24,44 } | 
| unsigned char | Mock_cmdp_base_size [] = { 1,4,4,1*6,8*2, 4 } | 
| unsigned char | Mock_lstructsizes [] = { 4,8,48 } | 
| unsigned char | Mock_rstructsizes [] = { 4,6,30 } | 
| struct HIPC_cl_dp_stru | Mock_cmdp_struct [] | 
| struct HIPC_cl_dp_stru | Mock_smdp_struct [] | 
| struct HIPC_cl_dp | Mock_cmdp | 
| struct HIPC_cl_dp | Mock_smdp | 
| struct HIPC_client | mock = { 0, &Mock_indp, &Mock_cmdp, &Mock_smdp } | 
| struct { | |
| unsigned int nl | |
| struct log l [256] | |
| } | lgr | 
| const size_t | Invmock_indp_member_idxs_ary [] = { 3 } | 
| const struct HIPC_cl_indp_mbr | Invmock_indp_member_base [] | 
| const struct HIPC_cl_indp_stru | Invmock_indp_struct [] | 
| const struct HIPC_cl_indp | Invmock_indp | 
| unsigned char | Invmock_cmdp_base_offset [] = { 0, 1, 4, 8 } | 
| unsigned char | Invmock_cmdp_base_size [] = { 1,1*3, 2, 3 } | 
| unsigned char | Invmock_smdp_base_offset [] = { 0, 1, 4, 8 } | 
| unsigned char | Invmock_smdp_base_size [] = { 1, 2,1*3, 3 } | 
| unsigned char | Invmock_lstructsizes [] = { 12 } | 
| unsigned char | Invmock_rstructsizes [] = { 12 } | 
| struct HIPC_cl_dp_stru | Invmock_cmdp_struct [] | 
| struct HIPC_cl_dp_stru | Invmock_smdp_struct [] | 
| struct HIPC_cl_dp | Invmock_cmdp | 
| struct HIPC_cl_dp | Invmock_smdp | 
| struct HIPC_client | invmock | 
| #define IMG_SIZE 256U | 
Definition at line 10 of file test_client_pack.c.
Referenced by test_hipcClientPack(), test_hipcClientPack_NULLarg(), test_hipcClientUnpack(), and test_hipcClientUnpack_NULLarg().
      
  | 
  static | 
Definition at line 90 of file test_client_pack.c.
References lgr.
Referenced by routine_hipcClientEachMbr(), and test_logger().

      
  | 
  static | 
Definition at line 96 of file test_client_pack.c.
Referenced by routine_hipcClientEachMbr(), test_hipcClientEachMbr_err(), and test_logger().

      
  | 
  static | 
Definition at line 112 of file test_client_pack.c.
References log::ccur_p, lgr, log::n, nl, and log::scur_p.
Referenced by routine_hipcClientEachMbr(), and test_logger().

      
  | 
  static | 
Definition at line 148 of file test_client_pack.c.
References loggerAdd(), loggerCmp(), and loggerInit().
Referenced by main().


      
  | 
  static | 
Definition at line 189 of file test_client_pack.c.
References HIPC_MBR_STRUCT, HIPC_SUCCESS, hipcClientEachMbr(), hipcClientInit(), hipcClientTerminate(), loggerAdd(), loggerCmp(), loggerInit(), HIPC_cl_indp_mbr::struno, and HIPC_cl_indp_mbr::type.
Referenced by test_hipcClientEachMbr().


      
  | 
  static | 
Definition at line 214 of file test_client_pack.c.
References routine_hipcClientEachMbr().
Referenced by main().


      
  | 
  static | 
Definition at line 324 of file test_client_pack.c.
References HIPC_ERR_INTERNAL_ERROR, HIPC_MBR_STRUCT, HIPC_SUCCESS, hipcClientEachMbr(), hipcClientInit(), hipcClientTerminate(), loggerAdd(), HIPC_cl_indp_mbr::struno, and HIPC_cl_indp_mbr::type.
Referenced by main().


      
  | 
  static | 
Definition at line 380 of file test_client_pack.c.
References HIPC_client::endian_convert, HIPC_SUCCESS, hipcClientPack(), IMG_SIZE, and mock.
Referenced by main().


      
  | 
  static | 
Definition at line 481 of file test_client_pack.c.
References HIPC_client::cimg_pp, HIPC_client::endian_convert, HIPC_ERR_PROTOCOL_VIOLATION, HIPC_SUCCESS, hipcClientPack(), hipcClientSetCimg(), IMG_SIZE, mock, and HIPC_client::simg_pp.
Referenced by main().


      
  | 
  static | 
Definition at line 566 of file test_client_pack.c.
References HIPC_client::endian_convert, HIPC_ERR_PROTOCOL_VIOLATION, HIPC_SUCCESS, hipcClientUnpack(), IMG_SIZE, and mock.
Referenced by main().


      
  | 
  static | 
Definition at line 670 of file test_client_pack.c.
References HIPC_client::cimg_pp, HIPC_client::endian_convert, HIPC_SUCCESS, hipcClientSetCimg(), hipcClientUnpack(), IMG_SIZE, mock, and HIPC_client::simg_pp.
Referenced by main().


      
  | 
  static | 
Definition at line 748 of file test_client_pack.c.
References HIPC_client::cmdp_p, HIPC_ERR_MBR_SIZE_MISMATCH, HIPC_SUCCESS, hipcClientCheckMbrSize(), hipcClientGetErrDtlStr(), mock, HIPC_cl_dp_stru::size_p, HIPC_client::smdp_p, and HIPC_cl_dp::struct_p.
Referenced by main().


| int main | ( | int | argc, | 
| char * | argv[] | ||
| ) | 
Definition at line 777 of file test_client_pack.c.
References test_hipcClientCheckMbrSize(), test_hipcClientEachMbr(), test_hipcClientEachMbr_err(), test_hipcClientPack(), test_hipcClientPack_NULLarg(), test_hipcClientUnpack(), test_hipcClientUnpack_NULLarg(), and test_logger().

| const struct HIPC_cl_indp_mbr Mock_indp_member_s0[] | 
Definition at line 13 of file test_client_pack.c.
| const struct HIPC_cl_indp_mbr Mock_indp_member_s1[] | 
Definition at line 19 of file test_client_pack.c.
| const size_t Mock_indp_member_idxs_ary[] = { 3, 2 } | 
Definition at line 23 of file test_client_pack.c.
| const size_t Mock_indp_member_idxs_as[] = { 2 } | 
Definition at line 24 of file test_client_pack.c.
| const struct HIPC_cl_indp_mbr Mock_indp_member_base[] | 
Definition at line 27 of file test_client_pack.c.
| const struct HIPC_cl_indp_stru Mock_indp_struct[] | 
Definition at line 36 of file test_client_pack.c.
| const struct HIPC_cl_indp Mock_indp | 
Definition at line 42 of file test_client_pack.c.
| unsigned char Mock_smdp_s0_offset[] = { 0,1,2,3 } | 
Definition at line 46 of file test_client_pack.c.
| unsigned char Mock_smdp_s0_size[] = { 1,1,1,1 } | 
Definition at line 47 of file test_client_pack.c.
| unsigned char Mock_cmdp_s0_offset[] = { 0,1,2,3 } | 
Definition at line 48 of file test_client_pack.c.
| unsigned char Mock_cmdp_s0_size[] = { 1,1,1,1 } | 
Definition at line 49 of file test_client_pack.c.
| unsigned char Mock_smdp_s1_offset[] = { 0,2 } | 
Definition at line 50 of file test_client_pack.c.
| unsigned char Mock_smdp_s1_size[] = { 2,1 } | 
Definition at line 51 of file test_client_pack.c.
| unsigned char Mock_cmdp_s1_offset[] = { 0,4 } | 
Definition at line 52 of file test_client_pack.c.
| unsigned char Mock_cmdp_s1_size[] = { 4,1 } | 
Definition at line 53 of file test_client_pack.c.
| unsigned char Mock_smdp_base_offset[] = { 0,1,2, 6, 12,26 } | 
Definition at line 54 of file test_client_pack.c.
| unsigned char Mock_smdp_base_size[] = { 1,1,4,1*6,6*2, 4 } | 
Definition at line 55 of file test_client_pack.c.
| unsigned char Mock_cmdp_base_offset[] = { 0,4,8, 12, 24,44 } | 
Definition at line 56 of file test_client_pack.c.
| unsigned char Mock_cmdp_base_size[] = { 1,4,4,1*6,8*2, 4 } | 
Definition at line 57 of file test_client_pack.c.
| unsigned char Mock_lstructsizes[] = { 4,8,48 } | 
Definition at line 59 of file test_client_pack.c.
| unsigned char Mock_rstructsizes[] = { 4,6,30 } | 
Definition at line 60 of file test_client_pack.c.
| struct HIPC_cl_dp_stru Mock_cmdp_struct[] | 
Definition at line 62 of file test_client_pack.c.
| struct HIPC_cl_dp_stru Mock_smdp_struct[] | 
Definition at line 67 of file test_client_pack.c.
| struct HIPC_cl_dp Mock_cmdp | 
Definition at line 72 of file test_client_pack.c.
| struct HIPC_cl_dp Mock_smdp | 
Definition at line 74 of file test_client_pack.c.
| struct HIPC_client mock = { 0, &Mock_indp, &Mock_cmdp, &Mock_smdp } | 
Definition at line 76 of file test_client_pack.c.
Referenced by test_hipcClientCheckMbrSize(), test_hipcClientPack(), test_hipcClientPack_NULLarg(), test_hipcClientUnpack(), and test_hipcClientUnpack_NULLarg().
| unsigned int nl | 
Definition at line 86 of file test_client_pack.c.
Referenced by loggerCmp().
| struct log l[256] | 
Definition at line 87 of file test_client_pack.c.
| struct { ... } lgr | 
Referenced by loggerAdd(), loggerCmp(), and loggerInit().
| const size_t Invmock_indp_member_idxs_ary[] = { 3 } | 
Definition at line 285 of file test_client_pack.c.
| const struct HIPC_cl_indp_mbr Invmock_indp_member_base[] | 
Definition at line 288 of file test_client_pack.c.
| const struct HIPC_cl_indp_stru Invmock_indp_struct[] | 
Definition at line 295 of file test_client_pack.c.
| const struct HIPC_cl_indp Invmock_indp | 
Definition at line 299 of file test_client_pack.c.
| unsigned char Invmock_cmdp_base_offset[] = { 0, 1, 4, 8 } | 
Definition at line 303 of file test_client_pack.c.
| unsigned char Invmock_cmdp_base_size[] = { 1,1*3, 2, 3 } | 
Definition at line 304 of file test_client_pack.c.
| unsigned char Invmock_smdp_base_offset[] = { 0, 1, 4, 8 } | 
Definition at line 305 of file test_client_pack.c.
| unsigned char Invmock_smdp_base_size[] = { 1, 2,1*3, 3 } | 
Definition at line 306 of file test_client_pack.c.
| unsigned char Invmock_lstructsizes[] = { 12 } | 
Definition at line 307 of file test_client_pack.c.
| unsigned char Invmock_rstructsizes[] = { 12 } | 
Definition at line 308 of file test_client_pack.c.
| struct HIPC_cl_dp_stru Invmock_cmdp_struct[] | 
Definition at line 310 of file test_client_pack.c.
| struct HIPC_cl_dp_stru Invmock_smdp_struct[] | 
Definition at line 313 of file test_client_pack.c.
| struct HIPC_cl_dp Invmock_cmdp | 
Definition at line 316 of file test_client_pack.c.
| struct HIPC_cl_dp Invmock_smdp | 
Definition at line 318 of file test_client_pack.c.
| struct HIPC_client invmock | 
Definition at line 320 of file test_client_pack.c.
 1.8.6