Skip to content

Commit

Permalink
test: Disable busy swap on scsi_debug
Browse files Browse the repository at this point in the history
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 6c3986d
  • Loading branch information
martinpitt committed Dec 12, 2023
1 parent 27ef800 commit c17189f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/common/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit c17189f

Please sign in to comment.