Change in osmo-gsm-tester[master]: ms: Attempt to stop all mobile/virtphy instances on exit

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Holger Freyther gerrit-no-reply at lists.osmocom.org
Thu Jul 5 20:30:21 UTC 2018


Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/9714 )

Change subject: ms: Attempt to stop all mobile/virtphy instances on exit
......................................................................

ms: Attempt to stop all mobile/virtphy instances on exit

We leave mobile/virtphy running after the test. Attempt to gracefully
exit and kill all of them. I experimented with both os.setpgrp and the
prctl(PR_SET_DEATH_SIG) but that didn't improve the situation.

Change-Id: I6cec050db7d4c355fb6678b2d84309fbbe5587b3
---
M src/osmo_ms_driver/__main__.py
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, but someone else must approve
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py
index 7bca1d1..abc5e54 100644
--- a/src/osmo_ms_driver/__main__.py
+++ b/src/osmo_ms_driver/__main__.py
@@ -24,6 +24,7 @@
 
 # System modules
 import argparse
+import atexit
 import datetime
 import subprocess
 import signal
@@ -78,6 +79,7 @@
 
     # Just a single test for now.
     test = MassUpdateLocationTest("lu_test", args.num_ms, cdf, ev_server, tmp_dir)
+    atexit.register(test.stop_all)
 
     # Run until everything has been launched
     test.launch(loop)

-- 
To view, visit https://gerrit.osmocom.org/9714
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6cec050db7d4c355fb6678b2d84309fbbe5587b3
Gerrit-Change-Number: 9714
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180705/1a8ad154/attachment.htm>


More information about the gerrit-log mailing list