lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2024

  • 1 participants
  • 1559 discussions
[M] Change in osmo-ttcn3-hacks[master]: MSC_Tests: indicate the failure reason in setverdict()
by laforge 09 Jan '24

09 Jan '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35517?usp=email ) Change subject: MSC_Tests: indicate the failure reason in setverdict() ...................................................................... MSC_Tests: indicate the failure reason in setverdict() ... so that there is no need to check logs to see why a test failed. Change-Id: I159bc54f6f4561d42aeabe825e16fa77e60c2dae --- M msc/MSC_Tests.ttcn 1 file changed, 26 insertions(+), 30 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 6f23e5f..1f8d8d4 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2789,8 +2789,7 @@ setverdict(pass); } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } @@ -2845,8 +2844,7 @@ setverdict(pass); } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } @@ -2933,8 +2931,7 @@ setverdict(pass); } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } @@ -2996,8 +2993,7 @@ mtc.stop; } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } @@ -3057,24 +3053,20 @@ /* Both transaction IDs shall be different */ if (spars1.tid == spars2.tid) { - log("Both DTAP transaction IDs shall be different"); - setverdict(fail); + setverdict(fail, "Both DTAP transaction IDs shall be different"); } /* Both SM-RP-MR values shall be different */ if (spars1.rp.msg_ref == spars2.rp.msg_ref) { - log("Both SM-RP-MR values shall be different"); - setverdict(fail); + setverdict(fail, "Both SM-RP-MR values shall be different"); } /* Both SM-RP-MR values shall be assigned */ if (spars1.rp.msg_ref == 'FF'O) { - log("Unassigned SM-RP-MR value for the 1st SMS"); - setverdict(fail); + setverdict(fail, "Unassigned SM-RP-MR value for the 1st SMS"); } if (spars2.rp.msg_ref == 'FF'O) { - log("Unassigned SM-RP-MR value for the 2nd SMS"); - setverdict(fail); + setverdict(fail, "Unassigned SM-RP-MR value for the 2nd SMS"); } /* Send the 1st RP-ACK and expect MT-forwardSM-Res on GSUP */ @@ -3088,8 +3080,7 @@ setverdict(pass); } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } @@ -3105,8 +3096,7 @@ setverdict(pass); } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } @@ -3161,8 +3151,7 @@ setverdict(pass); } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } @@ -3178,14 +3167,12 @@ /* Both SM-RP-MR values shall be different */ if (spars_mo.rp.msg_ref == spars_mt.rp.msg_ref) { - log("Both SM-RP-MR values shall be different"); - setverdict(fail); + setverdict(fail, "Both SM-RP-MR values shall be different"); } /* SM-RP-MR value for MT SMS shall be assigned */ if (spars_mt.rp.msg_ref == 'FF'O) { - log("Unassigned SM-RP-MR value for the MT SMS"); - setverdict(fail); + setverdict(fail, "Unassigned SM-RP-MR value for the MT SMS"); } /* Trigger RP-ACK for MO SMMA by sending MO-forwardSM-Res */ @@ -3206,8 +3193,7 @@ setverdict(pass); } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } @@ -3270,8 +3256,7 @@ setverdict(pass); } [] GSUP.receive { - log("RX unexpected GSUP message"); - setverdict(fail); + setverdict(fail, "Rx unexpected GSUP message"); mtc.stop; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35517?usp=email 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: I159bc54f6f4561d42aeabe825e16fa77e60c2dae Gerrit-Change-Number: 35517 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/GSUP_Types: add Source Name IE to receive templates for SMS
by laforge 09 Jan '24

09 Jan '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35519?usp=email ) Change subject: library/GSUP_Types: add Source Name IE to receive templates for SMS ...................................................................... library/GSUP_Types: add Source Name IE to receive templates for SMS Old osmo-msc versions do not include the Source Name IE in SMS related GSUP messages, unless it's set explicitly in the config file ('hlr' / 'ipa-name'). Recent osmo-msc versions (see the related osmo-msc patch) do include this IE even if it's not set explicitly ('unnamed-MSC'). Because of this, some testcases in ttcn3-msc-test are currently failing for osmo-msc master, but still passing for the -latest. Let's set the 'ipa-name' explicitly in osmo-msc.cfg, and expect the Source Name IE to be present in SMS related receive templates. Change-Id: Ic24d3082fe3dce08e43e8f3ecb6d6132503c55c6 Related: docker-playground.git I7757aae1d01b679f530b5c0a6c95b224cb9f204f Related: osmo-msc.git I7bacd001b81326c32bc262c7d0c0491ded822fa8 Related: OS#6135 --- M library/GSUP_Types.ttcn M msc/osmo-msc.cfg 2 files changed, 42 insertions(+), 9 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 323776f..b3154ac 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -1634,7 +1634,8 @@ tr_GSUP_IE_SM_RP_DA(sm_rp_da), tr_GSUP_IE_SM_RP_OA(sm_rp_oa), tr_GSUP_IE_SM_RP_UI(sm_rp_ui), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); @@ -1657,7 +1658,8 @@ { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); @@ -1684,7 +1686,8 @@ tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); @@ -1733,7 +1736,8 @@ tr_GSUP_IE_SM_RP_OA(sm_rp_oa), tr_GSUP_IE_SM_RP_UI(sm_rp_ui), tr_GSUP_IE_SM_RP_MMS(sm_rp_mms), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); @@ -1756,7 +1760,8 @@ { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); @@ -1783,7 +1788,8 @@ tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); @@ -1810,7 +1816,8 @@ tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), tr_GSUP_IE_SM_ALERT_RSN(sm_alert_rsn), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); @@ -1833,7 +1840,8 @@ { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); @@ -1860,7 +1868,8 @@ tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS), + tr_GSUP_IE_Source_Name(?) } ); diff --git a/msc/osmo-msc.cfg b/msc/osmo-msc.cfg index a266ed4..d05e400 100644 --- a/msc/osmo-msc.cfg +++ b/msc/osmo-msc.cfg @@ -76,3 +76,4 @@ hlr remote-ip 127.0.0.1 #remote-port 4222 + ipa-name test-MSC -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35519?usp=email 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: Ic24d3082fe3dce08e43e8f3ecb6d6132503c55c6 Gerrit-Change-Number: 35519 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/GSUP_Types: add Source Name IE to receive templates for SMS
by laforge 09 Jan '24

09 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35519?usp=email ) Change subject: library/GSUP_Types: add Source Name IE to receive templates for SMS ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35519?usp=email 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: Ic24d3082fe3dce08e43e8f3ecb6d6132503c55c6 Gerrit-Change-Number: 35519 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 09 Jan 2024 13:13:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: library/GSUP_Types: set Message Class IE in send templates for SMS
by laforge 09 Jan '24

09 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35518?usp=email ) Change subject: library/GSUP_Types: set Message Class IE in send templates for SMS ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35518?usp=email 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: I6468d8606eb85c811d86e4a1407ee60c8a36fbea Gerrit-Change-Number: 35518 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 09 Jan 2024 13:13:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: MSC_Tests: indicate the failure reason in setverdict()
by laforge 09 Jan '24

09 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35517?usp=email ) Change subject: MSC_Tests: indicate the failure reason in setverdict() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35517?usp=email 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: I159bc54f6f4561d42aeabe825e16fa77e60c2dae Gerrit-Change-Number: 35517 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 09 Jan 2024 13:13:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-msc-test: set 'hlr' / 'ipa-name' explicitly
by laforge 09 Jan '24

09 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/35520?usp=email ) Change subject: ttcn3-msc-test: set 'hlr' / 'ipa-name' explicitly ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/35520?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I7757aae1d01b679f530b5c0a6c95b224cb9f204f Gerrit-Change-Number: 35520 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 09 Jan 2024 13:12:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: logging: add log level cache
by laforge 09 Jan '24

09 Jan '24
Attention is currently required from: Hoernchen, arehbein. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email ) Change subject: logging: add log level cache ...................................................................... Patch Set 12: (1 comment) Patchset: PS9: > ping? yet another month has more than passed. @ewild@sysmocom. […] how often do you still want me to ping you, @ewild@sysmocom.de ? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d Gerrit-Change-Number: 30633 Gerrit-PatchSet: 12 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: arehbein <arehbein(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Tue, 09 Jan 2024 13:11:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: tests/tdef: improve test output (use OSMO_T_FMT[_ARGS])
by laforge 09 Jan '24

09 Jan '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35481?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: tests/tdef: improve test output (use OSMO_T_FMT[_ARGS]) ...................................................................... tests/tdef: improve test output (use OSMO_T_FMT[_ARGS]) Change-Id: Ie216bcf93b96610c46c6e616835a6793772e2baa Related: e30d22a0 "tests/tdef: also test OSMO_TDEF_US and negative T values" --- M tests/tdef/tdef_test.c M tests/tdef/tdef_test.ok 2 files changed, 26 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/tests/tdef/tdef_test.c b/tests/tdef/tdef_test.c index 1cc9c9c..710a4aa 100644 --- a/tests/tdef/tdef_test.c +++ b/tests/tdef/tdef_test.c @@ -86,14 +86,15 @@ printf("osmo_tdef_get(%d, %s)\t= %lu\n", T, osmo_tdef_unit_name(AS_UNIT), val); \ } while (0) -void print_tdef_info(unsigned int T) +void print_tdef_info(int T) { const struct osmo_tdef *t = osmo_tdef_get_entry(tdefs, T); if (!t) { - printf("T%d=NULL", T); + printf(OSMO_T_FMT "=NULL", OSMO_T_FMT_ARGS(T)); return; } - printf("T%d=%lu%s", T, t->val, osmo_tdef_unit_name(t->unit)); + printf(OSMO_T_FMT "=%lu%s", + OSMO_T_FMT_ARGS(T), t->val, osmo_tdef_unit_name(t->unit)); if (t->val != t->default_val) printf("(def=%lu)", t->default_val); printf("\n"); @@ -109,7 +110,7 @@ osmo_tdefs_reset(tdefs); // make all values the default for (i = 0; i < ARRAY_SIZE(tdefs)-1; i++) { - unsigned int T = tdefs[i].T; + int T = tdefs[i].T; print_tdef_info(T); for (as_unit = OSMO_TDEF_S; as_unit <= OSMO_TDEF_US; as_unit++) { print_tdef_get_short(tdefs, T, as_unit); @@ -120,7 +121,7 @@ return; for (i = 0; i < ARRAY_SIZE(tdefs_range)-1; i++) { - unsigned int T = tdefs_range[i].T; + int T = tdefs_range[i].T; print_tdef_info(T); for (as_unit = OSMO_TDEF_S; as_unit <= OSMO_TDEF_US; as_unit++) { print_tdef_get_short(tdefs_range, T, as_unit); @@ -347,9 +348,9 @@ osmo_fsm_state_name(&test_tdef_fsm, NEXT_STATE), rc); \ } else { \ struct osmo_tdef *t = osmo_tdef_get_entry(tdefs, st->T); \ - printf(" --> %s (configured as T%d%s %lu %s) rc=%d;\t", \ + printf(" --> %s (configured as " OSMO_T_FMT "%s %lu %s) rc=%d;\t", \ osmo_fsm_state_name(&test_tdef_fsm, NEXT_STATE), \ - st->T, st->keep_timer ? "(keep_timer)" : "", \ + OSMO_T_FMT_ARGS(st->T), st->keep_timer ? " (keep_timer)" : "", \ t? t->val : 0, t? osmo_tdef_unit_name(t->unit) : "-", \ rc); \ } \ diff --git a/tests/tdef/tdef_test.ok b/tests/tdef/tdef_test.ok index 827b9ab..6ceaffc 100644 --- a/tests/tdef/tdef_test.ok +++ b/tests/tdef/tdef_test.ok @@ -24,13 +24,13 @@ osmo_tdef_get(4, m) = 100 osmo_tdef_get(4, custom-unit) = 100 osmo_tdef_get(4, us) = 100 -T-5=100ms +X5=100ms osmo_tdef_get(-5, s) = 1 osmo_tdef_get(-5, ms) = 100 osmo_tdef_get(-5, m) = 1 osmo_tdef_get(-5, custom-unit) = 100 osmo_tdef_get(-5, us) = 100000 -T-6=100us +X6=100us osmo_tdef_get(-6, s) = 1 osmo_tdef_get(-6, ms) = 1 osmo_tdef_get(-6, m) = 1 @@ -168,8 +168,8 @@ --> B (configured as T2 100 ms) rc=0; state=B T=2, 0.100000 s remaining --> C (configured as T3 50 m) rc=0; state=C T=3, 3000.000000 s remaining --> D (configured as T4 100 custom-unit) rc=0; state=D T=4, 100.000000 s remaining - --> E (configured as T-5 100 ms) rc=0; state=E T=-5, 0.100000 s remaining - --> F (configured as T-6 100 us) rc=0; state=F T=-6, 0.001000 s remaining + --> E (configured as X5 100 ms) rc=0; state=E T=-5, 0.100000 s remaining + --> F (configured as X6 100 us) rc=0; state=F T=-6, 0.001000 s remaining --> G (configured as T7 50 s) rc=0; state=G T=7, 50.000000 s remaining --> H (configured as T8 300 s) rc=0; state=H T=8, 300.000000 s remaining --> I (configured as T9 5 m) rc=0; state=I T=9, 300.000000 s remaining @@ -177,17 +177,17 @@ - test keep_timer: Time passes: 123.045678 s state=J T=10, 1076.954322 s remaining - --> K (configured as T0(keep_timer) 1 custom-unit) rc=0; state=K T=10, 1076.954322 s remaining + --> K (configured as T0 (keep_timer) 1 custom-unit) rc=0; state=K T=10, 1076.954322 s remaining --> A (configured as T1 100 s) rc=0; state=A T=1, 100.000000 s remaining Time passes: 23.045678 s state=A T=1, 76.954322 s remaining - --> K (configured as T0(keep_timer) 1 custom-unit) rc=0; state=K T=1, 76.954322 s remaining + --> K (configured as T0 (keep_timer) 1 custom-unit) rc=0; state=K T=1, 76.954322 s remaining --> A (configured as T1 100 s) rc=0; state=A T=1, 100.000000 s remaining Time passes: 23.045678 s state=A T=1, 76.954322 s remaining - --> L (configured as T123(keep_timer) 1 s) rc=0; state=L T=1, 76.954322 s remaining + --> L (configured as T123 (keep_timer) 1 s) rc=0; state=L T=1, 76.954322 s remaining --> O (no timer configured for this state) rc=0; state=O T=0, no timeout - --> L (configured as T123(keep_timer) 1 s) rc=0; state=L T=123, 1.000000 s remaining + --> L (configured as T123 (keep_timer) 1 s) rc=0; state=L T=123, 1.000000 s remaining - test T=0: --> O (no timer configured for this state) rc=0; state=O T=0, no timeout - test no timer: -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35481?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie216bcf93b96610c46c6e616835a6793772e2baa Gerrit-Change-Number: 35481 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmocore[master]: core: osmo_tdef_fsm_inst_state_chg(): allow millisecond precision
by laforge 09 Jan '24

09 Jan '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35466?usp=email ) Change subject: core: osmo_tdef_fsm_inst_state_chg(): allow millisecond precision ...................................................................... core: osmo_tdef_fsm_inst_state_chg(): allow millisecond precision This API predates commit 7b74551b9, which added support for millisecond granularity to osmo_fsm. Let's do the same for the tdef FSM wrapper API, allowing the millisecond precision without rounding-up to seconds. Of course, this patch changes behavior of the existing API, but having more precise state timeouts is not going to make the API user experience worse. The old behavior of using seconds is for kept for: * OSMO_TDEF_CUSTOM -- still treated as if it was OSMO_TDEF_S. * \param[in] default_timeout -- still expected to be in seconds. Change-Id: I4c4ee89e7e32e86f74cd215f5cbfa44ace5426c1 Related: 7b74551b9 "fsm: Allow millisecond granularity in osmo_fsm built-in timer" --- M TODO-RELEASE M include/osmocom/core/tdef.h M src/core/tdef.c M tests/tdef/tdef_test.err M tests/tdef/tdef_test.ok 5 files changed, 57 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/TODO-RELEASE b/TODO-RELEASE index 9f5240f..41bd5d8 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -11,6 +11,7 @@ core ADD osmo_sock_multiaddr_get_ip_and_port(), osmo_multiaddr_ip_and_port_snprintf(), osmo_sock_multiaddr_get_name_buf() core ADD osmo_sock_sctp_get_peer_addr_info() core ADD gsmtap_inst_fd2() core, DEPRECATE gsmtap_inst_fd() +core behavior change osmo_tdef_fsm_inst_state_chg(): allow millisecond precision isdn ABI change add states and flags for external T200 handling gsm ABI change add T200 timer states to lapdm_datalink gsm ABI change add UI queue to struct lapdm_datalink diff --git a/include/osmocom/core/tdef.h b/include/osmocom/core/tdef.h index d9d2675..402d010 100644 --- a/include/osmocom/core/tdef.h +++ b/include/osmocom/core/tdef.h @@ -121,11 +121,13 @@ const struct osmo_tdef_state_timeout *osmo_tdef_get_state_timeout(uint32_t state, const struct osmo_tdef_state_timeout *timeouts_array); -/*! Call osmo_fsm_inst_state_chg() or osmo_fsm_inst_state_chg_keep_timer(), depending on the timeouts_array, tdefs and - * default_timeout. +/*! Call osmo_fsm_inst_state_chg[_ms]() or osmo_fsm_inst_state_chg_keep_timer[_ms](), + * depending on the timeouts_array, tdefs and default_timeout. * - * A T timer configured in sub-second precision is rounded up to the next full second. A timer in unit = - * OSMO_TDEF_CUSTOM is applied as if the unit is in seconds (i.e. this macro does not make sense for custom units!). + * A timer defined with sub-millisecond precision (e.g OSMO_TDEF_US) is rounded up to the next full millisecond. + * A timer value defined in units higher than millisecond (e.g. OSMO_TDEF_S, OSMO_TDEF_M) is converted to milliseconds. + * A timer in unit = OSMO_TDEF_CUSTOM is applied as if the unit is in seconds (i.e. this macro does not make sense + * for custom units!). * * See osmo_tdef_get_state_timeout() and osmo_tdef_get(). * @@ -153,9 +155,10 @@ * \param[in] state State number to transition to. * \param[in] timeouts_array Array of struct osmo_tdef_state_timeout[32] to look up state in. * \param[in] tdefs Array of struct osmo_tdef (last entry zero initialized) to look up T in. - * \param[in] default_timeout If a T is set in timeouts_array, but no timeout value is configured for T, then use this - * default timeout value as fallback, or pass -1 to abort the program. - * \return Return value from osmo_fsm_inst_state_chg() or osmo_fsm_inst_state_chg_keep_timer(). + * \param[in] default_timeout If a T is set in timeouts_array, but no timeout value is configured for T, + * then use this default timeout value (in seconds) as fallback, + * or pass a negative number to abort the program. + * \return Return value from osmo_fsm_inst_state_chg[_ms]() or osmo_fsm_inst_state_chg_keep_timer[_ms](). */ #define osmo_tdef_fsm_inst_state_chg(fi, state, timeouts_array, tdefs, default_timeout) \ _osmo_tdef_fsm_inst_state_chg(fi, state, timeouts_array, tdefs, default_timeout, \ diff --git a/src/core/tdef.c b/src/core/tdef.c index abbe581..f0c0f2e 100644 --- a/src/core/tdef.c +++ b/src/core/tdef.c @@ -337,26 +337,37 @@ const char *file, int line) { const struct osmo_tdef_state_timeout *t = osmo_tdef_get_state_timeout(state, timeouts_array); - unsigned long val = 0; + unsigned long val_ms = 0; /* No timeout defined for this state? */ if (!t) return _osmo_fsm_inst_state_chg(fi, state, 0, 0, file, line); - if (t->T) - val = osmo_tdef_get(tdefs, t->T, OSMO_TDEF_S, default_timeout); + if (t->T) { + const struct osmo_tdef *tdef = osmo_tdef_get_entry((struct osmo_tdef *)tdefs, t->T); + if (tdef == NULL) { + /* emulate the old behavior: treat default_timeout as OSMO_TDEF_S */ + OSMO_ASSERT(default_timeout >= 0); + val_ms = default_timeout * 1000; + } else { + val_ms = osmo_tdef_round(tdef->val, tdef->unit, OSMO_TDEF_MS); + /* emulate the old behavior: treat OSMO_TDEF_CUSTOM as OSMO_TDEF_S */ + if (tdef->unit == OSMO_TDEF_CUSTOM) + val_ms *= 1000; + } + } if (t->keep_timer) { if (t->T) - return _osmo_fsm_inst_state_chg_keep_or_start_timer(fi, state, val, t->T, file, line); + return _osmo_fsm_inst_state_chg_keep_or_start_timer_ms(fi, state, val_ms, t->T, file, line); else return _osmo_fsm_inst_state_chg_keep_timer(fi, state, file, line); } - /* val is always initialized here, because if t->keep_timer is false, t->T must be != 0. + /* val_ms is always initialized here, because if t->keep_timer is false, t->T must be != 0. * Otherwise osmo_tdef_get_state_timeout() would have returned NULL. */ OSMO_ASSERT(t->T); - return _osmo_fsm_inst_state_chg(fi, state, val, t->T, file, line); + return _osmo_fsm_inst_state_chg_ms(fi, state, val_ms, t->T, file, line); } const struct value_string osmo_tdef_unit_names[] = { diff --git a/tests/tdef/tdef_test.err b/tests/tdef/tdef_test.err index 1a39b89..8e5860d 100644 --- a/tests/tdef/tdef_test.err +++ b/tests/tdef/tdef_test.err @@ -1,10 +1,10 @@ DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){A}: Allocated DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){A}: State change to A (T1, 100s) -DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){A}: State change to B (T2, 1s) +DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){A}: State change to B (T2, 100ms) DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){B}: State change to C (T3, 3000s) DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){C}: State change to D (T4, 100s) -DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){D}: State change to E (X5, 1s) -DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){E}: State change to F (X6, 1s) +DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){D}: State change to E (X5, 100ms) +DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){E}: State change to F (X6, 1ms) DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){F}: State change to G (T7, 50s) DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){G}: State change to H (T8, 300s) DLGLOBAL DEBUG tdef_test(test_tdef_state_timeout){H}: State change to I (T9, 300s) diff --git a/tests/tdef/tdef_test.ok b/tests/tdef/tdef_test.ok index d934292..827b9ab 100644 --- a/tests/tdef/tdef_test.ok +++ b/tests/tdef/tdef_test.ok @@ -165,11 +165,11 @@ test_tdef_state_timeout() state=A T=0, no timeout --> A (configured as T1 100 s) rc=0; state=A T=1, 100.000000 s remaining - --> B (configured as T2 100 ms) rc=0; state=B T=2, 1.000000 s remaining + --> B (configured as T2 100 ms) rc=0; state=B T=2, 0.100000 s remaining --> C (configured as T3 50 m) rc=0; state=C T=3, 3000.000000 s remaining --> D (configured as T4 100 custom-unit) rc=0; state=D T=4, 100.000000 s remaining - --> E (configured as T-5 100 ms) rc=0; state=E T=-5, 1.000000 s remaining - --> F (configured as T-6 100 us) rc=0; state=F T=-6, 1.000000 s remaining + --> E (configured as T-5 100 ms) rc=0; state=E T=-5, 0.100000 s remaining + --> F (configured as T-6 100 us) rc=0; state=F T=-6, 0.001000 s remaining --> G (configured as T7 50 s) rc=0; state=G T=7, 50.000000 s remaining --> H (configured as T8 300 s) rc=0; state=H T=8, 300.000000 s remaining --> I (configured as T9 5 m) rc=0; state=I T=9, 300.000000 s remaining -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35466?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4c4ee89e7e32e86f74cd215f5cbfa44ace5426c1 Gerrit-Change-Number: 35466 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmocore[master]: fsm: fix OSMO_T_FMT_ARGS: add missing braces
by laforge 09 Jan '24

09 Jan '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35482?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: fsm: fix OSMO_T_FMT_ARGS: add missing braces ...................................................................... fsm: fix OSMO_T_FMT_ARGS: add missing braces Change-Id: I3ea7cbc8a51d310d9929ca5a805eb1d3d3880793 --- M include/osmocom/core/fsm.h 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index 5e5b091..a1ffd30 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -200,7 +200,7 @@ fmt, ## args) #define OSMO_T_FMT "%c%u" -#define OSMO_T_FMT_ARGS(T) ((T) >= 0 ? 'T' : 'X'), ((T) >= 0 ? T : -T) +#define OSMO_T_FMT_ARGS(T) ((T) >= 0 ? 'T' : 'X'), ((T) >= 0 ? (T) : -(T)) int osmo_fsm_register(struct osmo_fsm *fsm); void osmo_fsm_unregister(struct osmo_fsm *fsm); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35482?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3ea7cbc8a51d310d9929ca5a805eb1d3d3880793 Gerrit-Change-Number: 35482 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • ...
  • 156
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.