Statistics
| Branch: | Tag: | Revision:

root / test / hs / shelltests / htools-hspace.test @ 8d4c25f2

History | View | Annotate | Download (3 kB)

1 83846468 Iustin Pop
# test that hspace machine readable output looks correct
2 83846468 Iustin Pop
./test/hs/hspace --simu p,4,8T,64g,16 --machine-readable --disk-template drbd -l 8
3 83846468 Iustin Pop
>>> /^HTS_OK=1/
4 83846468 Iustin Pop
>>>= 0
5 83846468 Iustin Pop
6 83846468 Iustin Pop
# test again via a file and shell parsing
7 83846468 Iustin Pop
./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 83846468 Iustin Pop
>>>= 0
9 8abeb641 Bernardo Dal Seno
10 8abeb641 Bernardo Dal Seno
# standard & tiered allocation, using shell parsing to do multiple checks
11 a93e5814 Bernardo Dal Seno
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,12=4 129984,1048320,4,12=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 6"
12 8abeb641 Bernardo Dal Seno
>>>=0
13 8abeb641 Bernardo Dal Seno
14 8abeb641 Bernardo Dal Seno
# again, but with a policy containing two min/max specs pairs
15 a93e5814 Bernardo Dal Seno
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-dualspec.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,12=4 129984,1048320,4,12=2 65472,524288,2,12=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 14"
16 8abeb641 Bernardo Dal Seno
>>>2
17 8abeb641 Bernardo Dal Seno
>>>=0
18 a93e5814 Bernardo Dal Seno
19 a93e5814 Bernardo Dal Seno
# With exclusive storage
20 a93e5814 Bernardo Dal Seno
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-exclusive.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,10=1 131072,1048576,4,9=1 131072,1048576,4,8=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 6 && test \"\${HTS_TRL_SPN_FREE}\" = 0 && test \"\${HTS_FIN_SPN_FREE}\" = 29"
21 a93e5814 Bernardo Dal Seno
>>>=0
22 a93e5814 Bernardo Dal Seno
23 a93e5814 Bernardo Dal Seno
# With exclusive storage and a policy containing two min/max specs pairs
24 a93e5814 Bernardo Dal Seno
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-dualspec-exclusive.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,4=4 129984,1048320,4,4=2 65472,524288,2,2=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 14 && test \"\${HTS_TRL_SPN_FREE}\" = 7 && test \"\${HTS_FIN_SPN_FREE}\" = 7"
25 a93e5814 Bernardo Dal Seno
>>>2
26 a93e5814 Bernardo Dal Seno
>>>=0
27 a93e5814 Bernardo Dal Seno
28 a93e5814 Bernardo Dal Seno
# Mixed cluster, half with exclusive storage
29 a93e5814 Bernardo Dal Seno
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-mixed.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,12=2 131072,1048576,4,10=2 129984,1048320,4,10=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 6 && test \"\${HTS_TRL_SPN_FREE}\" = 0 && test \"\${HTS_FIN_SPN_FREE}\" = 18"
30 a93e5814 Bernardo Dal Seno
>>>=0
31 f5c4553b Michele Tartara
32 6b502fa3 Klaus Aehlig
# Verify that instance policy for disks is adhered to
33 6b502fa3 Klaus Aehlig
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-ipolicy.data
34 6b502fa3 Klaus Aehlig
>>>/HTS_TRL_INST_CNT=4/
35 6b502fa3 Klaus Aehlig
>>>=0
36 6b502fa3 Klaus Aehlig
37 6b502fa3 Klaus Aehlig
# ...and instance positioning in human-readable form
38 6b502fa3 Klaus Aehlig
./test/hs/hspace -pname,pcnt -t $TESTDATA_DIR/hspace-tiered-ipolicy.data
39 6b502fa3 Klaus Aehlig
>>>2/Tiered allocation status:
40 6b502fa3 Klaus Aehlig
 Name        pcnt
41 6b502fa3 Klaus Aehlig
 node-01-001    1
42 6b502fa3 Klaus Aehlig
 node-01-002    1
43 6b502fa3 Klaus Aehlig
 node-01-003    1
44 6b502fa3 Klaus Aehlig
 node-01-004    1/
45 6b502fa3 Klaus Aehlig
>>>=0
46 f624a8eb Klaus Aehlig
47 f624a8eb Klaus Aehlig
./test/hs/hspace -pname,pcnt -t $TESTDATA_DIR/hspace-tiered-resourcetypes.data
48 f624a8eb Klaus Aehlig
>>>2/Tiered allocation status:
49 f624a8eb Klaus Aehlig
 Name        pcnt
50 f624a8eb Klaus Aehlig
 node-01-001    1
51 f624a8eb Klaus Aehlig
 node-01-002    2
52 f624a8eb Klaus Aehlig
 node-01-003    2
53 f624a8eb Klaus Aehlig
 node-01-004    2/
54 f624a8eb Klaus Aehlig
>>>=0
55 d90b69f6 Bernardo Dal Seno
56 d90b69f6 Bernardo Dal Seno
# VCPU-dominated allocation
57 d90b69f6 Bernardo Dal Seno
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-vcpu.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '32768,65536,4,12=4 32768,65536,2,12=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 10"
58 d90b69f6 Bernardo Dal Seno
>>>=0