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

July 2024

  • 1 participants
  • 1379 discussions
[M] Change in pysim[master]: pySim.esim.saip: Meaningful defaults in PE Constructor + test
by laforge 08 Jul '24

08 Jul '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37415?usp=email ) Change subject: pySim.esim.saip: Meaningful defaults in PE Constructor + test ...................................................................... pySim.esim.saip: Meaningful defaults in PE Constructor + test Let's make sure the constructor of ProfileElement subclasses set meaningful defaults to the self.decoded member, so that the to_der() method can actually encode it. This is required when constructing a profile from scratch, as opposed to loading an existing one from DER. Also, add a test to verify that the encoder passes without exception; doesn't test the generated binary data. Change-Id: I401bca16e58461333733877ec79102a5ae7fe410 --- M pySim/esim/saip/__init__.py M tests/test_esim_saip.py 2 files changed, 170 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/15/37415/1 diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py index e690e6c..e35e1a5 100644 --- a/pySim/esim/saip/__init__.py +++ b/pySim/esim/saip/__init__.py @@ -265,6 +265,10 @@ def from_der(cls, der: bytes) -> 'ProfileElement': class4petype = { 'securityDomain': ProfileElementSD, + 'mf': ProfileElementMF, + 'pukCodes': ProfileElementPuk, + 'pinCodes': ProfileElementPin, + 'telecom': ProfileElementTelecom, 'usim': ProfileElementUSIM, 'isim': ProfileElementISIM, } @@ -294,6 +298,110 @@ def __str__(self) -> str: return self.type +class ProfileElementMF(ProfileElement): + type = 'mf' + + def __init__(self, decoded: Optional[dict] = None): + super().__init__() + if decoded: + self.decoded = decoded + return + # provide some reasonable defaults + self.decoded = OrderedDict() + self.decoded['mf-header'] = { 'mandated': None, 'identification': None} + self.decoded['templateID'] = str(oid.MF) + for fname in ['mf', 'ef-iccid', 'ef-dir', 'ef-arr']: + self.decoded[fname] = [] + # TODO: resize EF.DIR? + +class ProfileElementPuk(ProfileElement): + type = 'pukCodes' + + def __init__(self, decoded: Optional[dict] = None): + super().__init__() + if decoded: + self.decoded = decoded + return + # provide some reasonable defaults + self.decoded = OrderedDict() + self.decoded['puk-Header'] = { 'mandated': None, 'identification': None} + self.decoded['pukCodes'] = [] + self.add_puk(0x01, b'11111111') + self.add_puk(0x81, b'22222222') + + def add_puk(self, key_ref: int, puk_value: bytes, max_attempts:int = 10, retries_left:int = 10): + """Add a PUK to the pukCodes ProfileElement""" + if key_ref < 0 or key_ref > 0xff: + raise ValueError('key_ref must be uint8') + if len(puk_value) != 8: + raise ValueError('puk_value must be 8 bytes long') + if max_attempts < 0 or max_attempts > 0xf: + raise ValueError('max_attempts must be 4 bit') + if retries_left < 0 or max_attempts > 0xf: + raise ValueError('retries_left must be 4 bit') + puk = { + 'keyReference': key_ref, + 'pukValue': puk_value, + 'maxNumOfAttemps-retryNumLeft': (max_attempts << 4) | retries_left, + } + self.decoded['pukCodes'].append(puk) + + +class ProfileElementPin(ProfileElement): + type = 'pinCodes' + + def __init__(self, decoded: Optional[dict] = None): + super().__init__() + if decoded: + self.decoded = decoded + return + # provide some reasonable defaults + self.decoded = OrderedDict() + self.decoded['pin-Header'] = { 'mandated': None, 'identification': None} + self.decoded['pinCodes'] = ('pinconfig', []) + self.add_pin(0x01, b'0000\xff\xff\xff\xff', unblock_ref=1, pin_attrib=6) + self.add_pin(0x10, b'11111111', pin_attrib=3) + + def add_pin(self, key_ref: int, pin_value: bytes, max_attempts : int = 3, retries_left : int = 3, + unblock_ref: Optional[int] = None, pin_attrib: int = 7): + """Add a PIN to the pinCodes ProfileElement""" + if key_ref < 0 or key_ref > 0xff: + raise ValueError('key_ref must be uint8') + if pin_attrib < 0 or pin_attrib > 0xff: + raise ValueError('pin_attrib must be uint8') + if len(pin_value) != 8: + raise ValueError('pin_value must be 8 bytes long') + if max_attempts < 0 or max_attempts > 0xf: + raise ValueError('max_attempts must be 4 bit') + if retries_left < 0 or max_attempts > 0xf: + raise ValueError('retries_left must be 4 bit') + pin = { + 'keyReference': key_ref, + 'pinValue': pin_value, + 'maxNumOfAttemps-retryNumLeft': (max_attempts << 4) | retries_left, + 'pinAttributes': pin_attrib, + } + if unblock_ref: + pin['unblockingPINReference'] = unblock_ref + self.decoded['pinCodes'][1].append(pin) + + +class ProfileElementTelecom(ProfileElement): + type = 'telecom' + + def __init__(self, decoded: Optional[dict] = None): + super().__init__() + if decoded: + self.decoded = decoded + return + # provide some reasonable defaults for a MNO-SD + self.decoded = OrderedDict() + self.decoded['telecom-header'] = { 'mandated': None, 'identification': None} + self.decoded['templateID'] = str(oid.DF_TELECOM_v2) + for fname in ['df-telecom', 'ef-arr']: + self.decoded[fname] = [] + + class SecurityDomainKeyComponent: """Representation of a key-component of a key for a security domain.""" def __init__(self, key_type: str, key_data: bytes, mac_length: int = 8): @@ -444,9 +552,23 @@ class ProfileElementUSIM(ProfileElement): type = 'usim' + + def __init__(self, decoded: Optional[dict] = None): + super().__init__() + if decoded: + self.decoded = decoded + return + # provide some reasonable defaults for a MNO-SD + self.decoded = OrderedDict() + self.decoded['usim-header'] = { 'mandated': None, 'identification': None} + self.decoded['templateID'] = str(oid.ADF_USIM_by_default_v2) + for fname in ['adf-usim', 'ef-imsi', 'ef-arr', 'ef-ust', 'ef-spn', 'ef-est', 'ef-acc', 'ef-ecc']: + self.decoded[fname] = [] + @property def adf_name(self) -> str: return b2h(self.decoded['adf-usim'][0][1]['dfName']) + @property def imsi(self) -> Optional[str]: f = File('ef-imsi', self.decoded['ef-imsi']) @@ -454,6 +576,19 @@ class ProfileElementISIM(ProfileElement): type = 'isim' + + def __init__(self, decoded: Optional[dict] = None): + super().__init__() + if decoded: + self.decoded = decoded + return + # provide some reasonable defaults for a MNO-SD + self.decoded = OrderedDict() + self.decoded['isim-header'] = { 'mandated': None, 'identification': None} + self.decoded['templateID'] = str(oid.ADF_ISIM_by_default) + for fname in ['adf-isim', 'ef-impi', 'ef-impu', 'ef-domain', 'ef-ist', 'ef-arr']: + self.decoded[fname] = [] + @property def adf_name(self) -> str: return b2h(self.decoded['adf-isim'][0][1]['dfName']) @@ -470,10 +605,16 @@ class ProfileElementSequence: """A sequence of ProfileElement objects, which is the overall representation of an eSIM profile.""" def __init__(self): - self.pe_list: List[ProfileElement] = None + self.pe_list: List[ProfileElement] = [] self.pe_by_type: Dict = {} self.pes_by_naa: Dict = {} + def append(self, pe: ProfileElement): + """Append a PE to the PE Sequence""" + self.pe_list.append(pe) + self._process_pelist() + self.renumber_identification() + def get_pes_for_type(self, tname: str) -> List[ProfileElement]: """Return list of profile elements present for given profile element type.""" return self.pe_by_type.get(tname, []) diff --git a/tests/test_esim_saip.py b/tests/test_esim_saip.py index a70c149..a43a139 100755 --- a/tests/test_esim_saip.py +++ b/tests/test_esim_saip.py @@ -63,6 +63,17 @@ # TODO: we don't actually test the results here, but we just verify there is no exception pes.to_der() + def test_constructor_encode(self): + """Test that DER-encoding of PE created by "empty" constructor works without raising exception.""" + for cls in [ProfileElementMF, ProfileElementPuk, ProfileElementPin, ProfileElementTelecom, + ProfileElementUSIM, ProfileElementISIM]: + with self.subTest(cls.__name__): + pes = ProfileElementSequence() + inst = cls() + pes.append(inst) + pes.to_der() + + if __name__ == "__main__": unittest.main() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37415?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I401bca16e58461333733877ec79102a5ae7fe410 Gerrit-Change-Number: 37415 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg
by pespin 08 Jul '24

08 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?usp=email ) Change subject: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg ...................................................................... deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg This will allow us using IPv6 in IPmsg_PT until [1] is mergedi upstream. [1] https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.SIPmsg/-/merge_req… Related: SYS#6982 Change-Id: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f --- M deps/Makefile 1 file changed, 18 insertions(+), 4 deletions(-) Approvals: osmith: Looks good to me, approved pespin: Verified Jenkins Builder: Verified diff --git a/deps/Makefile b/deps/Makefile index 11ff460..73d5919 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -56,7 +56,6 @@ titan.TestPorts.LANL2asp \ titan.TestPorts.PCAPasp \ titan.TestPorts.PIPEasp \ - titan.TestPorts.SIPmsg \ titan.TestPorts.TELNETasp \ titan.TestPorts.TCPasp \ titan.TestPorts.UDPasp \ @@ -71,8 +70,9 @@ OSMOGITEA_REPOS= titan.ProtocolModules.BSSMAP \ titan.ProtocolModules.MAP \ - titan.TestPorts.USB \ - titan.TestPorts.AF_PACKET + titan.TestPorts.AF_PACKET \ + titan.TestPorts.SIPmsg \ + titan.TestPorts.USB ALL_REPOS= $(ECLIPSEGITLAB_REPOS) \ $(OSMOGITHUB_REPOS) \ @@ -129,7 +129,7 @@ titan.TestPorts.PCAPasp_commit= R.8.A-3-g9ad320f titan.TestPorts.PIPEasp_commit= R.7.D-3-g8b01154 titan.TestPorts.SCTPasp_commit= R.11.A-8-g2e911c3 -titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0 +titan.TestPorts.SIPmsg_commit= b37ea251eff2d6cd4e8d317aff71d463863b59f9 titan.TestPorts.TCPasp_commit= R.9.A-5-g2c91bc6 titan.TestPorts.TELNETasp_commit= 873fe539642542cd9a901c208f1ec11c6d2f5387 titan.TestPorts.UDPasp_commit= 54176e95850654e5e8b0ffa2f1b5f35c412b949c -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?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: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f Gerrit-Change-Number: 37412 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg
by pespin 08 Jul '24

08 Jul '24
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?usp=email ) Change subject: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?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: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f Gerrit-Change-Number: 37412 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 08 Jul 2024 08:32:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg
by osmith 08 Jul '24

08 Jul '24
Attention is currently required from: laforge, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?usp=email ) Change subject: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg ...................................................................... Patch Set 2: Code-Review+2 (1 comment) File deps/Makefile: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412/comment/74119302_0498… PS1, Line 132: titan.TestPorts.SIPmsg_commit= osmocom/master > I suggest using a specific commit here, like in the other lines. […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?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: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f Gerrit-Change-Number: 37412 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 08 Jul 2024 08:32:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg
by pespin 08 Jul '24

08 Jul '24
Attention is currently required from: laforge, pespin. Hello Jenkins Builder, laforge, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg ...................................................................... deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg This will allow us using IPv6 in IPmsg_PT until [1] is mergedi upstream. [1] https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.SIPmsg/-/merge_req… Related: SYS#6982 Change-Id: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f --- M deps/Makefile 1 file changed, 18 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/37412/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?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: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f Gerrit-Change-Number: 37412 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg
by osmith 08 Jul '24

08 Jul '24
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?usp=email ) Change subject: deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg ...................................................................... Patch Set 1: (1 comment) File deps/Makefile: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412/comment/5389001e_2da5… PS1, Line 132: titan.TestPorts.SIPmsg_commit= osmocom/master I suggest using a specific commit here, like in the other lines. Otherwise it's not clear which commit is used at which time, which makes reproducing errors and bisect harder. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37412?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: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f Gerrit-Change-Number: 37412 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 08 Jul 2024 08:22:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in docker-playground[master]: ttcn3-asterisk: Allow running testsuite with IPv4 and IPv6 configs
by pespin 08 Jul '24

08 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37350?usp=email ) Change subject: ttcn3-asterisk: Allow running testsuite with IPv4 and IPv6 configs ...................................................................... ttcn3-asterisk: Allow running testsuite with IPv4 and IPv6 configs Requires [1] to be able to run SIPmsg_PT in Asterisk_Tests with IPv6 support. [1] https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.SIPmsg/-/merge_req… Related: SYS#6982 Change-Id: I1de922c681fef4d308898cd592544aef25901c7b --- M ttcn3-asterisk-ims-ue-test/jenkins.sh M ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh 2 files changed, 141 insertions(+), 51 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/ttcn3-asterisk-ims-ue-test/jenkins.sh b/ttcn3-asterisk-ims-ue-test/jenkins.sh index 2e10f76..cad25bd 100755 --- a/ttcn3-asterisk-ims-ue-test/jenkins.sh +++ b/ttcn3-asterisk-ims-ue-test/jenkins.sh @@ -1,5 +1,8 @@ #!/bin/sh +TEST_CONFIGS_ALL="ipv4 ipv6" +TEST_CONFIGS="${TEST_CONFIGS:-$TEST_CONFIGS_ALL}" + . ../jenkins-common.sh IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" docker_images_require \ @@ -10,62 +13,130 @@ set_clean_up_trap set -e -mkdir $VOL_BASE_DIR/dnsmasq -cp dnsmasq/* $VOL_BASE_DIR/dnsmasq/ +clean_up() { + local i + local log -mkdir $VOL_BASE_DIR/asterisk-ims-ue-tester -mkdir $VOL_BASE_DIR/asterisk-ims-ue-tester/unix -cp ttcn3/ttcn3.sh $VOL_BASE_DIR/asterisk-ims-ue-tester/ -cp ttcn3/Asterisk_Tests.cfg $VOL_BASE_DIR/asterisk-ims-ue-tester/ -write_mp_osmo_repo "$VOL_BASE_DIR/asterisk-ims-ue-tester/Asterisk_Tests.cfg" + # Add a suffix to the class names in the junit-xml log + for i in $TEST_CONFIGS; do + if [ "$i" = "all" ]; then + continue + fi -mkdir $VOL_BASE_DIR/asterisk -cp asterisk/* $VOL_BASE_DIR/asterisk/ + for log in "$VOL_BASE_DIR"/asterisk-ims-ue-tester-"$i"/junit-xml-*.log; do + if ! [ -e "$log" ]; then + continue + fi + sed -i "s/classname='\([^']\+\)'/classname='\1_$i'/g" "$log" + done + done +} + +# Start container with dnsmasq in background +start_dnsmasq() { + local test_config="$1" + echo Starting container with dnsmasq + docker run --rm \ + --cap-add=NET_ADMIN \ + $(docker_network_params $SUBNET $DNS_IP_SUFFIX) \ + --ulimit core=-1 \ + -v "$VOL_BASE_DIR/dnsmasq-${test_config}:/data" \ + --name ${BUILD_TAG}-dnsmasq -d \ + $DOCKER_ARGS \ + $REPO_USER/dnsmasq +} + +# Start container with Asterisk in background +start_asterisk() { + local test_config="$1" + echo Starting container with Asterisk + docker run --rm \ + --cap-add=NET_ADMIN \ + --cap-add=SYS_RESOURCE \ + $(docker_network_params $SUBNET $ASTERISK_IP_SUFFIX) \ + -e "DNS_IPADDR=${DNS_IPADDR}" \ + --ulimit core=-1 \ + -v "$VOL_BASE_DIR/asterisk-${test_config}:/data" \ + --name "${BUILD_TAG}-asterisk" -d \ + $DOCKER_ARGS \ + "$REPO_USER/asterisk-$IMAGE_SUFFIX" \ + /bin/sh -c "/data/asterisk.sh >/data/asterisk.console.log 2>&1" +} + +# Start docker container with testsuite in foreground +start_testsuite() { + local test_config="$1" + echo Starting container with Asterisk testsuite + docker run --rm \ + --cap-add=NET_ADMIN \ + --cap-add=SYS_RESOURCE \ + $(docker_network_params $SUBNET $TTCN3_IP_SUFFIX) \ + --ulimit core=-1 \ + -e "TTCN3_PCAP_PATH=/data" \ + -e "EXTRA_IPADDR=${EXTRA_IPADDR}" \ + -v "$VOL_BASE_DIR/asterisk-ims-ue-tester-${test_config}:/data" \ + --name "${BUILD_TAG}-ttcn3-asterisk-ims-ue-test" \ + $DOCKER_ARGS \ + "$REPO_USER/ttcn3-asterisk-ims-ue-test" \ + /data/ttcn3.sh +} network_create -network_replace_subnet_in_configs -SUBNET_IP_PREFIX="$SUB4_PREFIX.$SUBNET" -ASTERISK_IP_SUFFIX="10" -TTCN3_IP_SUFFIX="103" -IMSCORE_IP_SUFFIX="104" -DNS_IP_SUFFIX="200" -echo Starting container with dnsmasq -docker run --rm \ - --cap-add=NET_ADMIN \ - $(docker_network_params $SUBNET $DNS_IP_SUFFIX) \ - --ulimit core=-1 \ - -v $VOL_BASE_DIR/dnsmasq:/data \ - --name ${BUILD_TAG}-dnsmasq -d \ - $DOCKER_ARGS \ - $REPO_USER/dnsmasq +for i in $TEST_CONFIGS; do + if ! test_config_enabled "$i"; then + continue + fi -echo Starting container with Asterisk -docker run --rm \ - --cap-add=NET_ADMIN \ - --cap-add=SYS_RESOURCE \ - $(docker_network_params $SUBNET $ASTERISK_IP_SUFFIX) \ - -e "DNS_IPADDR=${SUBNET_IP_PREFIX}.${DNS_IP_SUFFIX}" \ - --ulimit core=-1 \ - -v $VOL_BASE_DIR/asterisk:/data \ - --name ${BUILD_TAG}-asterisk -d \ - $DOCKER_ARGS \ - $REPO_USER/asterisk-$IMAGE_SUFFIX \ - /bin/sh -c "/data/asterisk.sh >/data/asterisk.console.log 2>&1" + mkdir "${VOL_BASE_DIR}/dnsmasq-${i}" + cp dnsmasq/* "${VOL_BASE_DIR}/dnsmasq-${i}/" -# Leave some time for asterisk to start: -sleep 3 + mkdir "${VOL_BASE_DIR}/asterisk-ims-ue-tester-${i}" + mkdir "${VOL_BASE_DIR}/asterisk-ims-ue-tester-${i}/unix" + cp "ttcn3/ttcn3.sh" "${VOL_BASE_DIR}/asterisk-ims-ue-tester-${i}/" + cp "ttcn3/Asterisk_Tests.cfg" "${VOL_BASE_DIR}/asterisk-ims-ue-tester-${i}/" + write_mp_osmo_repo "${VOL_BASE_DIR}/asterisk-ims-ue-tester-${i}/Asterisk_Tests.cfg" -echo Starting container with Asterisk testsuite -docker run --rm \ - --cap-add=NET_ADMIN \ - --cap-add=SYS_RESOURCE \ - $(docker_network_params $SUBNET $TTCN3_IP_SUFFIX) \ - --ulimit core=-1 \ - -e "TTCN3_PCAP_PATH=/data" \ - -e "EXTRA_IPADDR=${SUBNET_IP_PREFIX}.${IMSCORE_IP_SUFFIX}/24" \ - -v $VOL_BASE_DIR/asterisk-ims-ue-tester:/data \ - --name ${BUILD_TAG}-ttcn3-asterisk-ims-ue-test \ - $DOCKER_ARGS \ - $REPO_USER/ttcn3-asterisk-ims-ue-test \ - /data/ttcn3.sh + mkdir "$VOL_BASE_DIR/asterisk-${i}" + cp asterisk/* "$VOL_BASE_DIR/asterisk-${i}/" + + network_replace_subnet_in_configs + ASTERISK_IP_SUFFIX="10" + TTCN3_IP_SUFFIX="103" + IMSCORE_IP_SUFFIX="104" + DNS_IP_SUFFIX="200" + + if [ "$i" = "ipv4" ]; then + NETMASK_PREFIX="24" + SUBNET_IP_PREFIX="$SUB4_PREFIX.$SUBNET" + DNS_IPADDR="${SUBNET_IP_PREFIX}.${DNS_IP_SUFFIX}" + EXTRA_IPADDR="${SUBNET_IP_PREFIX}.${IMSCORE_IP_SUFFIX}/${NETMASK_PREFIX}" + elif [ "$i" = "ipv6" ]; then + NETMASK_PREFIX="64" + SUBNET_IP_PREFIX="$SUB6_PREFIX:$SUBNET" + DNS_IPADDR="${SUBNET_IP_PREFIX}::${DNS_IP_SUFFIX}" + EXTRA_IPADDR="${SUBNET_IP_PREFIX}::${IMSCORE_IP_SUFFIX}/${NETMASK_PREFIX}" + + # Replace IPv4 addresses with IPv6 ones: + REPLACE_V4_TO_V6_EXPR="s,${SUB4_PREFIX}\.${SUBNET}\.,${SUB6_PREFIX}:${SUBNET}::,g" + REPLACE_V4_TO_V6_PORT_EXPR="s,${SUB4_PREFIX}\.${SUBNET}\.${ASTERISK_IP_SUFFIX}:,[${SUB6_PREFIX}:${SUBNET}::${ASTERISK_IP_SUFFIX}]:,g" + sed -i -E -e "${REPLACE_V4_TO_V6_EXPR}" "${VOL_BASE_DIR}/dnsmasq-${i}"/*.conf + sed -i -E -e "s,${SUB4_PREFIX}\.${SUBNET}\.${TTCN3_IP_SUFFIX}/24,${SUB6_PREFIX}:${SUBNET}::${TTCN3_IP_SUFFIX}/${NETMASK_PREFIX},g" "${VOL_BASE_DIR}/asterisk-${i}"/manager.conf + sed -i -E -e "s,${SUB4},${SUB6},g" "${VOL_BASE_DIR}/asterisk-${i}"/*.conf + sed -i -E -e "${REPLACE_V4_TO_V6_PORT_EXPR}" "${VOL_BASE_DIR}/asterisk-${i}"/*.conf + sed -i -E -e "${REPLACE_V4_TO_V6_EXPR}" "${VOL_BASE_DIR}/asterisk-${i}"/*.conf + sed -i -E -e "${REPLACE_V4_TO_V6_EXPR}" "${VOL_BASE_DIR}/asterisk-ims-ue-tester-${i}"/*.cfg + fi + + start_dnsmasq "$i" + start_asterisk "$i" + # Leave some time for asterisk to start: + sleep 5 + start_testsuite "$i" + + docker_kill_wait "$BUILD_TAG"-asterisk || true + docker_kill_wait "$BUILD_TAG"-dnsmasq || true + # For some reason we need to wait a bit until recreating dnsmasq docker, + # otherwise it says "container name X is already in use by container Y": + sleep 1 +done diff --git a/ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh b/ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh index 6c50af0..e1d4fac 100755 --- a/ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh +++ b/ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh @@ -9,4 +9,8 @@ ip addr add "${EXTRA_IPADDR}" dev eth0 +# https://bugzilla.redhat.com/show_bug.cgi?id=782042 +# IPv6 addresses may take an extra while to be available ('tentative' state): +while [ -n "$(ip -6 addr show tentative)" ]; do sleep 1; done + ttcn3-docker-run asterisk Asterisk_Tests -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37350?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: I1de922c681fef4d308898cd592544aef25901c7b Gerrit-Change-Number: 37350 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in docker-playground[master]: ttcn3-asterisk: Allow running testsuite with IPv4 and IPv6 configs
by osmith 08 Jul '24

08 Jul '24
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37350?usp=email ) Change subject: ttcn3-asterisk: Allow running testsuite with IPv4 and IPv6 configs ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37350?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: I1de922c681fef4d308898cd592544aef25901c7b Gerrit-Change-Number: 37350 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 08 Jul 2024 06:54:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-iuh[master]: support RAB Assignment in cn_ranap_rx_*_msg_co()
by neels 06 Jul '24

06 Jul '24
Attention is currently required from: laforge. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/37393?usp=email ) Change subject: support RAB Assignment in cn_ranap_rx_*_msg_co() ...................................................................... Patch Set 2: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-iuh/+/37393/comment/49ee9033_44a78c0a PS2, Line 20: Procedure", but doesn't > I always assumed that the "outcome" is for the "intermediate" responses and the final response would […] My humble conclusion is to just accept all the variants that an implementation could sensibly choose. There are no adverse effects AFAICT. Details: If an implementation were separating the outcomes by success/failure, each would have to be a separate RANAP PDU entirely: Below listings show how the [[un]successful]outcome is indicated once in the "top" of the RANAP PDU, and the RAB Assignment lists of actual detailed responses is deeper within that single PDU: ``` typedef struct RANAP_RANAP_PDU { RANAP_RANAP_PDU_PR present; union RANAP_RANAP_PDU_u { RANAP_InitiatingMessage_t initiatingMessage; RANAP_SuccessfulOutcome_t successfulOutcome; RANAP_UnsuccessfulOutcome_t unsuccessfulOutcome; RANAP_Outcome_t outcome; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } RANAP_RANAP_PDU_t; typedef struct RANAP_SuccessfulOutcome { RANAP_ProcedureCode_t procedureCode; --> "RAB Assignment" RANAP_Criticality_t criticality; ANY_t value; --> decoded to struct ranap_message /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } RANAP_SuccessfulOutcome_t; typedef struct ranap_message_s { uint8_t procedureCode; --> "RAB Assignment" uint8_t criticality; uint8_t direction; --> initiating/*outcome copied from RANAP_PDU union { ... RANAP_RAB_AssignmentRequestIEs_t raB_AssignmentRequestIEs; RANAP_RAB_AssignmentResponseIEs_t raB_AssignmentResponseIEs; ... } } typedef struct RANAP_RAB_AssignmentResponseIEs_s { uint16_t presenceMask; RANAP_RAB_SetupOrModifiedList_t raB_SetupOrModifiedList; ///< Optional field RANAP_RAB_ReleasedList_t raB_ReleasedList; ///< Optional field RANAP_RAB_QueuedList_t raB_QueuedList; ///< Optional field RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field RANAP_RAB_ReleaseFailedList_t raB_ReleaseFailedList; ///< Optional field RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field } RANAP_RAB_AssignmentResponseIEs_t; ``` A clear wording on which kind of outcome should be used doesn't seem to exist for Class 3, we only have this for Class 1: 3GPP TS 25.413 3.1: "[Class 1 EP...] Successful and Unsuccessful: - One signalling message reports both successful and unsuccessful outcome for the different included requests. The response message used is the one defined for successful outcome. " An implementation could assume the same for Class 3. Or they could return "outcome" for mixed outcomes. Or they could make it unsuccessful if >=1 items have failed... Each interpretation makes sense from different points of view. -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/37393?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: Ifec566a98cb6141d27b9e5e33d5a78f8b1530658 Gerrit-Change-Number: 37393 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Sat, 06 Jul 2024 14:55:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-iuh[master]: support RAB Assignment in cn_ranap_rx_*_msg_co()
by laforge 06 Jul '24

06 Jul '24
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/37393?usp=email ) Change subject: support RAB Assignment in cn_ranap_rx_*_msg_co() ...................................................................... Patch Set 2: Code-Review+1 (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-iuh/+/37393/comment/aa9aba01_b34723a3 PS2, Line 20: Procedure", but doesn't I always assumed that the "outcome" is for the "intermediate" responses and the final response would then be a "successfulOutcome" or an "unsuccessfulOutcome". So basically any rab assignment request would always see exactly one of either "successful" or "unsuccessful" outcome, plus 0..N "outcome". This is just my gut feeling of how I understand those type of 3GPP specs - I cannot give you a spec refrerence for it. -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/37393?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: Ifec566a98cb6141d27b9e5e33d5a78f8b1530658 Gerrit-Change-Number: 37393 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Sat, 06 Jul 2024 11:00:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.