| 1042 | } |
| 1043 | |
| 1044 | static int |
| 1045 | test_malloc(void) |
| 1046 | { |
| 1047 | unsigned lcore_id; |
| 1048 | int ret = 0; |
| 1049 | |
| 1050 | if (test_str_to_size() < 0){ |
| 1051 | printf("test_str_to_size() failed\n"); |
| 1052 | return -1; |
| 1053 | } |
| 1054 | else printf("test_str_to_size() passed\n"); |
| 1055 | |
| 1056 | if (test_zero_aligned_alloc() < 0){ |
| 1057 | printf("test_zero_aligned_alloc() failed\n"); |
| 1058 | return -1; |
| 1059 | } |
| 1060 | else printf("test_zero_aligned_alloc() passed\n"); |
| 1061 | |
| 1062 | if (test_malloc_bad_params() < 0){ |
| 1063 | printf("test_malloc_bad_params() failed\n"); |
| 1064 | return -1; |
| 1065 | } |
| 1066 | else printf("test_malloc_bad_params() passed\n"); |
| 1067 | |
| 1068 | if (test_realloc() < 0){ |
| 1069 | printf("test_realloc() failed\n"); |
| 1070 | return -1; |
| 1071 | } |
| 1072 | else printf("test_realloc() passed\n"); |
| 1073 | |
| 1074 | /*----------------------------*/ |
| 1075 | RTE_LCORE_FOREACH_WORKER(lcore_id) { |
| 1076 | rte_eal_remote_launch(test_align_overlap_per_lcore, NULL, lcore_id); |
| 1077 | } |
| 1078 | |
| 1079 | RTE_LCORE_FOREACH_WORKER(lcore_id) { |
| 1080 | if (rte_eal_wait_lcore(lcore_id) < 0) |
| 1081 | ret = -1; |
| 1082 | } |
| 1083 | if (ret < 0){ |
| 1084 | printf("test_align_overlap_per_lcore() failed\n"); |
| 1085 | return ret; |
| 1086 | } |
| 1087 | else printf("test_align_overlap_per_lcore() passed\n"); |
| 1088 | |
| 1089 | /*----------------------------*/ |
| 1090 | RTE_LCORE_FOREACH_WORKER(lcore_id) { |
| 1091 | rte_eal_remote_launch(test_reordered_free_per_lcore, NULL, lcore_id); |
| 1092 | } |
| 1093 | |
| 1094 | RTE_LCORE_FOREACH_WORKER(lcore_id) { |
| 1095 | if (rte_eal_wait_lcore(lcore_id) < 0) |
| 1096 | ret = -1; |
| 1097 | } |
| 1098 | if (ret < 0){ |
| 1099 | printf("test_reordered_free_per_lcore() failed\n"); |
| 1100 | return ret; |
| 1101 | } |
nothing calls this directly
no test coverage detected