From 471cac19a6fb3c192faf61d3724db2509643c760 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 8 Apr 2022 23:52:38 +0100 Subject: [PATCH] networkd-test: lazy umount tmp directories In Semaphore CI, for some reason, /run/systemd/resolve is busy so the umount fails at the end of the test run: Verify link states with Unmanaged= settings, cold-plug. ... umount: /run/systemd/resolve: target is busy.14:57 ok14:57 ERROR14:57 ======================================================================14:57 ERROR: tearDownModule (__main__)14:57 ----------------------------------------------------------------------14:57 Traceback (most recent call last):14:57 File /tmp/autopkgtest-lxc.6islza9t/downtmp/build.A9b/src/test/networkd-test.py, line 94, in tearDownModule14:57 subprocess.check_call([umount, d])14:57 File /usr/lib/python3.9/subprocess.py, line 373, in check_call14:57 raise CalledProcessError(retcode, cmd)14:57 subprocess.CalledProcessError: Command '['umount', '/run/systemd/resolve']' returned non-zero exit status 32.14:57 ----------------------------------------------------------------------14:58 Ran 35 tests in 138.868s14:58 FAILED (errors=1, skipped=2) Use lazy umount to avoid erroring out. --- test/networkd-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/networkd-test.py b/test/networkd-test.py index 7faa12ef793..1001cd7cc8e 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -91,7 +91,7 @@ def setUpModule(): def tearDownModule(): global tmpmounts for d in tmpmounts: - subprocess.check_call(["umount", d]) + subprocess.check_call(["umount", "--lazy", d]) for u in stopped_units: subprocess.call(["systemctl", "stop", u]) for u in running_units: