2016-07-20 18:16:23 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
2017-04-04 23:20:16 +00:00
|
|
|
rootdir=$(readlink -f $testdir/../../..)
|
2016-07-20 18:16:23 +00:00
|
|
|
source $rootdir/scripts/autotest_common.sh
|
|
|
|
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
|
|
|
|
|
|
|
timing_enter blockdev
|
|
|
|
|
2017-01-25 23:36:40 +00:00
|
|
|
cp $testdir/bdev.conf.in $testdir/bdev.conf
|
|
|
|
$rootdir/scripts/gen_nvme.sh >> $testdir/bdev.conf
|
|
|
|
|
2016-10-11 16:02:37 +00:00
|
|
|
timing_enter bounds
|
|
|
|
$testdir/bdevio/bdevio $testdir/bdev.conf
|
|
|
|
timing_exit bounds
|
2016-07-20 18:16:23 +00:00
|
|
|
|
2017-07-17 07:45:46 +00:00
|
|
|
if grep -q Nvme0 $testdir/bdev.conf; then
|
|
|
|
part_dev_by_gpt $testdir/bdev.conf Nvme0n1 $rootdir
|
2017-06-01 05:02:54 +00:00
|
|
|
fi
|
|
|
|
|
2017-07-20 14:11:47 +00:00
|
|
|
timing_enter bdev_svc
|
|
|
|
bdevs=$(discover_bdevs $rootdir $testdir/bdev.conf | jq -r '.[] | select(.bdev_opened_for_write == false) | .name')
|
|
|
|
timing_exit bdev_svc
|
|
|
|
|
2016-07-20 18:16:23 +00:00
|
|
|
timing_enter verify
|
2017-02-01 17:31:35 +00:00
|
|
|
$testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 32 -s 4096 -w verify -t 1
|
2016-07-20 18:16:23 +00:00
|
|
|
timing_exit verify
|
|
|
|
|
|
|
|
if [ $RUN_NIGHTLY -eq 1 ]; then
|
2016-08-04 23:12:51 +00:00
|
|
|
# Use size 192KB which both exceeds typical 128KB max NVMe I/O
|
|
|
|
# size and will cross 128KB Intel DC P3700 stripe boundaries.
|
|
|
|
timing_enter perf
|
|
|
|
$testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 128 -w read -s 196608 -t 5
|
|
|
|
timing_exit perf
|
|
|
|
|
2017-04-14 22:41:24 +00:00
|
|
|
# Temporarily disabled - infinite loop
|
|
|
|
#timing_enter reset
|
|
|
|
#$testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 16 -w reset -s 4096 -t 60
|
|
|
|
#timing_exit reset
|
2016-07-20 18:16:23 +00:00
|
|
|
|
|
|
|
timing_enter unmap
|
|
|
|
$testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 1 -w unmap -s 4096 -t 60
|
|
|
|
timing_exit unmap
|
|
|
|
fi
|
|
|
|
|
2017-01-25 23:36:40 +00:00
|
|
|
rm -f $testdir/bdev.conf
|
2016-07-20 18:16:23 +00:00
|
|
|
timing_exit blockdev
|