pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31624 )
Change subject: pgw: improve launch program logging ......................................................................
pgw: improve launch program logging
Change-Id: I1feb6ddb1ed742585482dbfe3e38a0bece160e22 --- M pgw/PGW_Tests.ttcn 1 file changed, 17 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/24/31624/1
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index adae0a4..7bb6910 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -114,6 +114,9 @@
/* Store last received Gy message */ var PDU_DIAMETER g_rx_gy; + + /* number of programs started, used as identifier. */ + var integer g_start_prog_count := 0; }
/* configuration data for a given Session */ @@ -706,10 +709,12 @@ run_as_user := mp_run_prog_as_user, tun_netns_name := g_pars.tun_netns_name }; + g_start_prog_count := g_start_prog_count + 1;
/* Redirect stdout/stderr to the user-specified location */ if (redirect_output) { - var charstring prefix := mp_run_prog_log_path & "/" & testcasename(); + var charstring id := testcasename() & "-" & hex2str(g_pars.imsi) & "-" & int2str(g_start_prog_count); + var charstring prefix := mp_run_prog_log_path & "/" & id; sprog.command := sprog.command & " 1>>" & prefix & ".prog.stdout"; sprog.command := sprog.command & " 2>>" & prefix & ".prog.stderr"; } @@ -720,6 +725,7 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Unable to start program '", command, "'")); } + log("Started program '", command, "' with PID ", res.pid); return res.pid; }
@@ -741,7 +747,7 @@ } [] T.timeout { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - "timeout waiting for user-plane program termination"); + log2str("timeout (", tout, " seconds) waiting for user-plane program PID ", pid, " termination")); } } }