]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use SIGKILL to kill the container if necessary 25039/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 17 Oct 2022 13:00:12 +0000 (15:00 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 17 Oct 2022 13:00:12 +0000 (15:00 +0200)
TEST-69 uses a Python wrapper around the systemd-nspawn call, which on
error calls the `spawn.terminate()` method. However, with no arguments
it will only use SIGHUP and SIGINT signals - this might leave a stuck
container around, causing fails if the test is run again. With `force=True`
SIGKILL is used as well (if necessary).

test/test-shutdown.py

index 52207a465616d23ca53b8693ce0b24ca065b3f6f..e181f976bea580e8fb5ed0f84b568c8a1e6dd257 100755 (executable)
@@ -90,7 +90,7 @@ def run(args):
     except Exception as e:
         logger.error(e)
         logger.info("killing child pid %d", console.pid)
-        console.terminate()
+        console.terminate(force=True)
 
     return ret