[GITLAB] - UPGRADE TO v12 on Wednesday the 18th of December at 11.30AM

Commit 902f70ae authored by gauthier's avatar gauthier

Remove some traces in

parent 5319fcba
......@@ -835,13 +835,13 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s
while (shift) {
packet = scenario->list_packet;
while (packet) {
fprintf(stdout, "*shift: %p\n", shift);
fprintf(stdout, "\tframe_number: %d\n", shift->frame_number);
fprintf(stdout, "\tshift_seconds: %ld\n", shift->shift_seconds);
fprintf(stdout, "\tshift_microseconds: %ld\n", shift->shift_microseconds);
fprintf(stdout, "\tsingle: %d\n\n", shift->single);
fprintf(stdout, "\tshift_all_packets_seconds: %ld\n", shift_all_packets.tv_sec);
fprintf(stdout, "\tshift_all_packets_microseconds: %ld\n", shift_all_packets.tv_usec);
//fprintf(stdout, "*shift: %p\n", shift);
//fprintf(stdout, "\tframe_number: %d\n", shift->frame_number);
//fprintf(stdout, "\tshift_seconds: %ld\n", shift->shift_seconds);
//fprintf(stdout, "\tshift_microseconds: %ld\n", shift->shift_microseconds);
//fprintf(stdout, "\tsingle: %d\n\n", shift->single);
//fprintf(stdout, "\tshift_all_packets_seconds: %ld\n", shift_all_packets.tv_sec);
//fprintf(stdout, "\tshift_all_packets_microseconds: %ld\n", shift_all_packets.tv_usec);
AssertFatal((packet->time_relative_to_first_packet.tv_sec >= 0) && (packet->time_relative_to_first_packet.tv_usec >= 0),
"Bad timing result time_relative_to_first_packet=%d.%d packet num %u, original frame number %u",
......@@ -977,7 +977,7 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s
}
packet = packet->next;
}
et_display_scenario(scenario);
//et_display_scenario(scenario);
// create SCTP ITTI task: same as eNB code
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
......@@ -1016,6 +1016,7 @@ static void et_usage (
fprintf (stdout, "\n");
fprintf (stdout, "\t-d | --test-dir <dir> Directory where a set of files related to a particular test are located\n");
fprintf (stdout, "\t-c | --enb-conf-file <file> Provide an eNB config file, valid for the testbed\n");
fprintf (stdout, "\t-D | --delay-on-exit <delay-in-sec> Wait delay-in-sec before exiting\n");
fprintf (stdout, "\t-f | --shift-packet <frame:[+|-]seconds[.usec]> Shift the timing of a packet'\n");
fprintf (stdout, "\t-F | --shift-packets <frame:[+|-]seconds[.usec]> Shift the timing of packets starting at frame 'frame' included\n");
fprintf (stdout, "\t-m | --max-speed Play scenario as fast as possible without respecting frame timings\n");
......@@ -1035,7 +1036,8 @@ et_config_parse_opt_line (
char **et_dir_name,
char **scenario_file_name,
char **enb_config_file_name,
shift_packet_t **shifts)
shift_packet_t **shifts,
int *delay_on_exit)
//------------------------------------------------------------------------------
{
int option = 0;
......@@ -1048,6 +1050,7 @@ et_config_parse_opt_line (
LONG_OPTION_SCENARIO_FILE,
LONG_OPTION_MAX_SPEED,
LONG_OPTION_TEST_DIR,
LONG_OPTION_DELAY_EXIT,
LONG_OPTION_SHIFT_PACKET,
LONG_OPTION_SHIFT_PACKETS,
LONG_OPTION_HELP,
......@@ -1059,6 +1062,7 @@ et_config_parse_opt_line (
{"scenario ", required_argument, 0, LONG_OPTION_SCENARIO_FILE},
{"max-speed ", no_argument, 0, LONG_OPTION_MAX_SPEED},
{"test-dir", required_argument, 0, LONG_OPTION_TEST_DIR},
{"delay-on-exit", required_argument, 0, LONG_OPTION_DELAY_EXIT},
{"shift-packet", required_argument, 0, LONG_OPTION_SHIFT_PACKET},
{"shift-packets", required_argument, 0, LONG_OPTION_SHIFT_PACKETS},
{"help", no_argument, 0, LONG_OPTION_HELP},
......@@ -1101,6 +1105,19 @@ et_config_parse_opt_line (
}
break;
case LONG_OPTION_DELAY_EXIT:
case 'D':
if (optarg) {
delay_on_exit = atoi(optarg);
if (0 > delay_on_exit) {
fprintf(stderr, "Please provide a valid -D/--delay-on-exit argument, %s is not a valid value\n", delay_on_exit);
exit(1);
}
printf("Delay on exit is %d\n", delay_on_exit);
}
break;
case LONG_OPTION_SHIFT_PACKET:
case 'f':
if (optarg) {
......@@ -1187,6 +1204,7 @@ int main( int argc, char **argv )
char *enb_config_file_name = NULL;
struct shift_packet_s *shifts = NULL;
int ret = 0;
int delay_on_exit = 0;
et_scenario_t *scenario = NULL;
char play_scenario_filename[NAME_MAX];
......@@ -1205,7 +1223,7 @@ int main( int argc, char **argv )
asn1_xer_print = 1;
//parameters
actions = et_config_parse_opt_line (argc, argv, &et_dir_name, &scenario_file_name, &enb_config_file_name, &shifts); //Command-line options
actions = et_config_parse_opt_line (argc, argv, &et_dir_name, &scenario_file_name, &enb_config_file_name, &shifts, &delay_on_exit); //Command-line options
if (actions & PLAY_SCENARIO) {
if (et_generate_xml_scenario(et_dir_name, scenario_file_name,enb_config_file_name, play_scenario_filename) == 0) {
if (NULL != (scenario = et_generate_scenario(play_scenario_filename))) {
......@@ -1223,5 +1241,10 @@ int main( int argc, char **argv )
et_free_pointer(enb_config_file_name);
}
itti_wait_tasks_end();
if (0 < delay_on_exit) {
sleep(delay_on_exit);
}
return ret;
}
......@@ -262,7 +262,8 @@ et_fsm_state_t et_scenario_fsm_notify_event_state_running(et_event_t event)
fprintf(stderr, "End of scenario: %s\n", g_scenario->name);
fflush(stderr);
fflush(stdout);
exit(0);
return 0;
//exit(0);
}
fprintf(stderr, "Remaining timers running: %d\n", g_scenario->timer_count);
return g_fsm_state;
......@@ -342,7 +343,7 @@ et_fsm_state_t et_scenario_fsm_notify_event_state_waiting_rx(et_event_t event)
case ET_EVENT_RX_PACKET_TIME_OUT:
fprintf(stderr, "Error The following packet is not received:\n");
et_display_packet(event.u.rx_packet_time_out);
//et_display_packet(event.u.rx_packet_time_out);
AssertFatal(0, "Waited packet not received");
break;
......
......@@ -491,8 +491,7 @@ et_scenario_t* et_generate_scenario(
*next_packet = packet;
next_packet = &packet->next;
} else {
fprintf(stdout, "WARNING omitted packet:\n");
et_display_node(node, 0);
fprintf(stdout, "WARNING omitted packet\n");
}
}
last_packet = packet;
......
......@@ -467,7 +467,7 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con
int size = 0;
int pos = 0;
int go_deeper_in_tree = 1;
S1AP_INFO("%s() mme_ue_s1ap_id %u\n", __FUNCTION__, new_id);
//S1AP_INFO("%s() mme_ue_s1ap_id %u\n", __FUNCTION__, new_id);
// modify
for (cur_node = (xmlNode *)node; cur_node; cur_node = cur_node->next) {
......@@ -527,7 +527,7 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con
} while (pos2 < (2*5));
// update ASN1
et_decode_s1ap(s1ap);
S1AP_INFO("Updated ASN1 for %s\n", showname);
//S1AP_INFO("Updated ASN1 for %s\n", showname);
}
}
}
......@@ -553,7 +553,7 @@ void update_xpath_nodes_mme_ue_s1ap_id(et_s1ap_t * const s1ap_payload, xmlNodeSe
xmlNode *s1ap_node = NULL;
size = (nodes) ? nodes->nodeNr : 0;
S1AP_DEBUG("%s() num nodes %u\n", __FUNCTION__, size);
//S1AP_DEBUG("%s() num nodes %u\n", __FUNCTION__, size);
/*
* NOTE: the nodes are processed in reverse order, i.e. reverse document
......@@ -599,7 +599,7 @@ int et_s1ap_update_mme_ue_s1ap_id(et_packet_t * const packet, const S1ap_MME_UE_
xmlXPathContextPtr xpath_ctx = NULL;
xmlXPathObjectPtr xpath_obj = NULL;
S1AP_DEBUG("%s() packet num %u original frame number %u, mme_ue_s1ap_id %u -> %u\n", __FUNCTION__, packet->packet_number, packet->original_frame_number, old_id, new_id);
//S1AP_DEBUG("%s() packet num %u original frame number %u, mme_ue_s1ap_id %u -> %u\n", __FUNCTION__, packet->packet_number, packet->original_frame_number, old_id, new_id);
ret = snprintf(xpath_expression, ET_XPATH_EXPRESSION_MAX_LENGTH, "//field[@name=\"s1ap.MME_UE_S1AP_ID\"][@show=\"%u\"]", old_id);
AssertFatal((ret > 0) && (ret < ET_XPATH_EXPRESSION_MAX_LENGTH), "Could not build XPATH expression err=%d", ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment