[PATCH blktests 06/13] block/016: 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/016 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/block/016 b/tests/block/016
index 2b7a05f..775069c 100755
--- a/tests/block/016
+++ b/tests/block/016
@@ -20,21 +20,22 @@ requires() {
 test() {
 	echo "Running ${TEST_NAME}"
 
-	if ! _init_null_blk irqmode=2 completion_nsec=2000000000; then
+	if ! _configure_null_blk nullb1 irqmode=2 completion_nsec=2000000000 \
+			power=1; then
 		return 1
 	fi
 
 	# Start an I/O, which will take two seconds.
-	dd if=/dev/nullb0 of=/dev/null bs=512 iflag=direct count=1 status=none &
+	dd if=/dev/nullb1 of=/dev/null bs=512 iflag=direct count=1 status=none &
 	sleep 0.5
 
 	# This will freeze the queue, and since we have an I/O in flight, it
 	# will stay frozen until the I/O completes.
-	echo 64 > /sys/block/nullb0/queue/nr_requests &
+	echo 64 > /sys/block/nullb1/queue/nr_requests &
 	sleep 0.5
 
 	# Do an I/O, which will wait for the queue to unfreeze.
-	dd if=/dev/nullb0 of=/dev/null bs=512 iflag=direct count=1 status=none &
+	dd if=/dev/nullb1 of=/dev/null bs=512 iflag=direct count=1 status=none &
 	sleep 0.5
 
 	# While dd is blocked, send a signal which we know dd has a handler
-- 
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