dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38941?usp=email )
Change subject: ts_31_102: fix testcase for EF_ePDGSelection
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
Unfortunately this fix has a chicken-egg problem. The code looks correct to me. I even verified one of the testcases with pen and paper. Everything should be correct.
However, the the build failure we see is in the pysim repository and I have fixed the testcases there now (see https://gerrit.osmocom.org/c/pysim/+/38941). The problem is that this of course only works with the fixed version of pyosmocom and the fixed version of pyosmocom only works with the fixed pysim.
My suggestion would be to remove the pysim test from jenkins.sh as this creates some kind of a circular dependency. I have inserted a patch before this one that does that, we can discuss about this in that patch then (see https://gerrit.osmocom.org/c/python/pyosmocom/+/38942)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38941?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I96fd4c13c8e58ef33ddf9e3124617b1b59b9b2c1
Gerrit-Change-Number: 38941
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 25 Nov 2024 17:46:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: JPM, fixeria, laforge.
dexter has posted comments on this change by JPM. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38687?usp=email )
Change subject: Fixing 3-digit MNC PlmnAdapter encoding & decoding, and related tests.
......................................................................
Patch Set 7:
(1 comment)
Patchset:
PS6:
Unfortunately this fix has a chicken-egg problem. The code looks correct to me. I even verified one of the testcases with pen and paper. Everything should be correct.
However, the the build failure we see is in the pysim repository and I have fixed the testcases there now (see https://gerrit.osmocom.org/c/pysim/+/38941). The problem is that this of course only works with the fixed version of pyosmocom and the fixed version of pyosmocom only works with the fixed pysim.
My suggestion would be to remove the pysim test from jenkins.sh as this creates some kind of a circular dependency. I can take care of this, if the reviewers are ok with that.
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38687?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I3811b227d629bd4e051a480c9622967e31f8a376
Gerrit-Change-Number: 38687
Gerrit-PatchSet: 7
Gerrit-Owner: JPM <jean-pierre.marcotte.1(a)ens.etsmtl.ca>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: JPM <jean-pierre.marcotte.1(a)ens.etsmtl.ca>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 25 Nov 2024 17:39:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38942?usp=email )
Change subject: contrib: remove pysim job from jenkins.sh
......................................................................
contrib: remove pysim job from jenkins.sh
The "pysim" job in jenkins.sh has the purpose to check if a change in pyosmocom
breaks some functionality in pysim. However, this check has a high risk of
creating some kind of circular dependency (chicken-egg problem) between
pyosmocom and pysim. The problem occurs when a fix/change in pyosmocom affects
the unittests-output of pysim. Then the pysim job will always fail and it is
also impossible to submit a complementary fix for pysim as well, since it will
always build against the non-fixed pyosmocom library.
So, let's remove the pysim job. In case we break functionality in pysim, we
will notice it through the nightly builds of pysim and we can take action
against the problem like we do it with all other osmocom projects.
Related: OS#6598
Change-Id: I5c625229bbfe3944521d3d835b74f20941d3922d
---
M contrib/jenkins.sh
1 file changed, 0 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom refs/changes/42/38942/1
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index e5f8147..78c7fb2 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -48,30 +48,6 @@
make -C "docs" publish publish-html
fi
;;
-"pysim")
- # Run the pysim tests with pyosmocom from this tree (OS#6570)
- virtualenv -p python3 venv --system-site-packages
- . venv/bin/activate
- pip install . --force-reinstall
- deactivate
-
- # Clone pysim and remove pyosmocom from requirements.txt, we want to
- # use the version that was just installed into the venv instead
- rm -rf pysim
- git clone https://gerrit.osmocom.org/pysim --depth=1 --branch=master
- cd pysim
- sed -i '/^pyosmocom>=.*/d' requirements.txt
- if grep -q pyosmocom requirements.txt; then
- cat requirements.txt
- set +x
- echo "ERROR: failed to remove pyosmocom from pysim's requirements.txt"
- exit 1
- fi
-
- # Let pysim enter the same venv and run the tests
- ln -s ../venv .
- SKIP_CLEAN_WORKSPACE=1 JOB_TYPE="test" contrib/jenkins.sh
- ;;
*)
set +x
echo "ERROR: JOB_TYPE has unexpected value '$JOB_TYPE'."
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38942?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I5c625229bbfe3944521d3d835b74f20941d3922d
Gerrit-Change-Number: 38942
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: JPM, fixeria, laforge.
dexter has uploaded a new patch set (#6) to the change originally created by JPM. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38687?usp=email )
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+2 by fixeria
Change subject: Fixing 3-digit MNC PlmnAdapter encoding & decoding, and related tests.
......................................................................
Fixing 3-digit MNC PlmnAdapter encoding & decoding, and related tests.
Related: pysim.git Ib2b586cb570dbe74a617c45c0fca276b08bb075e
Change-Id: I3811b227d629bd4e051a480c9622967e31f8a376
Depends: pysim.git: I3811b227d629bd4e051a480c9622967e31f8a376
Related: OS#6598
---
M src/osmocom/construct.py
M tests/test_construct.py
2 files changed, 19 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom refs/changes/87/38687/6
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38687?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I3811b227d629bd4e051a480c9622967e31f8a376
Gerrit-Change-Number: 38687
Gerrit-PatchSet: 6
Gerrit-Owner: JPM <jean-pierre.marcotte.1(a)ens.etsmtl.ca>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: JPM <jean-pierre.marcotte.1(a)ens.etsmtl.ca>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38941?usp=email )
Change subject: ts_31_102: fix testcase for EF_ePDGSelection
......................................................................
ts_31_102: fix testcase for EF_ePDGSelection
the testcase EF_ePDGSelection has a wrong testvector in the plmn field.
This test vector is accepted because there is a complementary error in
pyosmocom. However, the root problem got fixed (see depends), which means
that the test vector of EF_ePDGSelection now needs to be updated.
Depends: pyosmocom.git: I3811b227d629bd4e051a480c9622967e31f8a376
Change-Id: I96fd4c13c8e58ef33ddf9e3124617b1b59b9b2c1
Related: OS#6598
---
M pySim/ts_31_102.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/41/38941/1
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index 636cf37..20aa08f 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -875,7 +875,7 @@
class EF_ePDGSelection(TransparentEF):
_test_de_encode = [
( '800600f110000100', {'e_pdg_selection': [{'plmn': '001-01', 'epdg_priority': 1, 'epdg_fqdn_format': 'operator_identified' }] }),
- ( '800600011000a001', {'e_pdg_selection': [{'plmn': '001-001', 'epdg_priority': 160, 'epdg_fqdn_format': 'location_based' }] }),
+ ( '800600011000a001', {'e_pdg_selection': [{'plmn': '001-010', 'epdg_priority': 160, 'epdg_fqdn_format': 'location_based' }] }),
]
class ePDGSelection(BER_TLV_IE, tag=0x80):
_construct = GreedyRange(Struct('plmn'/PlmnAdapter(Bytes(3)),
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38941?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I96fd4c13c8e58ef33ddf9e3124617b1b59b9b2c1
Gerrit-Change-Number: 38941
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38925?usp=email )
Change subject: stream_cli: Move osmo_stream_cli_close() before osmo_stream_cli_reconnect()
......................................................................
stream_cli: Move osmo_stream_cli_close() before osmo_stream_cli_reconnect()
The reconnect function is also calling the disconnect_cb() callback
through making use of osmo_stream_cli_close().
Hence, put the close() function further up in the file following the
dependency chaing, allowing removal of an extra declaration.
It also helps in seeing the whole related code together.
Furthermore, those functions will be split in a follow-up commit into
private helper functions so the order will become more relevant due to
being static and not appearing in a header file.
Change-Id: Ib7a7655f6a8aa45793ad8a43961f161c74d22e33
---
M src/stream_cli.c
1 file changed, 39 insertions(+), 41 deletions(-)
Approvals:
Jenkins Builder: Verified
daniel: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/stream_cli.c b/src/stream_cli.c
index b7ca9fd..9fc8101 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -116,51 +116,10 @@
struct osmo_sock_init2_multiaddr_pars ma_pars;
};
-void osmo_stream_cli_close(struct osmo_stream_cli *cli);
-
/*! \addtogroup stream_cli
* @{
*/
-/*! Re-connect an Osmocom Stream Client.
- * If re-connection is enabled for this client
- * (which is the case unless negative timeout was explicitly set via osmo_stream_cli_set_reconnect_timeout() call),
- * we close any existing connection (if any) and schedule a re-connect timer */
-void osmo_stream_cli_reconnect(struct osmo_stream_cli *cli)
-{
- osmo_stream_cli_close(cli);
-
- if (cli->reconnect_timeout < 0) {
- LOGSCLI(cli, LOGL_INFO, "not reconnecting, disabled\n");
- return;
- }
-
- cli->state = STREAM_CLI_STATE_WAIT_RECONNECT;
- LOGSCLI(cli, LOGL_INFO, "retrying reconnect in %d seconds...\n",
- cli->reconnect_timeout);
- osmo_timer_schedule(&cli->timer, cli->reconnect_timeout, 0);
-}
-
-/*! Check if Osmocom Stream Client is in connected state.
- * \param[in] cli Osmocom Stream Client
- * \return true if connected, false otherwise
- */
-bool osmo_stream_cli_is_connected(struct osmo_stream_cli *cli)
-{
- return cli->state == STREAM_CLI_STATE_CONNECTED;
-}
-
-/*! Check if Osmocom Stream Client is opened (has an FD available) according to
- * its current state.
- * \param[in] cli Osmocom Stream Client
- * \return true if fd is available (osmo_stream_cli_get_fd()), false otherwise
- */
-static bool stream_cli_is_opened(const struct osmo_stream_cli *cli)
-{
- return cli->state == STREAM_CLI_STATE_CONNECTING ||
- cli->state == STREAM_CLI_STATE_CONNECTED;
-}
-
static void stream_cli_close_iofd(struct osmo_stream_cli *cli)
{
if (!cli->iofd)
@@ -219,6 +178,45 @@
}
}
+/*! Re-connect an Osmocom Stream Client.
+ * If re-connection is enabled for this client
+ * (which is the case unless negative timeout was explicitly set via osmo_stream_cli_set_reconnect_timeout() call),
+ * we close any existing connection (if any) and schedule a re-connect timer */
+void osmo_stream_cli_reconnect(struct osmo_stream_cli *cli)
+{
+ osmo_stream_cli_close(cli);
+
+ if (cli->reconnect_timeout < 0) {
+ LOGSCLI(cli, LOGL_INFO, "not reconnecting, disabled\n");
+ return;
+ }
+
+ cli->state = STREAM_CLI_STATE_WAIT_RECONNECT;
+ LOGSCLI(cli, LOGL_INFO, "retrying reconnect in %d seconds...\n",
+ cli->reconnect_timeout);
+ osmo_timer_schedule(&cli->timer, cli->reconnect_timeout, 0);
+}
+
+/*! Check if Osmocom Stream Client is in connected state.
+ * \param[in] cli Osmocom Stream Client
+ * \return true if connected, false otherwise
+ */
+bool osmo_stream_cli_is_connected(struct osmo_stream_cli *cli)
+{
+ return cli->state == STREAM_CLI_STATE_CONNECTED;
+}
+
+/*! Check if Osmocom Stream Client is opened (has an FD available) according to
+ * its current state.
+ * \param[in] cli Osmocom Stream Client
+ * \return true if fd is available (osmo_stream_cli_get_fd()), false otherwise
+ */
+static bool stream_cli_is_opened(const struct osmo_stream_cli *cli)
+{
+ return cli->state == STREAM_CLI_STATE_CONNECTING ||
+ cli->state == STREAM_CLI_STATE_CONNECTED;
+}
+
/*! Retrieve file descriptor of the stream client socket.
* \param[in] cli Stream Client of which we want to obtain the file descriptor
* \returns File descriptor or negative in case of error */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38925?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib7a7655f6a8aa45793ad8a43961f161c74d22e33
Gerrit-Change-Number: 38925
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38925?usp=email )
Change subject: stream_cli: Move osmo_stream_cli_close() before osmo_stream_cli_reconnect()
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38925?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib7a7655f6a8aa45793ad8a43961f161c74d22e33
Gerrit-Change-Number: 38925
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 25 Nov 2024 16:35:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38882?usp=email )
Change subject: Osmocom_CTRL_Functions.ttcn: Use Misc_Helpers.f_shutdown() everywhere
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File library/Osmocom_CTRL_Functions.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38882/comment/0fb3ea42_909e… :
PS2, Line 47: log2str
> I don't like using `f_shutdown()` for setting the testcase verdict, so no CR+1 from me, sorry.
What's the reason there? Because it gets in the way of searching for setverdict() in the code?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38882?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3b11a4dee35da89b2fec0cc66021dd57db04beb4
Gerrit-Change-Number: 38882
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 25 Nov 2024 16:34:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>