This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15540 Change subject: bts: test for "logging filter sapi" ...................................................................... bts: test for "logging filter sapi" Related: OS#2356 Change-Id: I8c7f113eae7a93c6d4943cac9e3f49f153b323b1 --- M bts/BTS_Tests.ttcn 1 file changed, 48 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/15540/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 2c11ca2..72dde30 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -295,6 +295,7 @@ friend function f_init_vty(charstring id) runs on test_CT { map(self:BTSVTY, system:BTSVTY); f_vty_set_prompts(BTSVTY); + f_vty_transceive(BTSVTY, "logging disable"); f_vty_transceive(BTSVTY, "enable"); } @@ -6153,6 +6154,51 @@ IPA_Testing.f_run_TC_chopped_ipa_payload(mp_rsl_ip, mp_rsl_port, LISTEN_FOR_CLIENT); } + +private function f_vty_log_fltr_sapi_pcu_data_req(TELNETasp_PT pt, PCUIF_Sapi sapi, charstring sapi_str, + boolean visible := true) runs on test_CT { + var charstring buffer; + template charstring exp := pattern "*sapi=" & sapi_str & "*"; + + f_vty_transceive(pt, ""); /* clear buffer */ + f_pcu_data_req(0, 0, 7, 0, 0, sapi, c_PCU_DATA); + f_sleep(0.1); + + buffer := f_vty_transceive_ret(pt, ""); + if (visible and not match(buffer, exp)) { + setverdict(fail, "Could not find ", exp, " in buffer: ", buffer); + mtc.stop; + } else if (not visible and match(buffer, exp)) { + setverdict(fail, "Found ", exp, " in buffer, although it should not have matched: ", buffer); + mtc.stop; + } +} + +private function f_vty_log_fltr_sapi_test_log(TELNETasp_PT pt, charstring cmd, boolean agch_exp, boolean pch_exp) + runs on test_CT { + log("Testing log output after VTY command: ", cmd); + f_vty_transceive(pt, cmd); + f_vty_log_fltr_sapi_pcu_data_req(pt, PCU_IF_SAPI_AGCH, "AGCH", agch_exp); + f_vty_log_fltr_sapi_pcu_data_req(pt, PCU_IF_SAPI_PCH, "PCH", pch_exp); +} + +testcase TC_vty_log_fltr_sapi() runs on test_CT { + f_init(); + f_vty_transceive(BTSVTY, "logging enable"); + f_vty_transceive(BTSVTY, "logging color 0"); + + /* self test */ + f_vty_log_fltr_sapi_test_log(BTSVTY, "logging level set-all fatal", false, false); + f_vty_log_fltr_sapi_test_log(BTSVTY, "logging level pcu debug", true, true); + + f_vty_log_fltr_sapi_test_log(BTSVTY, "logging filter sapi agch", true, false); + f_vty_log_fltr_sapi_test_log(BTSVTY, "logging filter sapi pch", true, true); + f_vty_log_fltr_sapi_test_log(BTSVTY, "no logging filter sapi agch", false, true); + + f_vty_transceive(BTSVTY, "logging disable"); + setverdict(pass); +} + /* test generation of RLL ERR IND based on Um errors (TS 48.058 3.9) */ /* protocol error as per 44.006 */ /* link layer failure (repetition of I-frame N200 times without ACK */ @@ -6320,6 +6366,8 @@ execute( TC_chopped_ipa_ping() ); execute( TC_chopped_ipa_payload() ); + + execute( TC_vty_log_fltr_sapi() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15540 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8c7f113eae7a93c6d4943cac9e3f49f153b323b1 Gerrit-Change-Number: 15540 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190916/15f1dca3/attachment.htm>