summaryrefslogtreecommitdiffstats
path: root/test/test-shutdown.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-shutdown.py')
-rwxr-xr-xtest/test-shutdown.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test-shutdown.py b/test/test-shutdown.py
index 13e18ec..00f7a6c 100755
--- a/test/test-shutdown.py
+++ b/test/test-shutdown.py
@@ -4,6 +4,7 @@
import argparse
import logging
+import signal
import sys
import pexpect
@@ -90,7 +91,9 @@ def run(args):
except Exception as e:
logger.error(e)
logger.info("killing child pid %d", console.pid)
- console.terminate(force=True)
+
+ # Ask systemd-nspawn to stop and release the container's resources properly.
+ console.kill(signal.SIGTERM)
return ret