pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39940?usp=email )
Change subject: core: osmo_io: Introduce API osmo_io_get_backend()
......................................................................
core: osmo_io: Introduce API osmo_io_get_backend()
It came up several times already that it's difficult figuring out the
osmo-io backend a process is actually using.
Add this API so that we can display the osmo-io backend through VTY
command in a follow-up commit.
Related: OS#6740
Change-Id: I9432efd6cb0453d7ab42d71765e897db6bd4c787
---
M TODO-RELEASE
M include/osmocom/core/osmo_io.h
M src/core/libosmocore.map
M src/core/osmo_io.c
4 files changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/39940/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 0ed7189..5d97425 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+libosmocore add API osmo_io_get_backend()
\ No newline at end of file
diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h
index f4bfec4..c8b8517 100644
--- a/include/osmocom/core/osmo_io.h
+++ b/include/osmocom/core/osmo_io.h
@@ -79,6 +79,8 @@
OSMO_IO_BACKEND_IO_URING,
};
+enum osmo_io_backend osmo_io_get_backend(void);
+
extern const struct value_string osmo_io_backend_names[];
/*! return the string name of an osmo_io_backend */
static inline const char *osmo_io_backend_name(enum osmo_io_backend val)
diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map
index cd5dc94..b48c4e6 100644
--- a/src/core/libosmocore.map
+++ b/src/core/libosmocore.map
@@ -256,6 +256,7 @@
osmo_init_logging2;
osmo_int_to_float_str_buf;
osmo_int_to_float_str_c;
+osmo_io_get_backend;
osmo_io_backend_names;
osmo_iofd_close;
osmo_iofd_free;
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 65c9b33..9d377a8 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -122,6 +122,13 @@
osmo_iofd_init();
}
+/*! Obtain the osmo_io_backend in use by the process
+ * \returns The osmo_io backend which was configured at startup time */
+enum osmo_io_backend osmo_io_get_backend(void)
+{
+ return g_io_backend;
+}
+
/*! Allocate the msghdr.
* \param[in] iofd the osmo_io file structure
* \param[in] action the action this msg(hdr) is for (read, write, ..)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39940?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: I9432efd6cb0453d7ab42d71765e897db6bd4c787
Gerrit-Change-Number: 39940
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39941?usp=email )
Change subject: vty: Add 'show runtime' command
......................................................................
vty: Add 'show runtime' command
It came up several times already that it's difficult figuring out the
osmo-io backend a process is actually using.
Add a VTY command to display the osmo-io backend in use.
Related: OS#6740
Change-Id: I7994c820894b3525bfe78b5d389ff30a1e543226
---
M include/osmocom/vty/Makefile.am
A include/osmocom/vty/vty_internal.h
M src/vty/Makefile.am
A src/vty/misc_vty.c
M src/vty/vty.c
5 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/41/39941/1
diff --git a/include/osmocom/vty/Makefile.am b/include/osmocom/vty/Makefile.am
index adb05dc..2261da7 100644
--- a/include/osmocom/vty/Makefile.am
+++ b/include/osmocom/vty/Makefile.am
@@ -12,6 +12,10 @@
cpu_sched_vty.h \
tdef_vty.h \
$(NULL)
+
+noinst_HEADERS = \
+ vty_internal.h \
+ $(NULL)
endif
osmovtydir = $(includedir)/osmocom/vty
diff --git a/include/osmocom/vty/vty_internal.h b/include/osmocom/vty/vty_internal.h
new file mode 100644
index 0000000..bb800c8
--- /dev/null
+++ b/include/osmocom/vty/vty_internal.h
@@ -0,0 +1,30 @@
+/* (C) 2025 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de>
+ *
+ * Author: Pau Espin Pedrol <pespin(a)sysmocom.de>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+#pragma once
+
+/*! \defgroup vty_internal Osmocom vty internals
+ * @{
+ * \file vty_internal.h */
+
+void vty_misc_init(void);
+
+/*! @} */
diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am
index 14e8326..91c2413 100644
--- a/src/vty/Makefile.am
+++ b/src/vty/Makefile.am
@@ -23,6 +23,7 @@
cpu_sched_vty.c \
fsm_vty.c \
logging_vty.c \
+ misc_vty.c \
stats_vty.c \
talloc_ctx_vty.c \
tdef_vty.c \
diff --git a/src/vty/misc_vty.c b/src/vty/misc_vty.c
new file mode 100644
index 0000000..7a59c74
--- /dev/null
+++ b/src/vty/misc_vty.c
@@ -0,0 +1,42 @@
+/*
+ * (C) 2025 by sysmocom - s.f.m.c. GmbH
+ * Author: Pau Espin Pedrol <pespin(a)sysmocom.de>
+ * All Rights Reserved
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "config.h"
+
+#include <osmocom/core/osmo_io.h>
+
+#include <osmocom/vty/command.h>
+#include <osmocom/vty/vty.h>
+
+DEFUN(show_runtime, show_runtime_cmd,
+ "show runtime",
+ SHOW_STR "Display runtime information\n")
+{
+ enum osmo_io_backend io_backend = osmo_io_get_backend();
+ vty_out(vty, "osmo-io backend: %s%s", osmo_io_backend_name(io_backend), VTY_NEWLINE);
+ return CMD_SUCCESS;
+}
+
+void vty_misc_init(void)
+{
+ install_lib_element_ve(&show_runtime_cmd);
+}
diff --git a/src/vty/vty.c b/src/vty/vty.c
index 3a549b4..5936ee8 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -65,6 +65,7 @@
#include <osmocom/vty/vty.h>
#include <osmocom/vty/command.h>
#include <osmocom/vty/buffer.h>
+#include <osmocom/vty/vty_internal.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/utils.h>
@@ -1902,6 +1903,8 @@
install_lib_element(VTY_NODE, &vty_login_cmd);
install_lib_element(VTY_NODE, &no_vty_login_cmd);
install_lib_element(VTY_NODE, &vty_bind_cmd);
+
+ vty_misc_init();
}
/*! Read the configuration file using the VTY code
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39941?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: I7994c820894b3525bfe78b5d389ff30a1e543226
Gerrit-Change-Number: 39941
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/39914?usp=email )
Change subject: jobs/osmocom-build-tags…: set seccomp profile
......................................................................
jobs/osmocom-build-tags…: set seccomp profile
Set the seccomp profile to make io_uring work in docker, so the
regression test in libosmocore using io_uring does not fail. This
happened to work previously on the build4 jenkins node because of an
older docker version.
Related: OS#6718#note-2
Change-Id: I9636ce30a0515b773be0581a8018bf1f62c1341c
---
M jobs/osmocom-build-tags-against-master.yml
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/jobs/osmocom-build-tags-against-master.yml b/jobs/osmocom-build-tags-against-master.yml
index b242103..6953dfd 100644
--- a/jobs/osmocom-build-tags-against-master.yml
+++ b/jobs/osmocom-build-tags-against-master.yml
@@ -26,6 +26,7 @@
- shell: |
docker run \
--rm=true \
+ --security-opt seccomp=$HOME/osmo-ci/_docker_playground/seccomp_profile.json \
-e PARALLEL_MAKE="-j8" \
-u build \
-v "$PWD:/build" \
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/39914?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I9636ce30a0515b773be0581a8018bf1f62c1341c
Gerrit-Change-Number: 39914
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>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39934?usp=email )
Change subject: sccp: testenv: fix run with asan + latest binaries
......................................................................
sccp: testenv: fix run with asan + latest binaries
When running against osmocom:nightly:asan, build sccp_demo_user with
--enable-sanitize. Otherwise this code is not running with asan and
doesn't even start (as the libraries we link against are built with
--enable-sanitize).
When running against osmocom:latest, check out the latest tag instead of
current master.
Fixes: OS#5899
Change-Id: I5307125560694feae9f0978ebd27607a77ed8675
---
M _testenv/testenv/podman_install.py
1 file changed, 22 insertions(+), 2 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py
index 2c5ae5a..a27abd8 100644
--- a/_testenv/testenv/podman_install.py
+++ b/_testenv/testenv/podman_install.py
@@ -20,7 +20,12 @@
global sccp_dir
global jobs
- git_dir = os.path.join(testenv.args.cache, "git")
+ # Make the git dir we clone into specific to the repository we build
+ # against. Replace ":" because the libtool scripts fail to escape it when
+ # setting LD_LIBRARY_PATH, leading to "cannot open shared object file"
+ # errors.
+ git_dir = os.path.join(testenv.args.cache, "git", f"build_against_{testenv.args.binary_repo}".replace(":", "_"))
+
sccp_dir = os.path.join(git_dir, "libosmo-sigtran")
jobs = multiprocessing.cpu_count() + 1
@@ -97,6 +102,14 @@
logging.debug("libosmo-sigtran: already cloned")
return
+ branch = "master"
+ if testenv.args.binary_repo.endswith(":latest"):
+ ls_remote = testenv.cmd.run(
+ ["git", "ls-remote", "--tags", "https://gerrit.osmocom.org/libosmo-sigtran"], capture_output=True, text=True
+ )
+ branch = ls_remote.stdout.split("\n")[-2].split("refs/tags/")[1].split("^")[0]
+
+ logging.info(f"libosmo-sigtran: cloning {branch}")
testenv.cmd.run(
[
"git",
@@ -105,6 +118,8 @@
"clone",
"--depth",
"1",
+ "--branch",
+ branch,
"https://gerrit.osmocom.org/libosmo-sigtran",
]
)
@@ -126,7 +141,12 @@
clone_libosmo_sigtran()
logging.info("Building sccp_demo_user")
testenv.cmd.run(["autoreconf", "-fi"], cwd=sccp_dir)
- testenv.cmd.run(["./configure"], cwd=sccp_dir)
+
+ configure_cmd = ["./configure"]
+ if testenv.args.binary_repo.endswith(":asan"):
+ configure_cmd += ["--enable-sanitize"]
+ testenv.cmd.run(configure_cmd, cwd=sccp_dir)
+
testenv.cmd.run(
["make", "-j", f"{jobs}", "libosmo-sigtran.la"],
cwd=os.path.join(sccp_dir, "src"),
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39934?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5307125560694feae9f0978ebd27607a77ed8675
Gerrit-Change-Number: 39934
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>