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 <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Holger Freyther <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>

Reply via email to