]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #!/usr/bin/env bash |
2 | ||
3 | set -e | |
4 | ||
5 | testdir=$(readlink -f $(dirname $0)) | |
6 | rootdir=$(readlink -f $testdir/../../..) | |
7 | source $rootdir/scripts/autotest_common.sh | |
8 | ||
9 | function linux_iter_pci { | |
10 | lspci -mm -n | grep $1 | tr -d '"' | awk -F " " '{print "0000:"$1}' | |
11 | } | |
12 | ||
13 | timing_enter nvme | |
14 | ||
15 | if [ $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 | |
23 | fi | |
24 | ||
25 | timing_enter identify | |
26 | $rootdir/examples/nvme/identify/identify | |
27 | for bdf in $(linux_iter_pci 0108); do | |
28 | $rootdir/examples/nvme/identify/identify -r "trtype:PCIe traddr:${bdf}" | |
29 | done | |
30 | timing_exit identify | |
31 | ||
32 | timing_enter perf | |
33 | $rootdir/examples/nvme/perf/perf -q 128 -w read -s 12288 -t 1 | |
34 | timing_exit perf | |
35 | ||
36 | timing_enter reserve | |
37 | $rootdir/examples/nvme/reserve/reserve | |
38 | timing_exit reserve | |
39 | ||
40 | timing_enter hello_world | |
41 | $rootdir/examples/nvme/hello_world/hello_world | |
42 | timing_exit | |
43 | ||
44 | timing_enter overhead | |
45 | $rootdir/test/lib/nvme/overhead/overhead -s 4096 -t 1 | |
46 | timing_exit overhead | |
47 | ||
48 | if [ -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 | |
56 | fi | |
57 | ||
58 | timing_enter arbitration | |
59 | $rootdir/examples/nvme/arbitration/arbitration -t 3 | |
60 | timing_exit arbitration | |
61 | ||
62 | if [ $(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 | |
84 | fi | |
85 | ||
86 | timing_enter sgl | |
87 | $testdir/sgl/sgl | |
88 | timing_exit sgl | |
89 | ||
90 | timing_enter e2edp | |
91 | $testdir/e2edp/nvme_dp | |
92 | timing_exit e2edp | |
93 | ||
94 | timing_exit nvme |