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 -----
  • November
  • 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

October 2025

  • 1 participants
  • 631 discussions
[M] Change in osmo-msc[master]: SMS optimise: Do VLR check for destination subscriber earlier
by keith 10 Oct '25

10 Oct '25
keith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/41221?usp=email ) Change subject: SMS optimise: Do VLR check for destination subscriber earlier ...................................................................... SMS optimise: Do VLR check for destination subscriber earlier sms_from_result() calls a number of sqlite3_column_XXX functions to build the SMS in memory. If the destination subscriber is not attached, the sms will be free'd immediatly anyway in smsq_take_next_sms() so let's check if the destination subscriber is present and attached before we call all the sqlite3 routines. Change-Id: Ibd07b9d200b48108d705ed4c461cc4ddfa421fd2 --- M src/libmsc/db.c M src/libmsc/sms_queue.c M tests/sms_queue/sms_queue_test.c M tests/sms_queue/sms_queue_test.ok 4 files changed, 31 insertions(+), 42 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/21/41221/1 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 04e11c5..0c5c543 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -747,6 +747,22 @@ if (!sms) return NULL; + daddr = (const char *)sqlite3_column_text(stmt, COL_DEST_ADDR); + if (daddr) + OSMO_STRLCPY_ARRAY(sms->dst.addr, daddr); + + if (net != NULL) { /* db_sms_test passes NULL, so we need to be tolerant */ + sms->receiver = vlr_subscr_find_by_msisdn(net->vlr, sms->dst.addr, + VSUB_USE_SMS_RECEIVER); + if (!sms->receiver || !sms->receiver->lu_complete) { + LOGP(DLSMS, LOGL_DEBUG, + "Subscriber %s%s is not attached, skipping SMS.\n", + sms->receiver ? "" : "MSISDN-", + sms->receiver ? vlr_subscr_msisdn_or_name(sms->receiver) : daddr); + return sms; + } + } + sms->id = sqlite3_column_int64(stmt, COL_ID); sms->created = sqlite3_column_int64(stmt, COL_CREATED); @@ -763,13 +779,6 @@ sms->dst.npi = sqlite3_column_int(stmt, COL_DEST_NPI); sms->dst.ton = sqlite3_column_int(stmt, COL_DEST_TON); - daddr = (const char *)sqlite3_column_text(stmt, COL_DEST_ADDR); - if (daddr) - OSMO_STRLCPY_ARRAY(sms->dst.addr, daddr); - - if (net != NULL) /* db_sms_test passes NULL, so we need to be tolerant */ - sms->receiver = vlr_subscr_find_by_msisdn(net->vlr, sms->dst.addr, - VSUB_USE_SMS_RECEIVER); sms->src.npi = sqlite3_column_int(stmt, COL_SRC_NPI); sms->src.ton = sqlite3_column_int(stmt, COL_SRC_TON); diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index 7dd14ff..86a0e39 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -301,11 +301,13 @@ while (wrapped < 2 && (--sanity)) { /* If we wrapped around and passed the first msisdn, we're * through the entire SMS DB; end it. */ - if (wrapped && strcmp(last_msisdn, started_with_msisdn) >= 0) + if (wrapped && strcmp(last_msisdn, started_with_msisdn) >= 0) { + DEBUGP(DLSMS, "SMS queue: Reached end of DB.\n"); break; - + } sms = db_sms_get_next_unsent_rr_msisdn(net, last_msisdn, 9); if (!sms) { + DEBUGP(DLSMS, "SMS queue: Got no next unsent SMS\n"); last_msisdn[0] = '\0'; wrapped++; continue; @@ -316,12 +318,7 @@ osmo_strlcpy(last_msisdn, sms->dst.addr, last_msisdn_buflen); /* Is the subscriber attached? If not, go to next SMS */ - if (!sms->receiver || !sms->receiver->lu_complete) { - LOGP(DLSMS, LOGL_DEBUG, - "Subscriber %s%s is not attached, skipping SMS %llu\n", - sms->receiver ? "" : "MSISDN-", - sms->receiver ? vlr_subscr_msisdn_or_name(sms->receiver) - : sms->dst.addr, sms->id); + if (!sms->id) { sms_free(sms); continue; } @@ -329,7 +326,7 @@ return sms; } - DEBUGP(DLSMS, "SMS queue: no SMS to be sent\n"); + DEBUGP(DLSMS, "SMS queue: no SMS to be sent, tried %d times.\n", sanity+100); return NULL; } diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index bca60b1..408c78d 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -122,13 +122,15 @@ continue; if (fake_sms_db[i].failed_attempts > max_failed) continue; + if (!fake_sms_db[i].vsub_attached) + continue; sms = sms_alloc(); OSMO_ASSERT(sms); osmo_strlcpy(sms->dst.addr, fake_sms_db[i].msisdn, sizeof(sms->dst.addr)); - sms->receiver = fake_sms_db[i].vsub_attached? &arbitrary_vsub : NULL; + sms->id = 1 + i; osmo_strlcpy(sms->text, fake_sms_db[i].msisdn, sizeof(sms->text)); if (fake_sms_db[i].vsub_attached) fake_sms_db[i].nr_of_sms--; diff --git a/tests/sms_queue/sms_queue_test.ok b/tests/sms_queue/sms_queue_test.ok index 146400d..6ccc95f 100644 --- a/tests/sms_queue/sms_queue_test.ok +++ b/tests/sms_queue/sms_queue_test.ok @@ -12,21 +12,17 @@ hitting database: looking for MSISDN > '2222', failed_attempts <= 9 #1: sending SMS to 3333 (last_msisdn='3333') hitting database: looking for MSISDN > '3333', failed_attempts <= 9 - hitting database: looking for MSISDN > '5555', failed_attempts <= 9 hitting database: looking for MSISDN > '', failed_attempts <= 9 #2: sending SMS to 2222 (last_msisdn='2222') hitting database: looking for MSISDN > '2222', failed_attempts <= 9 #3: sending SMS to 3333 (last_msisdn='3333') hitting database: looking for MSISDN > '3333', failed_attempts <= 9 - hitting database: looking for MSISDN > '5555', failed_attempts <= 9 hitting database: looking for MSISDN > '', failed_attempts <= 9 -#4: no SMS to send (last_msisdn='5555') - hitting database: looking for MSISDN > '5555', failed_attempts <= 9 +#4: no SMS to send (last_msisdn='') hitting database: looking for MSISDN > '', failed_attempts <= 9 -#5: no SMS to send (last_msisdn='5555') - hitting database: looking for MSISDN > '5555', failed_attempts <= 9 +#5: no SMS to send (last_msisdn='') hitting database: looking for MSISDN > '', failed_attempts <= 9 -#6: no SMS to send (last_msisdn='5555') +#6: no SMS to send (last_msisdn='') - SMS are pending at various nr failed attempts (cutoff at >= 10) 1111 has 1 SMS pending, 0 failed attempts @@ -60,27 +56,12 @@ 5555 (NOT attached) has 1 SMS pending, 0 failed attempts --> hitting database: looking for MSISDN > '2345', failed_attempts <= 9 - hitting database: looking for MSISDN > '3333', failed_attempts <= 9 - hitting database: looking for MSISDN > '4444', failed_attempts <= 9 - hitting database: looking for MSISDN > '5555', failed_attempts <= 9 hitting database: looking for MSISDN > '', failed_attempts <= 9 - hitting database: looking for MSISDN > '1111', failed_attempts <= 9 - hitting database: looking for MSISDN > '2222', failed_attempts <= 9 -#0: no SMS to send (last_msisdn='3333') - hitting database: looking for MSISDN > '3333', failed_attempts <= 9 - hitting database: looking for MSISDN > '4444', failed_attempts <= 9 - hitting database: looking for MSISDN > '5555', failed_attempts <= 9 +#0: no SMS to send (last_msisdn='') hitting database: looking for MSISDN > '', failed_attempts <= 9 - hitting database: looking for MSISDN > '1111', failed_attempts <= 9 - hitting database: looking for MSISDN > '2222', failed_attempts <= 9 -#1: no SMS to send (last_msisdn='3333') - hitting database: looking for MSISDN > '3333', failed_attempts <= 9 - hitting database: looking for MSISDN > '4444', failed_attempts <= 9 - hitting database: looking for MSISDN > '5555', failed_attempts <= 9 +#1: no SMS to send (last_msisdn='') hitting database: looking for MSISDN > '', failed_attempts <= 9 - hitting database: looking for MSISDN > '1111', failed_attempts <= 9 - hitting database: looking for MSISDN > '2222', failed_attempts <= 9 -#2: no SMS to send (last_msisdn='3333') +#2: no SMS to send (last_msisdn='') - there are no SMS in the DB 1111 has 0 SMS pending, 0 failed attempts -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/41221?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ibd07b9d200b48108d705ed4c461cc4ddfa421fd2 Gerrit-Change-Number: 41221 Gerrit-PatchSet: 1 Gerrit-Owner: keith <keith(a)rhizomatica.org>
1 0
0 0
[S] Change in osmo-msc[master]: Use unix timestamps in the SMS db
by keith 10 Oct '25

10 Oct '25
keith has restored this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28339?usp=email ) Change subject: Use unix timestamps in the SMS db ...................................................................... Restored -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28339?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: restore Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I599a57666da22adf806b01ff095c8672d523a737 Gerrit-Change-Number: 28339 Gerrit-PatchSet: 1 Gerrit-Owner: keith <keith(a)rhizomatica.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-msc[master]: vlr: Stop silent call before deduping subscribers
by matanp 10 Oct '25

10 Oct '25
Attention is currently required from: fixeria, jolly, laforge, lynxis lazus, neels, osmith. matanp has posted comments on this change by matanp. ( https://gerrit.osmocom.org/c/osmo-msc/+/41131?usp=email ) Change subject: vlr: Stop silent call before deduping subscribers ...................................................................... Patch Set 2: (1 comment) File src/libvlr/vlr.c: https://gerrit.osmocom.org/c/osmo-msc/+/41131/comment/bfa95983_964bf63a?usp… : PS1, Line 651: gsm_silent_call_stop( > Good point. If there's no silent call going on, `gsm_silent_call_stop()` will log errors... I added a check to make sure we stop only ongoing transactions -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/41131?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If23f8b0e42d4a3a8bf1c8f5ca81b045834b6cccd Gerrit-Change-Number: 41131 Gerrit-PatchSet: 2 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Fri, 10 Oct 2025 14:00:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly <andreas(a)eversberg.eu> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-msc[master]: vlr: Stop silent call before deduping subscribers
by matanp 10 Oct '25

10 Oct '25
Attention is currently required from: jolly, laforge, lynxis lazus, matanp, neels, osmith. Hello Jenkins Builder, fixeria, jolly, laforge, lynxis lazus, neels, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/41131?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by jolly, Code-Review+1 by laforge, Code-Review+1 by osmith, Verified+1 by Jenkins Builder Change subject: vlr: Stop silent call before deduping subscribers ...................................................................... vlr: Stop silent call before deduping subscribers Before this fix, A use count mismatch could be reached by: * Completing a location updating procedure with TMSI. * Disconnecting from the BTS. * Starting a silent call from the MSC. * Registering again with the same IMSI but a different TMSI. This would cause the a new subscriber to be created without the silent call use count, which in turn would cause the assert in `vlr_subscr_put` in `trans_free` to fail with use count of -1. Change-Id: If23f8b0e42d4a3a8bf1c8f5ca81b045834b6cccd --- M include/osmocom/msc/silent_call.h M src/libmsc/silent_call.c M src/libvlr/vlr.c 3 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/31/41131/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/41131?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If23f8b0e42d4a3a8bf1c8f5ca81b045834b6cccd Gerrit-Change-Number: 41131 Gerrit-PatchSet: 2 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: matanp <matan1008(a)gmail.com>
1 0
0 0
[M] Change in osmo-dev[master]: gen_makefile: support building PyHSS
by jolly 10 Oct '25

10 Oct '25
Attention is currently required from: fixeria, osmith. jolly has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-dev/+/41213?usp=email ) Change subject: gen_makefile: support building PyHSS ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/41213?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: If40c9e8ea07c9f6c7d379f6d5ff659e95165e4ae Gerrit-Change-Number: 41213 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 10 Oct 2025 10:27:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-dev[master]: gen_makefile: support building PyHSS
by osmith 10 Oct '25

10 Oct '25
Attention is currently required from: fixeria, jolly. Hello Jenkins Builder, fixeria, jolly, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-dev/+/41213?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: gen_makefile: support building PyHSS ...................................................................... gen_makefile: support building PyHSS Support cloning and building PyHSS and "interesting" dependencies (that we might want to patch while hacking on PyHSS). Other dependencies such as sqlalchemy get installed via pip into a venv that is currently shared by all python projects that osmo-dev can build. We can change this later on to use multiple venvs or change the dependencies that get built from source, if needed. Python projects get built with "python3 -m build" into a whl file, and then installed into the venv with "pip install". The above works with projects that have a pyproject.toml. PyHSS currently doesn't have this yet, but this patchset adds one: https://github.com/nickvsnetworking/pyhss/pull/258 python-venv-requirements.txt in this patch is a combination of the relevant dependencies from PyHSS and dependencies that get built from source. Related: OS#6862 Change-Id: If40c9e8ea07c9f6c7d379f6d5ff659e95165e4ae --- M all.buildsystems M all.deps M all.urls M gen_makefile.py A python-venv-requirements.txt 5 files changed, 76 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/13/41213/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/41213?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: If40c9e8ea07c9f6c7d379f6d5ff659e95165e4ae Gerrit-Change-Number: 41213 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: hlr: add initial testenv_pyhss.cfg
by osmith 09 Oct '25

09 Oct '25
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41220?usp=email ) Change subject: hlr: add initial testenv_pyhss.cfg ...................................................................... hlr: add initial testenv_pyhss.cfg With this patch and fixes in PyHSS, the first test cases are passing: https://github.com/nickvsnetworking/pyhss/pull/257 Related: OS#6862 Depends: osmo-ci Ic7acd3ca654580aa8e5a52f162f5c9042fc7d09f Change-Id: I7a7e709ec02a9bf44343fff4df2861dfe4e1a761 --- M _testenv/data/podman/Dockerfile A _testenv/data/scripts/run_in_venv.sh A _testenv/data/scripts/wait_for_port.py A hlr/pyhss/HLR_Tests.cfg A hlr/pyhss/pyhss.yaml R hlr/testenv_osmo_hlr.cfg A hlr/testenv_pyhss.cfg 7 files changed, 273 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/41220/1 diff --git a/_testenv/data/podman/Dockerfile b/_testenv/data/podman/Dockerfile index 91569ee..f1deb29 100644 --- a/_testenv/data/podman/Dockerfile +++ b/_testenv/data/podman/Dockerfile @@ -76,7 +76,11 @@ pkg-config \ procps \ psmisc \ + python3-build \ + python3-dev \ python3-pip \ + python3-poetry-core \ + python3-venv \ qemu-system-x86 \ rsync \ source-highlight \ diff --git a/_testenv/data/scripts/run_in_venv.sh b/_testenv/data/scripts/run_in_venv.sh new file mode 100755 index 0000000..b953a36 --- /dev/null +++ b/_testenv/data/scripts/run_in_venv.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e +if [ -n "$TESTENV_INSTALL_DIR" ]; then + . "$TESTENV_INSTALL_DIR"/venv/bin/activate +fi + +"$@" diff --git a/_testenv/data/scripts/wait_for_port.py b/_testenv/data/scripts/wait_for_port.py new file mode 100755 index 0000000..2a85319 --- /dev/null +++ b/_testenv/data/scripts/wait_for_port.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +# Copyright 2024 sysmocom - s.f.m.c. GmbH +# SPDX-License-Identifier: GPL-3.0-or-later +# Wait until a port is available, useful for waiting until a SUT has started +import socket +import argparse +import time +import sys + +args = None + + +def wait_for_port(): + start_time = time.time() + while True: + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + result = s.connect_ex((args.hostname, args.port)) + if result == 0: + sys.exit(0) + + if time.time() - start_time >= args.timeout: + print(f"ERROR: {args.hostname}:{args.port} did not become available within {args.timeout}s!") + sys.exit(1) + + time.sleep(0.1) + + +def parse_args(): + global args + + parser = argparse.ArgumentParser() + parser.add_argument( + "-H", + "--hostname", + help="default: 127.0.0.1", + default="127.0.0.1", + ) + parser.add_argument( + "-p", + "--port", + type=int, + required=True, + ) + parser.add_argument( + "-t", + "--timeout", + type=int, + default=5, + help="timeout in seconds (default: 5).", + ) + args = parser.parse_args() + + +if __name__ == "__main__": + parse_args() + wait_for_port() diff --git a/hlr/pyhss/HLR_Tests.cfg b/hlr/pyhss/HLR_Tests.cfg new file mode 100644 index 0000000..d65c824 --- /dev/null +++ b/hlr/pyhss/HLR_Tests.cfg @@ -0,0 +1,9 @@ +[ORDERED_INCLUDE] +"../Common.cfg" +"./HLR_Tests.default" + +[MODULE_PARAMETERS] +HLR_Tests.m_hlr_impl := HLR_IMPL_PYHSS + +[EXECUTE] +HLR_Tests.control diff --git a/hlr/pyhss/pyhss.yaml b/hlr/pyhss/pyhss.yaml new file mode 100644 index 0000000..87e6c53 --- /dev/null +++ b/hlr/pyhss/pyhss.yaml @@ -0,0 +1,186 @@ +hss: + transport: "TCP" + bind_ip: ["127.0.0.1"] + bind_port: 3868 + OriginHost: "hss01" + OriginRealm: "epc.mnc001.mcc001.3gppnetwork.org" + ProductName: "pyHSS" + site_name: "TTCN3" + MCC: "001" + MNC: "01" + SLh_enabled: False + #IMSI of Test Subscriber for Unit Checks (Optional) + test_sub_imsi: '001021234567890' + + #The maximum time to wait, in seconds, before disconnecting a client when no data is received. + client_socket_timeout: 120 + + #The maximum time to wait, in seconds, before disconnecting a client when no data is received. + client_socket_timeout: 300 + + #The maximum time to wait, in seconds, before discarding a diameter request. + diameter_request_timeout: 3 + + # Whether to send a DWR to connected peers. + send_dwr: False + + # How often to send a DWR to connected peers if enabled, in seconds. + send_dwr_interval: 5 + + #The amount of time, in seconds, before purging a disconnected client from the Active Diameter Peers key in redis. + active_diameter_peers_timeout: 10 + + #Prevent updates from being performed without a valid 'Provisioning-Key' in the header + lock_provisioning: False + + #Provisioning Key for this HSS, alias for an API key. Required to be present in the header of requests to this HSS' api, if lock_provisioning is True. + provisioning_key: "changeThisKeyInProduction" + + #If enabled sends CLRs to old MME when new MME attaches active sub + CancelLocationRequest_Enabled: False + + #Workaround for some MMEs to force an Insert Subscriber Data request to be sent immediately after ULA + Insert_Subscriber_Data_Force: False + + #Default Initial Filter Criteria for IMS Subscribers + #Jinja Formatted Template, see the example for variables passed to it. + Default_iFC: 'default_ifc.xml' + + #Default Sh User Data + Default_Sh_UserData: 'default_sh_user_data.xml' + + #Whether to use an external socket service + use_external_socket_service: False + + #The Redis key used to store active diameter peers + diameter_peer_key: diameterPeers + + # Send requests via a DRA (if connected) when a given peer can't be found + use_dra_fallback: False + + # How long an emergency subscriber entry will last for in the table before expiring, in minutes. + emergency_subscriber_expiry: 3600 + + # Whether to send a Delete Subscriber Data Request to the Old MME on an Update Location Request. + send_dsr_on_mme_change: False + + # Static Identifier for the subscriber context with the Delete Subscriber Data Request. + dsr_external_identifier: "example" + + # Whether to ignore Purge UE Requests - leaving the subscriber state with the last served mme instead of null. + ignore_purge_ue_request: False + + #S-CSCF Pool + scscf_pool: + - 'scscf.ims.mnc001.mcc001.3gppnetwork.org' + + roaming: + outbound: + # Whether or not to a subscriber to connect to an undefined network when outbound roaming. + allow_undefined_networks: True + + # SCTP Socket Parameters + sctp: + rtoMax: 5000 + rtoMin: 500 + rtoInitial: 1000 + + gsup: + bind_ip: "127.0.0.1" + bind_port: 4222 + +api: + page_size: 200 + # Whether or not to return key-based data when querying the AUC. Disable in production systems. + enable_insecure_auc: False + +benchmarking: + # Whether to enable benchmark logging + enabled: True + # How often to report, in seconds. Not all benchmarking supports interval reporting. + reporting_interval: 3600 + +eir: + imsi_imei_logging: True #Store current IMEI / IMSI pair in backend + no_match_response: 2 #Greylist + store_offnet_imsi: False # Whether or not to store an IMEI / IMSI pair that doesn't exist in the AUC + simSwapNotification: False # If the IMEI for a stored IMSI/IMEI combo changes, notify the webhook endpoint + # Define an optional TAC csv file path + #tac_database_csv: '/etc/pyhss/tac_database.csv' + +logging: + level: DEBUG + logfiles: + hss_logging_file: /dev/stdout + diameter_logging_file: pyhss_diameter.log + geored_logging_file: pyhss_geored.log + metric_logging_file: pyhss_metrics.log + sqlalchemy_sql_echo: False + sqlalchemy_pool_recycle: 15 + sqlalchemy_pool_size: 30 + sqlalchemy_max_overflow: 0 + +## Database Parameters +database: + db_type: sqlite + server: 127.0.0.1 + username: dbeaver + password: password + database: pyhss.db + readCacheEnabled: True + readCacheInterval: 60 + +## External Webhook Notifications +webhooks: + enabled: False + endpoints: + - 'http://127.0.0.1:8181' + +### Notifications to OCS on Credit Control Requests +ocs: + enabled: False + endpoints: + - 'http://127.0.0.1:8282' + +## Geographic Redundancy Parameters +geored: + enabled: False + sync_actions: ['HSS', 'IMS', 'PCRF', 'EIR'] #What event actions should be synced + endpoints: #List of PyHSS API Endpoints to update + - 'http://hss01.mnc001.mcc001.3gppnetwork.org:8080' + - 'http://hss02.mnc001.mcc001.3gppnetwork.org:8080' + +#Redis is required to run PyHSS. An instance running on a local network is recommended for production. +redis: + # Which connection type to attempt. Valid options are: tcp, unix, sentinel + # tcp - Connection via a standard TCP socket to a given host and port. + # unix - Connect to redis via a unix socket, provided by unixSocketPath. + # sentinel - Connect to one or more redis sentinel hosts. + connectionType: "tcp" + unixSocketPath: '/var/run/redis/redis-server.sock' + host: localhost + port: 6379 + sentinel: + masterName: exampleMaster + hosts: + - exampleSentinel.mnc001.mcc001.3gppnetwork.org: + port: 6379 + password: '' + + +prometheus: + enabled: False + port: 8081 #If the API is run the API runs on the next port number up from this + async_subscriber_count: False #If enabled the subscriber count will be updated asynchronously for Prometheus + +influxdb: + enabled: False + host: "127.0.0.1" + port: 8086 + username: exampleUser + password: examplePassword + database: example + +snmp: + port: 1161 + listen_address: 127.0.0.1 diff --git a/hlr/testenv.cfg b/hlr/testenv_osmo_hlr.cfg similarity index 100% rename from hlr/testenv.cfg rename to hlr/testenv_osmo_hlr.cfg diff --git a/hlr/testenv_pyhss.cfg b/hlr/testenv_pyhss.cfg new file mode 100644 index 0000000..693a6cc --- /dev/null +++ b/hlr/testenv_pyhss.cfg @@ -0,0 +1,12 @@ +[testsuite] +titan_min=11.1.0 +program=HLR_Tests +config=HLR_Tests.cfg +copy=pyhss/HLR_Tests.cfg + +[pyhss_gsup] +program=PYHSS_CONFIG=pyhss.yaml run_in_venv.sh pyhss_gsup +setup=wait_for_port.py -p 4222 +make=pyhss +package=pyhss +copy=pyhss/pyhss.yaml -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41220?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7a7e709ec02a9bf44343fff4df2861dfe4e1a761 Gerrit-Change-Number: 41220 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: testenv: add --install-packages
by osmith 09 Oct '25

09 Oct '25
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41215?usp=email ) Change subject: testenv: add --install-packages ...................................................................... testenv: add --install-packages Add an option to quickly install packages in the container. This is useful when making a new SUT run with osmo-ttcn3-hacks and figuring out which packages need to be installed to make the build pass (without rebuilding the whole container for each missing dependency). It can also be used to quickly install additional debugging tools (strace, valgrind, etc.). A cache for the deb files is already getting mounted inside the container. Change-Id: Ie54817e6c0334a224a612521beb378537c10d39d --- M _testenv/testenv/__init__.py M _testenv/testenv/podman.py 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/15/41215/1 diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py index 44259c2..35338a4 100644 --- a/_testenv/testenv/__init__.py +++ b/_testenv/testenv/__init__.py @@ -210,6 +210,13 @@ action="store_true", help="run an interactive shell before stopping daemons/container", ) + group.add_argument( + "-I", + "--install-packages", + action="append", + metavar="PACKAGE", + help="temporarily install debian packages in the container", + ) group = sub_run.add_argument_group("output options") group.add_argument( @@ -272,6 +279,9 @@ if args.kernel == "debian" and not args.podman: raise NoTraceException("--kernel-debian requires --podman") + if args.install_packages and not args.podman: + raise NoTraceException("--install-packages requires --podman") + if args.kernel == "custom" and not os.path.exists(custom_kernel_path): logging.critical( "See _testenv/README.md for more information on downloading a pre-built kernel or building your own kernel." diff --git a/_testenv/testenv/podman.py b/_testenv/testenv/podman.py index 678a0c1..2013699 100644 --- a/_testenv/testenv/podman.py +++ b/_testenv/testenv/podman.py @@ -285,6 +285,9 @@ if not os.path.exists(pkgcache): exec_cmd(["apt-get", "-q", "update"]) + if testenv.args.install_packages: + exec_cmd(["apt-get", "install", "-y", "--no-install-recommends"] + testenv.args.install_packages) + def check_titan_version(): version, _ = testenv.testenv_cfg.get_titan_version_first_cfg() -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41215?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie54817e6c0334a224a612521beb378537c10d39d Gerrit-Change-Number: 41215 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hlr: add HLR_IMPL_PYHSS
by osmith 09 Oct '25

09 Oct '25
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41217?usp=email ) Change subject: hlr: add HLR_IMPL_PYHSS ...................................................................... hlr: add HLR_IMPL_PYHSS Prepare to run the HLR testsuite against PyHSS. Related: OS#6862 Change-Id: I0989374d777aabf5afaf224faeb0cb2ff4e603e6 --- M hlr/HLR_Tests.ttcn 1 file changed, 21 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/41217/1 diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index 45a8fb3..f86a6bc 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -37,6 +37,11 @@ import from MSLookup_mDNS_Templates all; import from DNS_Helpers all; +type enumerated HLR_Impl { + HLR_IMPL_OSMOCOM, + HLR_IMPL_PYHSS +}; + type component test_CT extends CTRL_Adapter_CT { /* emulated GSUP client (MSC/SGSN) */ var IPA_Emulation_CT vc_IPA; @@ -71,6 +76,8 @@ /* emulated GSUP server (second HLR) */ charstring mp_hlr_ts_ip := "127.0.0.99"; integer mp_hlr_ts_port := 4222; + + HLR_Impl m_hlr_impl := HLR_IMPL_OSMOCOM; }; type record HlrSubscrAud2G { @@ -235,14 +242,19 @@ activate(as_Tguard()); f_init_gsup("HLR_Test", legacy); - f_init_vty(); - f_init_mslookup(); + + if (m_hlr_impl == HLR_IMPL_OSMOCOM) { + f_init_vty(); + f_init_mslookup(); + } if (gsup_server) { f_init_gsup_server("HLR_Test"); } - f_ipa_ctrl_start_client(mp_hlr_ip, mp_hlr_ctrl_port); + if (m_hlr_impl == HLR_IMPL_OSMOCOM) { + f_ipa_ctrl_start_client(mp_hlr_ip, mp_hlr_ctrl_port); + } } /*! Start HLR_ConnHdlr from testCT in a separate thread. @@ -258,7 +270,9 @@ vc_conn := HLR_ConnHdlr.create(id); connect(vc_conn:GSUP, vc_GSUP:GSUP_CLIENT); connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC); - connect(vc_conn:mDNS, vc_MSLookup_mDNS:mDNS); + if (m_hlr_impl == HLR_IMPL_OSMOCOM) { + connect(vc_conn:mDNS, vc_MSLookup_mDNS:mDNS); + } if (gsup_server) { connect(vc_conn:GSUP, vc_GSUP_server:GSUP_CLIENT); @@ -296,7 +310,9 @@ g_pars := valueof(pars); f_create_gsup_expect_explicit(hex2str(g_pars.sub.imsi), vc_GSUP_client); } - f_handler_init_vty(); + if (m_hlr_impl == HLR_IMPL_OSMOCOM) { + f_handler_init_vty(); + } fn.apply(); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41217?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0989374d777aabf5afaf224faeb0cb2ff4e603e6 Gerrit-Change-Number: 41217 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: testenv: set PYTHONUNBUFFERED=1
by osmith 09 Oct '25

09 Oct '25
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41216?usp=email ) Change subject: testenv: set PYTHONUNBUFFERED=1 ...................................................................... testenv: set PYTHONUNBUFFERED=1 Prepare to run PyHSS, which needs this variable to be set or else no log messages are printed. This problem exists with potentially all python scripts that testenv would run, so set the env var for all commands. Change-Id: I155f7c7bd9b985094e36fee6c6a2acfe556f580d --- M _testenv/testenv/cmd.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/41216/1 diff --git a/_testenv/testenv/cmd.py b/_testenv/testenv/cmd.py index d637129..c14f694 100644 --- a/_testenv/testenv/cmd.py +++ b/_testenv/testenv/cmd.py @@ -106,6 +106,7 @@ ret["PATH"] = path ret["HOME"] = os.environ.get("HOME") + ret["PYTHONUNBUFFERED"] = "1" for var in env: ret[var] = env[var] -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41216?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I155f7c7bd9b985094e36fee6c6a2acfe556f580d Gerrit-Change-Number: 41216 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • ...
  • 64
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.