]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
tests/srp: Remove /etc/multipath.conf after a test has finished
authorBart Van Assche <bvanassche@acm.org>
Mon, 17 Sep 2018 16:59:38 +0000 (09:59 -0700)
committerBart Van Assche <bvanassche@acm.org>
Thu, 27 Sep 2018 17:56:51 +0000 (10:56 -0700)
Instead of removing /etc/multipath.conf before a test starts, remove it
after a test has finished. This change is needed to let the nvmeof-mp
tests run after the srp tests have been run.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
tests/srp/rc

index 4bddcadb06ee50a03d97afafec20e31dc1c9266c..a125e632d43ecddadefc17f378e64e48315e0b97 100755 (executable)
@@ -103,12 +103,6 @@ group_requires() {
                SKIP_REASON="/etc/multipath.conf already exists"
                return 1
        fi
-       if [ ! -e /etc/multipath.conf ]; then
-               (
-                       srcdir=$PWD
-                       cd /etc && ln -s "$srcdir/tests/srp/multipath.conf" .
-               )
-       fi
 }
 
 # Log out, set dm and SCSI use_blk_mq parameters and log in. $1: device mapper
@@ -1188,6 +1182,7 @@ shutdown_client() {
 # Undo setup()
 teardown() {
        killall -9 multipathd >&/dev/null
+       rm -f /etc/multipath.conf
        stop_target
        unload_null_blk
 }
@@ -1222,6 +1217,12 @@ setup() {
 
        configure_null_blk
 
+       if [ ! -e /etc/multipath.conf ]; then
+               (
+                       srcdir=$PWD
+                       cd /etc && ln -s "$srcdir/tests/srp/multipath.conf" .
+               )
+       fi
        multipathd
 
        # Load the I/O scheduler kernel modules