blob: 0769dacd52d7533d66aa00f69cef1b2ed82aa629 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# first test that CSV files are created for each rule
$ crushtool -i five-devices.crushmap --test --num-rep 1 --min-x 0 --max-x 9 --output-csv
$ if [ ! -f data-absolute_weights.csv ]; then echo FAIL; fi
$ if [ ! -f data-batch_device_expected_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f data-batch_device_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f data-device_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f data-device_utilization.csv ]; then echo FAIL; fi
$ if [ ! -f data-placement_information.csv ]; then echo FAIL; fi
$ if [ ! -f data-proportional_weights_all.csv ]; then echo FAIL; fi
$ if [ ! -f data-proportional_weights.csv ]; then echo FAIL; fi
$ if [ ! -f metadata-absolute_weights.csv ]; then echo FAIL; fi
$ if [ ! -f metadata-batch_device_expected_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f metadata-batch_device_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f metadata-device_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f metadata-device_utilization.csv ]; then echo FAIL; fi
$ if [ ! -f metadata-placement_information.csv ]; then echo FAIL; fi
$ if [ ! -f metadata-proportional_weights_all.csv ]; then echo FAIL; fi
$ if [ ! -f metadata-proportional_weights.csv ]; then echo FAIL; fi
$ if [ ! -f rbd-absolute_weights.csv ]; then echo FAIL; fi
$ if [ ! -f rbd-batch_device_expected_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f rbd-batch_device_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f rbd-device_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f rbd-device_utilization.csv ]; then echo FAIL; fi
$ if [ ! -f rbd-placement_information.csv ]; then echo FAIL; fi
$ if [ ! -f rbd-proportional_weights_all.csv ]; then echo FAIL; fi
$ if [ ! -f rbd-proportional_weights.csv ]; then echo FAIL; fi
$ rm data*csv
$ rm metadata*csv
$ rm rbd*csv
# now check that the CSV files are made to the proper length
$ crushtool -i five-devices.crushmap --test --rule 0 --num-rep 1 --min-x 0 --max-x 9 --output-csv
$ if [ $(wc -l data-absolute_weights.csv | awk '{print $1}') != "5" ]; then echo FAIL; fi
$ if [ $(wc -l data-batch_device_expected_utilization_all.csv | awk '{print $1}') != "5" ]; then echo FAIL; fi
$ if [ $(wc -l data-batch_device_utilization_all.csv | awk '{print $1}') != "5" ]; then echo FAIL; fi
$ if [ $(wc -l data-device_utilization_all.csv | awk '{print $1}') != "5" ]; then echo FAIL; fi
$ if [ $(wc -l data-device_utilization.csv | awk '{print $1}') != "5" ]; then echo FAIL; fi
$ if [ $(wc -l data-placement_information.csv | awk '{print $1}') != "10" ]; then echo FAIL; fi
$ if [ $(wc -l data-proportional_weights_all.csv | awk '{print $1}') != "5" ]; then echo FAIL; fi
$ if [ $(wc -l data-proportional_weights.csv | awk '{print $1}') != "5" ]; then echo FAIL; fi
$ rm data*csv
# finally check that user supplied tags are prepended correctly
$ crushtool -i five-devices.crushmap --test --rule 0 --num-rep 1 --min-x 0 --max-x 9 --output-name "test-tag" --output-csv
$ if [ ! -f test-tag-data-absolute_weights.csv ]; then echo FAIL; fi
$ if [ ! -f test-tag-data-batch_device_expected_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f test-tag-data-batch_device_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f test-tag-data-device_utilization_all.csv ]; then echo FAIL; fi
$ if [ ! -f test-tag-data-device_utilization.csv ]; then echo FAIL; fi
$ if [ ! -f test-tag-data-placement_information.csv ]; then echo FAIL; fi
$ if [ ! -f test-tag-data-proportional_weights_all.csv ]; then echo FAIL; fi
$ if [ ! -f test-tag-data-proportional_weights.csv ]; then echo FAIL; fi
$ rm test-tag*csv
|