]> www.infradead.org Git - users/hch/blktests.git/commitdiff
nvme/rc: clear hosts directory in _cleanup_nvmet()
authorHannes Reinecke <hare@suse.com>
Mon, 22 Nov 2021 15:15:32 +0000 (16:15 +0100)
committerHannes Reinecke <hare@suse.com>
Wed, 20 Jul 2022 13:22:51 +0000 (15:22 +0200)
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 <hare@suse.de>
tests/nvme/rc

index 6a531f39f30ddc0808add96669f1a9b2b79a0f5a..14c3088a3b3c6dcf125b253aa40dba095a3cc878 100644 (file)
@@ -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