Add scripts for testing the fio zoned block device support code
[fio.git] / t / zbd / run-tests-against-regular-nullb
CommitLineData
191d1d1a
BVA
1#!/bin/bash
2#
3# Copyright (C) 2018 Western Digital Corporation or its affiliates.
4#
5# This file is released under the GPL.
6
7for d in /sys/kernel/config/nullb/*; do [ -d "$d" ] && rmdir "$d"; done
8modprobe -r null_blk
9modprobe null_blk nr_devices=0 || return $?
10for d in /sys/kernel/config/nullb/*; do
11 [ -d "$d" ] && rmdir "$d"
12done
13modprobe -r null_blk
14[ -e /sys/module/null_blk ] && exit $?
15modprobe null_blk nr_devices=0 &&
16 cd /sys/kernel/config/nullb &&
17 mkdir nullb0 &&
18 cd nullb0 &&
19 echo 0 > completion_nsec &&
20 echo 4096 > blocksize &&
21 echo 1024 > size &&
22 echo 1 > memory_backed &&
23 echo 1 > power
24
25"$(dirname "$0")"/test-zbd-support "$@" /dev/nullb0