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

January 2025

  • 1 participants
  • 1491 discussions
[XS] Change in upf-benchmark[master]: osmo-upf-load-gen: Improve VTY command helper strings
by pespin 27 Jan '25

27 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/upf-benchmark/+/39420?usp=email ) Change subject: osmo-upf-load-gen: Improve VTY command helper strings ...................................................................... osmo-upf-load-gen: Improve VTY command helper strings Change-Id: I69701e875f5c38f434265d93a047c8157daffd29 --- M src/osmo-upf-load-gen/pfcp_tool_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/upf-benchmark refs/changes/20/39420/1 diff --git a/src/osmo-upf-load-gen/pfcp_tool_vty.c b/src/osmo-upf-load-gen/pfcp_tool_vty.c index b153072..8f488c7 100644 --- a/src/osmo-upf-load-gen/pfcp_tool_vty.c +++ b/src/osmo-upf-load-gen/pfcp_tool_vty.c @@ -189,7 +189,7 @@ DEFUN(c_gtp_local, c_gtp_local_cmd, "gtp local IP_ADDR [<1-65535>]", GTP_STR - "Add a local GTP port, to emit GTP traffic from\n" + "Add a local GTP port, to emit GTP1U traffic from\n" IP_ADDR_STR "Specific UDP port to use, 2152 if omitted\n") { @@ -219,7 +219,7 @@ DEFUN(c_gtp_core, c_gtp_core_cmd, "gtp core IP_ADDR [<1-65535>]", GTP_STR - "Add a core GTP port, to emit GTP traffic from\n" + "Add a core GTP port, to emit GTP1U traffic to\n" IP_ADDR_STR "Specific UDP port to use, 2152 if omitted\n") { -- To view, visit https://gerrit.osmocom.org/c/upf-benchmark/+/39420?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: upf-benchmark Gerrit-Branch: master Gerrit-Change-Id: I69701e875f5c38f434265d93a047c8157daffd29 Gerrit-Change-Number: 39420 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in upf-benchmark[master]: osmo-upf-load-gen: Add vty cmd to skip binding local GTPU ports
by pespin 27 Jan '25

27 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/upf-benchmark/+/39421?usp=email ) Change subject: osmo-upf-load-gen: Add vty cmd to skip binding local GTPU ports ...................................................................... osmo-upf-load-gen: Add vty cmd to skip binding local GTPU ports This is useful when osmo-upf-load-gen is used only to generate the PFCP sessions acting solely as SMF. Change-Id: Idc6e013d6c7de24889bc500625707c5b5cc1766b --- M include/osmocom/upfloadgen/pfcp_tool.h M src/osmo-upf-load-gen/pfcp_tool.c M src/osmo-upf-load-gen/pfcp_tool_vty.c 3 files changed, 33 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/upf-benchmark refs/changes/21/39421/1 diff --git a/include/osmocom/upfloadgen/pfcp_tool.h b/include/osmocom/upfloadgen/pfcp_tool.h index 2c50490..e13c1aa 100644 --- a/include/osmocom/upfloadgen/pfcp_tool.h +++ b/include/osmocom/upfloadgen/pfcp_tool.h @@ -136,6 +136,8 @@ /* list of struct udp_port */ struct llist_head gtp_local_addrs; struct udp_port *gtp_local_addrs_next; + /* Whether to create and bind sockets for addresses above: */ + bool do_local_gtpu_bind; /* list of struct udp_port */ struct llist_head gtp_core_addrs; @@ -183,7 +185,7 @@ uint32_t pfcp_tool_new_teid(void); int pfcp_tool_next_ue_addr(struct osmo_sockaddr *dst); -struct udp_port *pfcp_tool_have_local_udp_port_by_str(const struct osmo_sockaddr_str *addr, uint16_t fallback_port); +struct udp_port *pfcp_tool_have_local_udp_port_by_str(const struct osmo_sockaddr_str *addr, uint16_t fallback_port, bool do_bind); struct udp_port *pfcp_tool_have_core_udp_port_by_str(const struct osmo_sockaddr_str *addr, uint16_t fallback_port); void pfcp_tool_gtp_flood_start(void); diff --git a/src/osmo-upf-load-gen/pfcp_tool.c b/src/osmo-upf-load-gen/pfcp_tool.c index ba4ce6b..b634822 100644 --- a/src/osmo-upf-load-gen/pfcp_tool.c +++ b/src/osmo-upf-load-gen/pfcp_tool.c @@ -21,6 +21,7 @@ * */ +#include <stdbool.h> #include <errno.h> #include <netinet/in.h> @@ -50,15 +51,18 @@ .local_port = OSMO_PFCP_PORT, }, .next_teid_state = 23, - .gtp.flood = { - .cfg = { - .num_rx_workers = 1, - .num_tx_workers = 1, - .queue_size = 4096, - .slew_us = 0, + .gtp = { + .do_local_gtpu_bind = true, + .flood = { + .cfg = { + .num_rx_workers = 1, + .num_tx_workers = 1, + .queue_size = 4096, + .slew_us = 0, + }, + .flows_per_session = 1, + .packets_per_flow = 0, }, - .flows_per_session = 1, - .packets_per_flow = 0, }, }; @@ -253,12 +257,12 @@ return pfcp_tool_have_udp_port_by_osa(list, &osa, fallback_port); } -struct udp_port *pfcp_tool_have_local_udp_port_by_osa(const struct osmo_sockaddr *osa, uint16_t fallback_port) +static struct udp_port *pfcp_tool_have_local_udp_port_by_osa(const struct osmo_sockaddr *osa, uint16_t fallback_port, bool do_bind) { struct udp_port *port = pfcp_tool_have_udp_port_by_osa(&g_pfcp_tool->gtp.gtp_local_addrs, osa, fallback_port); /* already bound? */ - if (port->ofd.fd >= 0) + if (!do_bind || port->ofd.fd >= 0) return port; /* create and bind socket */ @@ -290,15 +294,15 @@ return port; } -struct udp_port *pfcp_tool_have_local_udp_port_by_str(const struct osmo_sockaddr_str *addr, uint16_t fallback_port) +struct udp_port *pfcp_tool_have_local_udp_port_by_str(const struct osmo_sockaddr_str *addr, uint16_t fallback_port, bool do_bind) { struct osmo_sockaddr osa; if (osmo_sockaddr_str_to_osa(addr, &osa)) return NULL; - return pfcp_tool_have_local_udp_port_by_osa(&osa, fallback_port); + return pfcp_tool_have_local_udp_port_by_osa(&osa, fallback_port, do_bind); } -struct udp_port *pfcp_tool_have_core_udp_port_by_osa(const struct osmo_sockaddr *osa, uint16_t fallback_port) +static struct udp_port *pfcp_tool_have_core_udp_port_by_osa(const struct osmo_sockaddr *osa, uint16_t fallback_port) { return pfcp_tool_have_udp_port_by_osa(&g_pfcp_tool->gtp.gtp_core_addrs, osa, fallback_port); } @@ -336,7 +340,7 @@ * of view: so the GTP port of osmo-upf-load-gen is 'remote'. * Here we are setting up a port to emit GTP from osmo-upf-load-gen, the same port is called 'gtp_local'. */ - cfg.gtp_local = pfcp_tool_have_local_udp_port_by_str(&tun_access->remote.addr, 2152); + cfg.gtp_local = pfcp_tool_have_local_udp_port_by_str(&tun_access->remote.addr, 2152, true); if (!cfg.gtp_local) { LOGP(DLGLOBAL, LOGL_ERROR, "Cannot set up GTP flow for session, failed to setup local GTP port\n"); return false; diff --git a/src/osmo-upf-load-gen/pfcp_tool_vty.c b/src/osmo-upf-load-gen/pfcp_tool_vty.c index 8f488c7..5af9dfe 100644 --- a/src/osmo-upf-load-gen/pfcp_tool_vty.c +++ b/src/osmo-upf-load-gen/pfcp_tool_vty.c @@ -186,6 +186,16 @@ #define GTP_IP_STR "Add a GTP IP address\n" #define IP_ADDR_STR "IP address, 1.2.3.4 or 1:2:3:4::1\n" +DEFUN(c_no_gtp_local_bind, no_gtp_local_bind_cmd, + "no gtp local bind", + NO_STR GTP_STR + "Add a local GTP port, to emit GTP1U traffic from\n" + "Create and bind sockets with desigend IP address\n") +{ + g_pfcp_tool->gtp.do_local_gtpu_bind = false; + return CMD_SUCCESS; +} + DEFUN(c_gtp_local, c_gtp_local_cmd, "gtp local IP_ADDR [<1-65535>]", GTP_STR @@ -206,7 +216,7 @@ if (osmo_sockaddr_str_from_str(&addr_str, ip_str, port_nr)) goto invalid_ip; vty_out(vty, "local GTP port: " OSMO_SOCKADDR_STR_FMT "%s", OSMO_SOCKADDR_STR_FMT_ARGS_NOT_NULL(&addr_str), VTY_NEWLINE); - p = pfcp_tool_have_local_udp_port_by_str(&addr_str, port_nr); + p = pfcp_tool_have_local_udp_port_by_str(&addr_str, port_nr, g_pfcp_tool->gtp.do_local_gtpu_bind); if (!p) goto invalid_ip; return CMD_SUCCESS; @@ -1481,6 +1491,7 @@ install_element(SESSION_NODE, &s_f_teid_cmd); install_element(SESSION_NODE, &s_f_teid_choose_cmd); + install_ve_and_config(&no_gtp_local_bind_cmd); install_ve_and_config(&c_gtp_local_cmd); install_ve_and_config(&c_gtp_core_cmd); install_ve_and_config(&c_ue_ip_range_cmd); -- To view, visit https://gerrit.osmocom.org/c/upf-benchmark/+/39421?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: upf-benchmark Gerrit-Branch: master Gerrit-Change-Id: Idc6e013d6c7de24889bc500625707c5b5cc1766b Gerrit-Change-Number: 39421 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: tests/osmo_io: Rework test_file()
by pespin 27 Jan '25

27 Jan '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39411?usp=email ) Change subject: tests/osmo_io: Rework test_file() ...................................................................... tests/osmo_io: Rework test_file() The amount of read and write on each callback is actually not really managed by us but by the kernel. Instead of validating the amount of read/write callbacks, monitor the amount of read/write bytes (and also make sure the received a final read with len=0 to signal EOF). Add fflush(stdout) before calling ASSERT to make sure stdout is flushed before terminating the program. Related: OS#6708 Change-Id: Ie1e686b407532eee76a8692dfc632af73183e614 --- M tests/osmo_io/osmo_io_test.c 1 file changed, 23 insertions(+), 13 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c index 82de564..d072ebe 100644 --- a/tests/osmo_io/osmo_io_test.c +++ b/tests/osmo_io/osmo_io_test.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdint.h> +#include <stdbool.h> #include <stdlib.h> #include <unistd.h> #include <string.h> @@ -45,18 +46,23 @@ static void *ctx = NULL; -static unsigned file_read_wr_compl_counter = 0; +static unsigned file_bytes_read = 0; +static unsigned file_bytes_write_compl = 0; +static bool file_eof_read = false; static void file_read_cb(struct osmo_io_fd *iofd, int rc, struct msgb *msg) { printf("%s: read() msg with rc=%d\n", osmo_iofd_get_name(iofd), rc); if (rc < 0) printf("%s: error: %s\n", osmo_iofd_get_name(iofd), strerror(-rc)); - if (msg) + if (msg) { printf("%s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); - file_read_wr_compl_counter++; - talloc_free(msg); - if (rc == 0) + file_bytes_read += msgb_length(msg); + talloc_free(msg); + } + if (rc == 0) { + file_eof_read = true; osmo_iofd_close(iofd); + } } static void file_write_cb(struct osmo_io_fd *iofd, int rc, struct msgb *msg) @@ -64,9 +70,10 @@ printf("%s: write() returned rc=%d\n", osmo_iofd_get_name(iofd), rc); if (rc < 0) printf("%s: error: %s\n", osmo_iofd_get_name(iofd), strerror(-rc)); - if (msg) + if (msg) { printf("%s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); - file_read_wr_compl_counter++; + file_bytes_write_compl += msgb_length(msg); + } } static void test_file(void) @@ -97,12 +104,13 @@ osmo_iofd_write_msgb(iofd, msg); /* Allow enough cycles to handle the messages */ for (int i = 0; i < 128; i++) { - OSMO_ASSERT(file_read_wr_compl_counter <= 1); - if (file_read_wr_compl_counter == 1) + OSMO_ASSERT(file_bytes_write_compl <= sizeof(TESTDATA)); + if (file_bytes_write_compl == sizeof(TESTDATA)) break; osmo_select_main(1); } - OSMO_ASSERT(file_read_wr_compl_counter == 1); + fflush(stdout); + OSMO_ASSERT(file_bytes_write_compl == sizeof(TESTDATA)); /* Now, re-configure iofd to only read from the fd. Adjust the read/write offset beforehand: */ printf("Enable read\n"); @@ -113,12 +121,14 @@ OSMO_ASSERT(rc == 0); /* Allow enough cycles to handle the message. We expect 2 reads, 2nd read will return 0. */ for (int i = 0; i < 128; i++) { - OSMO_ASSERT(file_read_wr_compl_counter <= 3); - if (file_read_wr_compl_counter == 3) + OSMO_ASSERT(file_bytes_read <= sizeof(TESTDATA)); + if (file_bytes_read == sizeof(TESTDATA) && file_eof_read) break; osmo_select_main(1); } - OSMO_ASSERT(file_read_wr_compl_counter == 3); + fflush(stdout); + OSMO_ASSERT(file_bytes_read == sizeof(TESTDATA)); + OSMO_ASSERT(file_eof_read); osmo_iofd_free(iofd); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39411?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie1e686b407532eee76a8692dfc632af73183e614 Gerrit-Change-Number: 39411 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: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: tests/osmo_io: Rework test_file()
by fixeria 27 Jan '25

27 Jan '25
Attention is currently required from: daniel, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39411?usp=email ) Change subject: tests/osmo_io: Rework test_file() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39411?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie1e686b407532eee76a8692dfc632af73183e614 Gerrit-Change-Number: 39411 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Mon, 27 Jan 2025 18:18:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-upf[master]: Improve logging reading packets from gtp device
by pespin 27 Jan '25

27 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/39419?usp=email ) Change subject: Improve logging reading packets from gtp device ...................................................................... Improve logging reading packets from gtp device Change-Id: Ic3d9ea319122acbaf99ca7d6ff615b5812a085f8 --- M src/osmo-upf/upf_gtpu_echo.c 1 file changed, 19 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/19/39419/1 diff --git a/src/osmo-upf/upf_gtpu_echo.c b/src/osmo-upf/upf_gtpu_echo.c index f4bbb76..ae370e6 100644 --- a/src/osmo-upf/upf_gtpu_echo.c +++ b/src/osmo-upf/upf_gtpu_echo.c @@ -13,8 +13,12 @@ #define GTP1U_PORT 2152 enum gtp1u_msgt { - GTP1U_MSGTYPE_ECHO_REQ = 1, - GTP1U_MSGTYPE_ECHO_RSP = 2, + GTP1U_MSGTYPE_ECHO_REQ = 1, + GTP1U_MSGTYPE_ECHO_RSP = 2, + GTP1U_MSGTYPE_ERRR_IND = 26, + GTP1U_MSGTYPE_SUPP_EXT_HDR_NOTIF = 31, + GTP1U_MSGTYPE_END_MARKER = 254, + GTP1U_MSGTYPE_GPDU = 255, }; enum gtp1u_iei { @@ -159,7 +163,7 @@ return rc; } -int upf_gtpu_echo_read_cb(struct osmo_fd *ofd, unsigned int what) +int upf_gtpu_read_cb(struct osmo_fd *ofd, unsigned int what) { struct upf_gtp_dev *dev = ofd->data; @@ -208,8 +212,18 @@ case GTP1U_MSGTYPE_ECHO_RSP: rx_echo_resp(dev, &remote, h, sz); return 0; + case GTP1U_MSGTYPE_ERRR_IND: + /* 3GPP TS 29.281 7.3.1: Log "Tunnel Endpoint Identifier Data I" and "GTP-U Peer Address" */ + LOG_GTP_DEV(dev, LOGL_NOTICE, "%s rx: GTPv1-U Error Indication not supported\n", + osmo_sockaddr_to_str(&remote)); + return 0; + case GTP1U_MSGTYPE_GPDU: + LOG_GTP_DEV(dev, LOGL_NOTICE, "%s rx: GTPv1-U PDU TEID=0x%08x over slow path not supported\n", + osmo_sockaddr_to_str(&remote), osmo_load32be(&h->tei)); + return 0; default: - LOG_GTP_DEV(dev, LOGL_ERROR, "rx: GTPv1-U message type %u not supported\n", h->msg_type); + LOG_GTP_DEV(dev, LOGL_ERROR, "%s rx: GTPv1-U message type %u not supported\n", + osmo_sockaddr_to_str(&remote), h->msg_type); return -1; } } @@ -226,7 +240,7 @@ /* make sure there is no cb yet that this would be replacing. */ OSMO_ASSERT(dev->gtpv1.ofd.cb == NULL); - dev->gtpv1.ofd.cb = upf_gtpu_echo_read_cb; + dev->gtpv1.ofd.cb = upf_gtpu_read_cb; dev->gtpv1.ofd.data = dev; return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/39419?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ic3d9ea319122acbaf99ca7d6ff615b5812a085f8 Gerrit-Change-Number: 39419 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmocore[master]: utils/osmo-install-dbg-pkgs: new script
by pespin 27 Jan '25

27 Jan '25
Attention is currently required from: fixeria, osmith. pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libosmocore/+/39418?usp=email ) Change subject: utils/osmo-install-dbg-pkgs: new script ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File debian/rules: https://gerrit.osmocom.org/c/libosmocore/+/39418/comment/df6d8906_f691646a?… : PS1, Line 22: install -Dm755 utils/osmo-install-dbg-pkgs.py \ Better add a comment explaining why is this done here instead of in .install (to be able to remove the .py) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39418?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I903cef0a3e358701d14dcf1980fe0f8d5d5b4d62 Gerrit-Change-Number: 39418 Gerrit-PatchSet: 1 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-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 27 Jan 2025 15:21:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmocore[master]: utils/osmo-install-dbg-pkgs: new script
by osmith 27 Jan '25

27 Jan '25
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39418?usp=email ) Change subject: utils/osmo-install-dbg-pkgs: new script ...................................................................... utils/osmo-install-dbg-pkgs: new script Add a script that automatically figures out the debug packages for installed Osmocom programs, libraries and their dependencies, and installs them. Install the script via debian/rules instead of debian/libosmocore-utils.install, so it is possible to install to /usr/bin/osmo-install-dbg-pkgs (without ".py" at the end). Related: SYS#7224 Change-Id: I903cef0a3e358701d14dcf1980fe0f8d5d5b4d62 --- M debian/control M debian/rules A utils/osmo-install-dbg-pkgs.py 3 files changed, 145 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/39418/1 diff --git a/debian/control b/debian/control index ae8900f..5689b3d 100644 --- a/debian/control +++ b/debian/control @@ -405,6 +405,7 @@ Architecture: any Section: utils Depends: ${shlibs:Depends}, + python3, libosmocore, ${misc:Depends} Multi-Arch: same diff --git a/debian/rules b/debian/rules index db97497..66546e1 100755 --- a/debian/rules +++ b/debian/rules @@ -19,6 +19,8 @@ override_dh_install: sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'` + install -Dm755 utils/osmo-install-dbg-pkgs.py \ + debian/libosmocore-utils/usr/bin/osmo-install-dbg-pkgs dh_install # Print test results in case of a failure diff --git a/utils/osmo-install-dbg-pkgs.py b/utils/osmo-install-dbg-pkgs.py new file mode 100755 index 0000000..e4ef5ea --- /dev/null +++ b/utils/osmo-install-dbg-pkgs.py @@ -0,0 +1,142 @@ +#!/usr/bin/env python3 +# Copyright 2025 sysmocom - s.f.m.c. GmbH +# SPDX-License-Identifier: GPL-2.0-or-later +import argparse +import copy +import os +import shutil +import string +import subprocess +import sys + +args = None + + +def parse_arguments(): + global args + + parser = argparse.ArgumentParser( + description="Install debug packages for all installed Osmocom packages and dependencies" + ) + parser.add_argument( + "-y", + "--yes", + action="store_true", + help="run non-interactively", + ) + args = parser.parse_args() + + +def check_package_manager(): + rel = "/etc/os-release" + + if not os.path.exists(rel): + print(f"ERROR: {rel} does not exist") + sys.exit(1) + + with open(rel) as f: + for line in f: + if "ID=debian" in line or "ID_LIKE=debian" in line: + return + + print("ERROR: only 'apt' is supported by this script") + sys.exit(1) + + +def check_requirements(): + if not shutil.which("apt-rdepends"): + print("ERROR: please install apt-rdepends first:") + print(" apt install apt-rdepends") + sys.exit(1) + + +def get_installed_osmocom_packages(): + """Get installed Osmocom packages by parsing 'dpkg -l' output. Lines with + installed packages look like this: 'ii libosmocore22:amd64 ...'""" + ret = set() + p = subprocess.run(["dpkg", "-l"], capture_output=True, text=True, check=True) + lines = p.stdout.split("\n") + + for line in lines: + if not line.startswith("ii "): + continue + package = line.split(" ", 4)[2].split(":", 1)[0] + if package.startswith("osmo-") or package.startswith("libosmo"): + ret.add(package) + + return ret + + +def get_recursive_dependencies(pkgs): + """Iterate over apt-rdepends output, it looks like: + osmo-mgw + Depends: libc6 (>= 2.34) + Depends: libosmoabis13""" + ret = copy.copy(pkgs) + + p = subprocess.run(["apt-rdepends"] + list(pkgs), capture_output=True, text=True, check=True) + lines = p.stdout.split("\n") + for line in lines: + if not line.startswith(" Depends: "): + continue + ret.add(line.strip().split(" ", 3)[1]) + + return ret + + +def get_debug_pkgs(): + p = subprocess.run("apt-cache pkgnames | grep -- -dbg", shell=True, text=True, capture_output=True) + return p.stdout.split("\n") + + +def get_debug_pkgs_relevant(debug_pkgs, pkgs_with_deps): + ret = [] + for pkg in pkgs_with_deps: + names = [f"{pkg}-dbg", f"{pkg}-dbgsym"] + + pkg_nodigits = pkg.rstrip(string.digits) + if pkg != pkg_nodigits: + names += [f"{pkg_nodigits}-dbg", f"{pkg_nodigits}-dbgsym"] + + for name in names: + if name in debug_pkgs: + ret += [name] + break + + return ret + + +def install_packages(pkgs): + cmd = [] + if os.geteuid() != 0: + cmd += ["sudo"] + cmd += ["apt", "install"] + if args.yes: + cmd += ["-y"] + cmd += pkgs + + print(f"+ {cmd}") + p = subprocess.run(cmd) + sys.exit(p.returncode) + + +def main(): + parse_arguments() + check_package_manager() + check_requirements() + + print("Getting installed Osmocom packages...") + pkgs = get_installed_osmocom_packages() + print("Getting dependencies of installed Osmocom packages...") + pkgs_with_deps = get_recursive_dependencies(pkgs) + print("Getting available debug packages...") + debug_pkgs = get_debug_pkgs() + print("Getting relevant debug packages...") + debug_pkgs_relevant = get_debug_pkgs_relevant(debug_pkgs, pkgs_with_deps) + debug_pkgs_relevant = sorted(list(debug_pkgs_relevant)) + + print("Running apt install...") + install_packages(debug_pkgs_relevant) + + +main() -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39418?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I903cef0a3e358701d14dcf1980fe0f8d5d5b4d62 Gerrit-Change-Number: 39418 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: tests/osmo_io: Rework test_file()
by osmith 27 Jan '25

27 Jan '25
Attention is currently required from: daniel, fixeria, pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39411?usp=email ) Change subject: tests/osmo_io: Rework test_file() ...................................................................... Patch Set 2: Code-Review+1 (1 comment) Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/39411/comment/c900987f_4e538f55?… : PS1, Line 17: Related: SYS#6708 > OS#6708 Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39411?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie1e686b407532eee76a8692dfc632af73183e614 Gerrit-Change-Number: 39411 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Mon, 27 Jan 2025 12:46:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: tests/osmo_io: Rework test_file()
by pespin 27 Jan '25

27 Jan '25
Attention is currently required from: daniel, fixeria, osmith. Hello Jenkins Builder, daniel, fixeria, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/39411?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by osmith Change subject: tests/osmo_io: Rework test_file() ...................................................................... tests/osmo_io: Rework test_file() The amount of read and write on each callback is actually not really managed by us but by the kernel. Instead of validating the amount of read/write callbacks, monitor the amount of read/write bytes (and also make sure the received a final read with len=0 to signal EOF). Add fflush(stdout) before calling ASSERT to make sure stdout is flushed before terminating the program. Related: OS#6708 Change-Id: Ie1e686b407532eee76a8692dfc632af73183e614 --- M tests/osmo_io/osmo_io_test.c 1 file changed, 23 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/11/39411/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39411?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie1e686b407532eee76a8692dfc632af73183e614 Gerrit-Change-Number: 39411 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: euicc: Add euicc_memory_reset shell command
by dexter 27 Jan '25

27 Jan '25
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/39409?usp=email ) Change subject: euicc: Add euicc_memory_reset shell command ...................................................................... Patch Set 1: Code-Review+1 Verified+1 (1 comment) Patchset: PS1: I am sure your implementation is correct. However, I have the feeling that almost all cards have issues with that commend. When I try an eSIM-me card for example, the card/os crashed and now I get this: pySIM-shell (00:MF/ADF.ISD-R)> euicc_memory_reset --delete-operational -> 80E2910006 bf340382018000 <- 9000: bf340380017f { "reset_result": "undefinedError" } pySIM-shell (00:MF/ADF.ISD-R)> Did it work for you? I would expect that when a card has (operational) profiles on it, that those profiles should vanish when I do "euicc_memory_reset --delete-operational" -- To view, visit https://gerrit.osmocom.org/c/pysim/+/39409?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: Ib462f5b7de3e500e51c0f3d6e2b9b0c2d3ba7e20 Gerrit-Change-Number: 39409 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 27 Jan 2025 12:28:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.