From 9a6acc5c1e37811d5169d94e2a778bf5c2b38ea9 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Mon, 22 Nov 2021 16:15:32 +0100 Subject: [PATCH] nvme/rc: clear hosts directory in _cleanup_nvmet() When clearing out the configuration we need to clear the 'hosts' directory, too, as scripts might have added host configurations. Signed-off-by: Hannes Reinecke --- tests/nvme/rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/nvme/rc b/tests/nvme/rc index 6a531f3..14c3088 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -143,6 +143,12 @@ _cleanup_nvmet() { rmdir "${subsys}" done + for host in "${NVMET_CFS}"/hosts/*; do + name=$(basename "${host}") + echo "WARNING: Test did not clean up host: ${name}" + rmdir "${host}" + done + shopt -u nullglob trap SIGINT -- 2.49.0