osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38850?usp=email )
Change subject: bts/run_fake_trx.sh: tweak cd logic
......................................................................
bts/run_fake_trx.sh: tweak cd logic
Don't test if FAKE_TRX_DIR is empty, because it is never empty at that
point. If it was empty, then the line above would assign a default
value.
Change-Id: I63f9720487b564de5c5609eb52a6bb9d5a8aa74f
---
M bts/run_fake_trx.sh
1 file changed, 1 insertion(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/50/38850/1
diff --git a/bts/run_fake_trx.sh b/bts/run_fake_trx.sh
index 2209972..6243ce2 100755
--- a/bts/run_fake_trx.sh
+++ b/bts/run_fake_trx.sh
@@ -4,8 +4,5 @@
# fake trx is part of osmo-trx
FAKE_TRX_DIR="${FAKE_TRX_DIR:-../../osmo-trx/osmocom-bb/src/target/trx_toolkit}"
-if [ -n "$FAKE_TRX_DIR" ] ; then
- cd "$FAKE_TRX_DIR"
-fi
-
+cd "$FAKE_TRX_DIR"
exec ./fake_trx.py --trx TRX1@127.0.0.1:5700/1 --trx TRX2@127.0.0.1:5700/2 --trx TRX3@127.0.0.1:5700/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38850?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: I63f9720487b564de5c5609eb52a6bb9d5a8aa74f
Gerrit-Change-Number: 38850
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38851?usp=email )
Change subject: testenv: build virtphy from src with --binary-repo
......................................................................
testenv: build virtphy from src with --binary-repo
Add logic to build virtphy from source when running with --binary-repo.
This extra code path is needed because we currently don't have virtphy
packaged (like trxcon and sccp_demo_user), and we need to build the
libosmocore binary package instead of building completely from source as
we would do it with osmo-dev.
Use ".split(" ", 1)[0]" on the program= value to only look at its first
word, so we can later on use it in testenv.cfg file as follows:
[virtphy]
program=virtphy -s /tmp/osmocom_l2
Change-Id: I37bac8509b2601286e4feab099782f82c8338dca
---
M _testenv/testenv/podman_install.py
1 file changed, 20 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/51/38851/1
diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py
index 3c38285..9033c14 100644
--- a/_testenv/testenv/podman_install.py
+++ b/_testenv/testenv/podman_install.py
@@ -13,6 +13,7 @@
git_dir = None
bb_dir = None
trxcon_dir = None
+virtphy_dir = None
sccp_dir = None
jobs = None
@@ -21,12 +22,14 @@
global git_dir
global bb_dir
global trxcon_dir
+ global virtphy_dir
global sccp_dir
global jobs
git_dir = os.path.join(testenv.args.cache, "git")
bb_dir = os.path.join(git_dir, "osmocom-bb")
trxcon_dir = os.path.join(bb_dir, "src/host/trxcon")
+ virtphy_dir = os.path.join(bb_dir, "src/host/virt_phy")
sccp_dir = os.path.join(git_dir, "libosmo-sigtran")
jobs = multiprocessing.cpu_count() + 1
@@ -148,6 +151,20 @@
testenv.cmd.run(["ln", "-s", trxcon_in_srcdir, "/usr/local/bin/trxcon"])
+def from_source_virtphy():
+ virtphy_in_srcdir = os.path.join(virtphy_dir, "src/virtphy")
+
+ if not os.path.exists(virtphy_in_srcdir):
+ clone_osmocom_bb()
+ apt_install(["libosmocore-dev"])
+ logging.info("Building virtphy")
+ testenv.cmd.run(["autoreconf", "-fi"], cwd=virtphy_dir)
+ testenv.cmd.run(["./configure"], cwd=virtphy_dir)
+ testenv.cmd.run(["make", "-j", f"{jobs}"], cwd=virtphy_dir)
+
+ testenv.cmd.run(["ln", "-s", virtphy_in_srcdir, "/usr/local/bin/virtphy"])
+
+
def from_source_sccp_demo_user():
sccp_demo_user_path = os.path.join(sccp_dir, "examples/sccp_demo_user")
@@ -178,9 +195,11 @@
def from_source(cfg, cfg_name, section):
- program = cfg[section]["program"]
+ program = cfg[section]["program"].split(" ", 1)[0]
if program == "trxcon":
return from_source_trxcon()
+ if program == "virtphy":
+ return from_source_virtphy()
if program == "run_fake_trx.sh":
return clone_osmocom_bb()
if program == "run_sccp_demo_user.sh":
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38851?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: I37bac8509b2601286e4feab099782f82c8338dca
Gerrit-Change-Number: 38851
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38849?usp=email )
Change subject: testenv: pass env var for --binary-repo
......................................................................
testenv: pass env var for --binary-repo
Pass TESTENV_BINARY_REPO=1 to the podman container if the --binary-repo
argument is set. This will be used for the BTS testsuite to figure out
from where we need to run fake-trx.
Change-Id: Ia88906147e2e579145e3c8d04090c58f533febd5
---
M _testenv/testenv/podman.py
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/49/38849/1
diff --git a/_testenv/testenv/podman.py b/_testenv/testenv/podman.py
index 1281b3b..f8812e4 100644
--- a/_testenv/testenv/podman.py
+++ b/_testenv/testenv/podman.py
@@ -243,7 +243,12 @@
"PODMAN=1",
]
- if not testenv.args.binary_repo:
+ if testenv.args.binary_repo:
+ cmd += [
+ "-e",
+ "TESTENV_BINARY_REPO=1",
+ ]
+ else:
cmd += [
"--volume",
f"{osmo_dev_dir}:{osmo_dev_dir}",
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38849?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: Ia88906147e2e579145e3c8d04090c58f533febd5
Gerrit-Change-Number: 38849
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38847?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: respawn.sh: don't respawn on segfault
......................................................................
testenv: respawn.sh: don't respawn on segfault
Do not respawn the process if it segfaulted or aborted abnormally in
another way (exit code >= 128).
Change-Id: I6f3f6218095643609a8b8869b57dde6b6bdb77a0
---
M _testenv/data/scripts/respawn.sh
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/47/38847/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38847?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: I6f3f6218095643609a8b8869b57dde6b6bdb77a0
Gerrit-Change-Number: 38847
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38848?usp=email
to look at the new patch set (#3).
Change subject: testenv: print backtrace on startup fail too
......................................................................
testenv: print backtrace on startup fail too
When a program fails to start up, look for the coredump and print a
backtrace if it was found (instead of only doing it if a program
crashes later on).
Change-Id: I66a55dcfdab17d035ce6425220763a85b5b6dc90
---
M _testenv/testenv/daemons.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/48/38848/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38848?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: I66a55dcfdab17d035ce6425220763a85b5b6dc90
Gerrit-Change-Number: 38848
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38848?usp=email
to look at the new patch set (#2).
Change subject: testenv: print backtrace on startup fail too
......................................................................
testenv: print backtrace on startup fail too
When a program fails to start up, look a the coredump and print a
backtrace if it was found (instead of only doing it if a program
crashes later on).
Change-Id: I66a55dcfdab17d035ce6425220763a85b5b6dc90
---
M _testenv/testenv/daemons.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/48/38848/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38848?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: I66a55dcfdab17d035ce6425220763a85b5b6dc90
Gerrit-Change-Number: 38848
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38848?usp=email )
Change subject: testenv: print stacktrace on startup fail too
......................................................................
testenv: print stacktrace on startup fail too
When a program fails to start up, look a the coredump and print a
stack trace if it was found (instead of only doing it if a program
crashes later on).
Change-Id: I66a55dcfdab17d035ce6425220763a85b5b6dc90
---
M _testenv/testenv/daemons.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/48/38848/1
diff --git a/_testenv/testenv/daemons.py b/_testenv/testenv/daemons.py
index 0c9c0dd..86f3979 100644
--- a/_testenv/testenv/daemons.py
+++ b/_testenv/testenv/daemons.py
@@ -68,6 +68,7 @@
# Wait 200ms and check if it is still running
time.sleep(0.2)
if daemons[section].poll() is not None:
+ testenv.coredump.get_from_coredumpctl()
raise testenv.NoTraceException(f"program failed to start: {program}")
# Run setup script
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38848?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: I66a55dcfdab17d035ce6425220763a85b5b6dc90
Gerrit-Change-Number: 38848
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38847?usp=email )
Change subject: testenv: respawn.sh: don't respawn on segfault
......................................................................
testenv: respawn.sh: don't respawn on segfault
Do not respawn the process if it segfaulted or aborted abnormally in
another way (exit code >= 128).
Change-Id: I6f3f6218095643609a8b8869b57dde6b6bdb77a0
---
M _testenv/data/scripts/respawn.sh
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/47/38847/1
diff --git a/_testenv/data/scripts/respawn.sh b/_testenv/data/scripts/respawn.sh
index 3b079c7..1044c60 100755
--- a/_testenv/data/scripts/respawn.sh
+++ b/_testenv/data/scripts/respawn.sh
@@ -12,7 +12,12 @@
$* &
LAST_PID=$!
wait $LAST_PID
- echo "respawn: $i: stopped pid $LAST_PID with status $?"
+ LAST_STATUS=$?
+ echo "respawn: $i: stopped pid $LAST_PID with status $LAST_STATUS"
+ if [ $LAST_STATUS -ge 128 ]; then
+ echo "respawn: process was terminated abnormally, not respawning"
+ exit 1
+ fi
if [ $SLEEP_BEFORE_RESPAWN -gt 0 ]; then
echo "respawn: sleeping $SLEEP_BEFORE_RESPAWN seconds..."
sleep $SLEEP_BEFORE_RESPAWN
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38847?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: I6f3f6218095643609a8b8869b57dde6b6bdb77a0
Gerrit-Change-Number: 38847
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>