From b0df0c511c5aedd3945fe3fa7db63e7232d6e969 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 4 Dec 2023 13:16:07 +0100 Subject: [PATCH] test: Disable busy swap on scsi_debug When e.g. TestStorageswap.test fails in the middle, the active swap partition on the scsi_debug driver will prevent the module removal, and break all subsequent tests. Helps with #19683 Cherry-picked from 6c3986d7b18221 --- test/common/testlib.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/common/testlib.py b/test/common/testlib.py index 32b74dc9b4e..00f4428074b 100644 --- a/test/common/testlib.py +++ b/test/common/testlib.py @@ -1540,6 +1540,7 @@ def cleanup_home_dirs(): " done; " " while fuser --mount /dev/$dev --kill; do sleep 0.1; done; " " umount /dev/$dev || true; " + " swapon --show=NAME --noheadings | grep $dev | xargs -r swapoff; " "done; until rmmod scsi_debug; do sleep 0.2; done", stdout=None) def terminate_sessions():