]>
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 | if [ $(uname -s) = Linux ]; then | |
10 | timing_enter nvme_mp | |
11 | ||
12 | timing_enter mp_func_test | |
13 | $rootdir/examples/nvme/arbitration/arbitration -i 0 -s 4096 -t 5 -c 0xf & | |
14 | sleep 3 | |
15 | $rootdir/examples/nvme/perf/perf -i 0 -q 128 -w read -s 4096 -t 1 -c 0x10 | |
16 | wait $! | |
17 | timing_exit mp_func_test | |
18 | ||
19 | timing_enter mp_fault_test | |
20 | timing_enter mp_fault_test_1 | |
21 | $rootdir/examples/nvme/arbitration/arbitration -i 0 -s 4096 -t 5 -c 0xf & | |
22 | sleep 3 | |
23 | $rootdir/examples/nvme/perf/perf -i 0 -q 128 -w read -s 4096 -t 3 -c 0x10 | |
24 | sleep 1 | |
25 | kill -9 $! | |
26 | timing_exit mp_fault_test_1 | |
27 | ||
28 | timing_enter mp_fault_test_2 | |
29 | $rootdir/examples/nvme/arbitration/arbitration -i 0 -s 4096 -t 7 -c 0xf & | |
30 | pid=$! | |
31 | sleep 3 | |
32 | $rootdir/examples/nvme/perf/perf -i 0 -q 128 -w read -s 4096 -t 3 -c 0x10 & | |
33 | sleep 2 | |
34 | kill -9 $! | |
35 | wait $pid | |
36 | timing_exit mp_fault_test_2 | |
37 | timing_exit mp_fault_test | |
38 | ||
39 | timing_enter mp_stress_test | |
40 | timing_enter mp_stress_test_1 | |
41 | $rootdir/examples/nvme/arbitration/arbitration -i 0 -s 4096 -t 10 -c 0xf & | |
42 | sleep 3 | |
43 | count=0 | |
44 | while [ $count -le 4 ]; do | |
45 | $rootdir/examples/nvme/perf/perf -i 0 -q 128 -w read -s 4096 -t 1 -c 0x10 | |
46 | count=$(( $count + 1 )) | |
47 | done | |
48 | wait $! | |
49 | timing_exit mp_stress_test_1 | |
50 | ||
51 | timing_enter mp_stress_test_2 | |
52 | $rootdir/examples/nvme/arbitration/arbitration -i 0 -s 4096 -t 15 -c 0xf & | |
53 | pid=$! | |
54 | sleep 3 | |
55 | count=0 | |
56 | while [ $count -le 4 ]; do | |
57 | $rootdir/examples/nvme/perf/perf -i 0 -q 128 -w read -s 4096 -t 3 -c 0x10 & | |
58 | sleep 2 | |
59 | kill -9 $! | |
60 | count=$(( $count + 1 )) | |
61 | done | |
62 | wait $pid | |
63 | timing_exit mp_stress_test_2 | |
64 | ||
65 | timing_enter mp_stress_test_3 | |
66 | $rootdir/examples/nvme/arbitration/arbitration -i 0 -s 4096 -t 10 & | |
67 | pid=$! | |
68 | sleep 3 | |
69 | count=0 | |
70 | while [ $count -le 4 ]; do | |
71 | core=$((1 << (($count + 4)))) | |
72 | printf -v hexcore "0x%x" "$core" | |
73 | $rootdir/examples/nvme/perf/perf -i 0 -q 128 -w read -s 4096 -t 1 -c $hexcore & | |
74 | count=$(( $count + 1 )) | |
75 | done | |
76 | wait $pid | |
77 | timing_exit mp_stress_test_3 | |
78 | timing_exit mp_stress_test | |
79 | ||
80 | timing_enter mp_perf_test | |
81 | $rootdir/examples/nvme/perf/perf -i 0 -q 1 -w randread -s 4096 -t 5 -c 0x3 | |
82 | sleep 3 | |
83 | ||
84 | $rootdir/examples/nvme/perf/perf -i 0 -q 1 -w randread -s 4096 -t 8 -c 0x1 & | |
85 | sleep 3 | |
86 | $rootdir/examples/nvme/perf/perf -i 0 -q 1 -w randread -s 4096 -t 3 -c 0x2 | |
87 | wait $! | |
88 | timing_exit mp_perf_test | |
89 | ||
90 | timing_exit nvme_mp | |
91 | fi |