Attention is currently required from: fixeria, pespin.
Hello Jenkins Builder, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40140?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: testenv: support fetching coredumps in jenkins
......................................................................
testenv: support fetching coredumps in jenkins
The Osmocom jenkins nodes run inside LXCs. When we get a coredump it
appears on the host, fetch it from there via testenv-coredump-helper,
which gets added to the hosts in the related patch.
Related: osmo-ci I7e66c98106b7028a393e3b873e96ae2dcb412c48
Related: OS#6769
Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
---
M _testenv/README.md
M _testenv/testenv/coredump.py
2 files changed, 61 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/40140/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40140?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
Gerrit-Change-Number: 40140
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-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40140?usp=email )
Change subject: testenv: support fetching coredumps in jenkins
......................................................................
testenv: support fetching coredumps in jenkins
The Osmocom jenkins nodes run inside LXCs. When we get a coredump it
appears on the host, fetch it from there via testenv-coredump-helper,
which gets added to the hosts in the related patch.
Related: osmo-ci I7e66c98106b7028a393e3b873e96ae2dcb412c48
Related: OS#6769
Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
---
M _testenv/README.md
M _testenv/testenv/coredump.py
2 files changed, 60 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/40140/1
diff --git a/_testenv/README.md b/_testenv/README.md
index 11cd8bd..66158c4 100644
--- a/_testenv/README.md
+++ b/_testenv/README.md
@@ -215,6 +215,15 @@
available but doesn't work in podman. QEMU runs a bit slower when this is
set.
+* `TESTENV_COREDUMP_FROM_LXC_HOST`:
+ Instead of using coredumpctl to retrieve the coredump, assume testenv is
+ running inside an LXC and try to retrieve the coredump from the LXC host
+ (OS#6769). This is used in jenkins.
+
+* `TESTENV_COREDUMP_FROM_LXC_HOST_IP`:
+ Instead of attempting to automatically detect the LXC host IP, use this IP.
+ This can be set to 127.0.0.1 for testing.
+
## Troubleshooting
### Timeout waiting for RESET-ACK after sending RESET
diff --git a/_testenv/testenv/coredump.py b/_testenv/testenv/coredump.py
index 0d56328..4c0d9d2 100644
--- a/_testenv/testenv/coredump.py
+++ b/_testenv/testenv/coredump.py
@@ -11,9 +11,52 @@
import testenv
import testenv.daemons
import testenv.testdir
+import urllib
+import urllib.request
executable_path = None
+lxc_netdev = "eth0"
+lxc_ip_pattern = "10.0.*"
+lxc_port = 8042
+
+
+def find_lxc_host_ip():
+ cmd = ["ip", "-j", "-o", "-4", "addr", "show", "dev", lxc_netdev]
+ p = testenv.cmd.run(cmd, check=False, no_podman=True, capture_output=True, text=True)
+ ret = json.loads(p.stdout)[0]["addr_info"][0]["local"]
+ if fnmatch.fnmatch(ret, lxc_ip_pattern):
+ ret = ret.split(".")
+ ret = f"{ret[0]}.{ret[1]}.{ret[2]}.1"
+ return ret
+ return None
+
+
+def get_from_coredumpctl_lxc_host():
+ global executable_path
+
+ logging.info("Looking for a coredump on lxc host")
+
+ ip = os.environ.get("TESTENV_COREDUMP_FROM_LXC_HOST_IP") or find_lxc_host_ip()
+ if not ip:
+ logging.warning("Failed to get lxc host ip, can't look for coredump")
+ return
+
+ try:
+ with urllib.request.urlopen(f"http://{ip}:{lxc_port}/core") as response:
+ executable_path = dict(response.getheaders())["X-Executable-Path"]
+ with open(f"{testenv.testdir.testdir}/core", "wb") as h:
+ shutil.copyfileobj(response, h)
+ logging.debug("Coredump found and copied to log dir")
+ except urllib.error.HTTPError as e:
+ executable_path = None
+ if e.code == 404:
+ logging.debug("No coredump found")
+ else:
+ logging.error(f"Unexpected error while attempting to fetch the coredump: {e}")
+ except urllib.error.URLError as e:
+ logging.error(f"Unexpected error while attempting to fetch the coredump: {e}")
+
def executable_is_relevant(exe):
if testenv.args.binary_repo:
@@ -32,7 +75,7 @@
return False
-def get_from_coredumpctl():
+def get_from_coredumpctl_local():
global executable_path
logging.info("Looking for a coredump")
@@ -68,6 +111,13 @@
executable_path = coredump["exe"]
+def get_from_coredumpctl():
+ if os.environ.get("TESTENV_COREDUMP_FROM_LXC_HOST"):
+ get_from_coredumpctl_lxc_host()
+ else:
+ get_from_coredumpctl_local()
+
+
def get_backtrace():
global executable_path
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40140?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
Gerrit-Change-Number: 40140
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Attention is currently required from: fixeria.
osmith has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40129?usp=email )
Change subject: start-testsuite: remove workaround for TITAN < 9.0.0
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
File start-testsuite.sh:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40129/comment/cb15f92b_4b98… :
PS1, Line 48:
> This is a good idea, but I am not sure if we should be checking the version here at run-time. […]
Good points!
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40129?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: I57eecd6e0ea9e488a2110b029ddc313bd05cd1fa
Gerrit-Change-Number: 40129
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Apr 2025 07:21:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40131?usp=email )
Change subject: README: explain how to run testsuites manually
......................................................................
README: explain how to run testsuites manually
As the testsuites are now in the _build directory, running them might
not be as obvious. Add an example to the README. While at it, explain a
bit more what the testenv script does and where one can read more about
it.
Change-Id: I1ee9319ada889a8dd43cfb32776dc1a8ae12d607
---
M README.md
1 file changed, 20 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/README.md b/README.md
index 94bc73a..b694fd3 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,26 @@
$ ./testenv.py run mgw
```
+This will build the mgw testsuite from source, as well as osmo-mgw and all its
+dependencies and then run the testsuite against it. The Osmocom sources will be
+cloned if they don't exist in a sibling directory to osmo-ttcn3-hacks. It is
+also possible to use the Osmocom binary packages with this and running
+everything inside a podman container. See `./testenv.py -h` and
+`_testenv/README.md` for more information.
+
+### Manually
+
+Alternatively you can build and run the testsuite yourself, e.g.:
+
+```
+$ make mgw
+$ cd mgw
+$ ../start-testsuite.sh ../_build/mgw/MGCP_Test MGCP_Test.cfg
+```
+
+Make sure that all components that the testsuite requires are running
+(`osmo-mgw` in this example).
+
## Continuous Integration
The individual tests suites are executed against different versions of
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40131?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: I1ee9319ada889a8dd43cfb32776dc1a8ae12d607
Gerrit-Change-Number: 40131
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
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>