]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
srp and nvmeof-mp: Check whether legacy dm is supported
authorBart Van Assche <bvanassche@acm.org>
Tue, 30 Oct 2018 20:04:52 +0000 (13:04 -0700)
committerBart Van Assche <bvanassche@acm.org>
Fri, 7 Dec 2018 00:24:33 +0000 (16:24 -0800)
Kernel commit 6a23e05c2fe3 ("dm: remove legacy request-based IO path")
retained dm-mq but removed the legacy dm code. Skip those tests that
require the legacy dm code.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
common/multipath-over-rdma
tests/nvmeof-mp/004
tests/srp/003
tests/srp/004
tests/srp/012

index b9cd06b3042bf697d5a3c13070e0cde425ca3405..2bb53abd730886e7943a16fc7d065f78cb45fa26 100644 (file)
@@ -4,6 +4,8 @@
 #
 # Functions and global variables used by both the srp and nvmeof-mp tests.
 
+. common/shellcheck
+
 debug=
 filesystem_type=ext4
 fio_aux_path=/tmp/fio-state-files
@@ -14,6 +16,13 @@ if [ $ramdisk_size -gt $max_ramdisk_size ]; then
        ramdisk_size=$max_ramdisk_size
 fi
 
+_have_legacy_dm() {
+       if ! _have_kernel_option DM_MQ_DEFAULT; then
+               SKIP_REASON="legacy device mapper support is missing"
+               return 1
+       fi
+}
+
 get_ipv4_addr() {
        ip -4 -o addr show dev "$1" |
                sed -n 's/.*[[:blank:]]inet[[:blank:]]*\([^[:blank:]/]*\).*/\1/p'
index 9088cc7b0a5b3b02b084e503ddd09c4c988dae69..990fcfc9e472a21edd6fd13226653df517cee537 100755 (executable)
@@ -7,6 +7,10 @@
 DESCRIPTION="File I/O on top of multipath concurrently with logout and login (sq-on-mq)"
 TIMED=1
 
+requires() {
+       _have_legacy_dm
+}
+
 test_disconnect_repeatedly() {
        local dev fio_status m
 
index 6149b2e0371691617155bb88fe80dd604c40aea4..51e9ee04baf4d4a979c3766122d1e1fbc0232bb2 100755 (executable)
@@ -7,6 +7,10 @@
 DESCRIPTION="File I/O on top of multipath concurrently with logout and login (sq)"
 TIMED=1
 
+requires() {
+       _have_legacy_dm
+}
+
 test_disconnect_repeatedly() {
        local dev fio_status m
 
index 49d7b1fbb7ce95079c3a37cccdfa24e92bdc73bd..b500d6472b1401016ba6ba05a987b22ed7668f92 100755 (executable)
@@ -7,6 +7,10 @@
 DESCRIPTION="File I/O on top of multipath concurrently with logout and login (sq-on-mq)"
 TIMED=1
 
+requires() {
+       _have_legacy_dm
+}
+
 test_disconnect_repeatedly() {
        local dev fio_status m
 
index f50026fa394835ccb01d7b452fcb6b40cd839bb4..20c6dafd7fc69050022483dcc4c735ea6c4c9f8c 100755 (executable)
@@ -15,6 +15,7 @@ test_io_schedulers() {
                modprobe "$(basename "$m")" >&/dev/null
        done
        for mq in y n; do
+               [ $mq = n ] && ! _have_legacy_dm && continue
                use_blk_mq ${mq} ${mq} || return $?
                dev=$(get_bdev 0) || return $?
                for sched in noop deadline bfq cfq; do