root / test / hs / shelltests / htools-hspace.test @ f624a8eb
History | View | Annotate | Download (1.6 kB)
1 |
# test that hspace machine readable output looks correct |
---|---|
2 |
./test/hs/hspace --simu p,4,8T,64g,16 --machine-readable --disk-template drbd -l 8 |
3 |
>>> /^HTS_OK=1/ |
4 |
>>>= 0 |
5 |
|
6 |
# test again via a file and shell parsing |
7 |
./test/hs/hspace --simu p,4,8T,64g,16 --machine-readable --disk-template drbd -l 8 > $T/capacity && sh -c ". $T/capacity && test x\$HTS_OK = x1" |
8 |
>>>= 0 |
9 |
|
10 |
# standard & tiered allocation, using shell parsing to do multiple checks |
11 |
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4=4 129984,1048320,4=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 6" |
12 |
>>>=0 |
13 |
|
14 |
# again, but with a policy containing two min/max specs pairs |
15 |
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-dualspec.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4=4 129984,1048320,4=2 65472,524288,2=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 14" |
16 |
>>>2 |
17 |
>>>=0 |
18 |
|
19 |
# Verify that instance policy for disks is adhered to |
20 |
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-ipolicy.data |
21 |
>>>/HTS_TRL_INST_CNT=4/ |
22 |
>>>=0 |
23 |
|
24 |
# ...and instance positioning in human-readable form |
25 |
./test/hs/hspace -pname,pcnt -t $TESTDATA_DIR/hspace-tiered-ipolicy.data |
26 |
>>>2/Tiered allocation status: |
27 |
Name pcnt |
28 |
node-01-001 1 |
29 |
node-01-002 1 |
30 |
node-01-003 1 |
31 |
node-01-004 1/ |
32 |
>>>=0 |
33 |
|
34 |
./test/hs/hspace -pname,pcnt -t $TESTDATA_DIR/hspace-tiered-resourcetypes.data |
35 |
>>>2/Tiered allocation status: |
36 |
Name pcnt |
37 |
node-01-001 1 |
38 |
node-01-002 2 |
39 |
node-01-003 2 |
40 |
node-01-004 2/ |
41 |
>>>=0 |
42 |
|