]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/test/lib/nvme/nvme.sh
bump version to 12.2.12-pve1
[ceph.git] / ceph / src / spdk / test / lib / nvme / nvme.sh
CommitLineData
7c673cae
FG
1#!/usr/bin/env bash
2
3set -e
4
5testdir=$(readlink -f $(dirname $0))
6rootdir=$(readlink -f $testdir/../../..)
7source $rootdir/scripts/autotest_common.sh
8
9function linux_iter_pci {
10 lspci -mm -n | grep $1 | tr -d '"' | awk -F " " '{print "0000:"$1}'
11}
12
13timing_enter nvme
14
15if [ $RUN_NIGHTLY -eq 1 ]; then
16 timing_enter aer
17 $testdir/aer/aer
18 timing_exit aer
19
20 timing_enter reset
21 $testdir/reset/reset -q 64 -w write -s 4096 -t 2
22 timing_exit reset
23fi
24
25timing_enter identify
26$rootdir/examples/nvme/identify/identify
27for bdf in $(linux_iter_pci 0108); do
28 $rootdir/examples/nvme/identify/identify -r "trtype:PCIe traddr:${bdf}"
29done
30timing_exit identify
31
32timing_enter perf
33$rootdir/examples/nvme/perf/perf -q 128 -w read -s 12288 -t 1
34timing_exit perf
35
36timing_enter reserve
37$rootdir/examples/nvme/reserve/reserve
38timing_exit reserve
39
40timing_enter hello_world
41$rootdir/examples/nvme/hello_world/hello_world
42timing_exit
43
44timing_enter overhead
45$rootdir/test/lib/nvme/overhead/overhead -s 4096 -t 1
46timing_exit overhead
47
48if [ -d /usr/src/fio ]; then
49 timing_enter fio_plugin
50 for bdf in $(linux_iter_pci 0108); do
51 /usr/src/fio/fio $rootdir/examples/nvme/fio_plugin/example_config.fio --filename=${bdf//:/.}/1
52 break
53 done
54
55 timing_exit fio_plugin
56fi
57
58timing_enter arbitration
59$rootdir/examples/nvme/arbitration/arbitration -t 3
60timing_exit arbitration
61
62if [ $(uname -s) = Linux ]; then
63 timing_enter multi_process
64 $rootdir/examples/nvme/arbitration/arbitration -i 0 -s 4096 -t 10 -c 0xf &
65 pid=$!
66 sleep 3
67 $rootdir/examples/nvme/perf/perf -i 0 -q 1 -w randread -s 4096 -t 10 -c 0x10 &
68 sleep 1
69 kill -9 $!
70 count=0
71 while [ $count -le 2 ]; do
72 $rootdir/examples/nvme/perf/perf -i 0 -q 1 -w read -s 4096 -t 1 -c 0x10
73 count=$(($count + 1))
74 done
75 count=0
76 while [ $count -le 1 ]; do
77 core=$((1 << (($count + 4))))
78 printf -v hexcore "0x%x" "$core"
79 $rootdir/examples/nvme/perf/perf -i 0 -q 128 -w read -s 4096 -t 1 -c $hexcore &
80 count=$(($count + 1))
81 done
82 wait $pid
83 timing_exit multi_process
84fi
85
86timing_enter sgl
87$testdir/sgl/sgl
88timing_exit sgl
89
90timing_enter e2edp
91$testdir/e2edp/nvme_dp
92timing_exit e2edp
93
94timing_exit nvme