[PATCH blktests 07/13] block/017: convert to use _configure_null_blk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Switch to use _configure_null_blk so that built-in null_blk can be
supported, which implies not using the default nullb0 device.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 tests/block/017 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/block/017 b/tests/block/017
index c84b661..8596888 100755
--- a/tests/block/017
+++ b/tests/block/017
@@ -19,23 +19,24 @@ requires() {
 
 show_inflight() {
 	awk '{ printf "sysfs inflight reads %d\nsysfs inflight writes %d\n", $1, $2 }' \
-		/sys/block/nullb0/inflight
-	awk '{ print "sysfs stat " $9 }' /sys/block/nullb0/stat
-	awk '$3 == "nullb0" { print "diskstats " $12 }' /proc/diskstats
+		/sys/block/nullb1/inflight
+	awk '{ print "sysfs stat " $9 }' /sys/block/nullb1/stat
+	awk '$3 == "nullb1" { print "diskstats " $12 }' /proc/diskstats
 }
 
 test() {
 	echo "Running ${TEST_NAME}"
 
-	if ! _init_null_blk irqmode=2 completion_nsec=500000000; then
+	if ! _configure_null_blk nullb1 irqmode=2 completion_nsec=500000000 \
+			power=1; then
 		return 1
 	fi
 
-	dd if=/dev/nullb0 of=/dev/null bs=4096 iflag=direct count=1 status=none &
+	dd if=/dev/nullb1 of=/dev/null bs=4096 iflag=direct count=1 status=none &
 	sleep 0.1
 	show_inflight
 
-	dd if=/dev/zero of=/dev/nullb0 bs=4096 oflag=direct count=1 status=none &
+	dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1 status=none &
 	sleep 0.1
 	show_inflight
 
-- 
2.30.2




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux