osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34837?usp=email )
Change subject: scripts/repo-install-test: fix sftp compat
......................................................................
scripts/repo-install-test: fix sftp compat
When running scp, Debian 12 uses the SFTP protocol by default instead of
the legacy SCP protocol. For some reason, this means it doesn't create
the /repo-install-test directory inside QEMU:
+ … scp … -r scripts/repo-install-test root@127.0.0.1:/repo-install-test
Warning: Permanently added '[127.0.0.1]:22793' (ED25519) to the list of known hosts.
scp: realpath /repo-install-test: No such file
scp: upload "/repo-install-test": path canonicalization failed
scp: failed to upload directory scripts/repo-install-test to /repo-install-test
Changing to the legacy protocol with "scp -O" would make it work again,
but instead of doing that add the mkdir so it works with the new
protocol too.
Related: OS#6186
Change-Id: I740affad2ea794094c8faa89a89bcad094e0075d
---
M scripts/repo-install-test.sh
1 file changed, 25 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index 246d5e5..98f0176 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -153,6 +153,7 @@
EOF
qemu_ssh rm -rf /repo-install-test/
+ qemu_ssh mkdir /repo-install-test
qemu_scp -r "$TEST_DIR" "root@127.0.0.1:/repo-install-test"
TIMEOUT="1h" qemu_ssh sh -ex /repo-install-test/run-inside-env.sh
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34837?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I740affad2ea794094c8faa89a89bcad094e0075d
Gerrit-Change-Number: 34837
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34837?usp=email )
Change subject: scripts/repo-install-test: fix sftp compat
......................................................................
Patch Set 2:
(1 comment)
File scripts/repo-install-test.sh:
https://gerrit.osmocom.org/c/osmo-ci/+/34837/comment/18f95d05_d541e8af
PS2, Line 156: qemu_ssh mkdir /repo-install-test
> You could probably do it in one command to save some time, but it's fine otherwise. […]
Right, but not worth optimizing here. I find the current version slightly more readable.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34837?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I740affad2ea794094c8faa89a89bcad094e0075d
Gerrit-Change-Number: 34837
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 20 Oct 2023 12:25:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34821?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: GTPv2: Fix match of 15-digit IMSIs
......................................................................
GTPv2: Fix match of 15-digit IMSIs
15-digit IMSIs are len(imsi)=15, but decoded messages are
octet-aligned, hence the hexstring in messages is len(imsi)=16,
where the last hex char is a padding 'F'H.
* Make sure IMSIs stored in GTPv2_Emulation are padded to 16 digits (8
octets) to process matches easily.
* Update tr_ template to transparently adapt passed hexstrings to match
the octet-aligned value received from the wire.
Change-Id: Ie2f316ccb5bc69ec15e861616de4fd5babc4004e
---
M library/GTPv2_Emulation.ttcn
M library/GTPv2_Templates.ttcn
M library/Osmocom_Types.ttcn
3 files changed, 35 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/library/GTPv2_Emulation.ttcn b/library/GTPv2_Emulation.ttcn
index 571da4e..736dd03 100644
--- a/library/GTPv2_Emulation.ttcn
+++ b/library/GTPv2_Emulation.ttcn
@@ -602,6 +602,10 @@
};
function f_gtp2_register_imsi(hexstring imsi) runs on GTP2_ConnHdlr {
+ /* 15-digit IMSIs are len(imsi)=15, but decoded messages are
+ * octet-aligned, hence the hexstring in messages is len(imsi)=16, where
+ * the last hex char is a padding 'F'H */
+ imsi := f_pad_bcd_number(imsi);
GTP2_PROC.call(GTP2EM_register_imsi:{imsi}) {
[] GTP2_PROC.getreply(GTP2EM_register_imsi:{imsi});
}
diff --git a/library/GTPv2_Templates.ttcn b/library/GTPv2_Templates.ttcn
index b306955..e5022d8 100644
--- a/library/GTPv2_Templates.ttcn
+++ b/library/GTPv2_Templates.ttcn
@@ -126,7 +126,7 @@
lengthIndicator := ?,
instance := ?,
spare := '0000'B,
- iMSI_Value := imsi
+ iMSI_Value := f_pad_bcd_number_tmpl(imsi)
}
template (present) MSISDN ts_GTP2C_msisdn(template (present) hexstring msisdn) := {
diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index ef55583..d034a74 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -261,6 +261,18 @@
}
}
+function f_pad_bcd_number_tmpl(template hexstring inp) return template hexstring {
+ if (istemplatekind(inp, "omit")) {
+ return omit;
+ } else if (istemplatekind(inp, "*")) {
+ return *;
+ } else if (istemplatekind(inp, "?")) {
+ return ?;
+ } else {
+ return f_pad_bcd_number(valueof(inp));
+ }
+}
+
/* like L1SAP_IS_PACKET_RACH */
function ra_is_ps(OCT1 ra) return boolean {
if ((ra and4b 'F0'O == '70'O) and (ra and4b '0F'O != '0F'O)) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34821?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: Ie2f316ccb5bc69ec15e861616de4fd5babc4004e
Gerrit-Change-Number: 34821
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged