Commit a93e5814 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

New tests for hspace and exclusive storage



hspace is run on clusters with exclusive storage enabled.
Signed-off-by: default avatarBernardo Dal Seno <bdalseno@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 0cc3d742
......@@ -1058,7 +1058,10 @@ TEST_FILES = \
test/data/htools/hail-reloc-drbd.json \
test/data/htools/hbal-excl-tags.data \
test/data/htools/hbal-split-insts.data \
test/data/htools/hspace-tiered-dualspec-exclusive.data \
test/data/htools/hspace-tiered-dualspec.data \
test/data/htools/hspace-tiered-exclusive.data \
test/data/htools/hspace-tiered-mixed.data \
test/data/htools/hspace-tiered.data \
test/data/htools/invalid-node.data \
test/data/htools/missing-resources.data \
......
group-01|fake-uuid-01|preferred||
node-01-001|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|10
node-01-002|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|9
node-01-003|262144|1024|261120|2097152|2097152|8|N|fake-uuid-01|8||Y|8
node-01-004|262144|1024|261120|2097152|2097152|8|N|fake-uuid-01|8||Y|8
|63488,2,522240,1,1,2|129024,4,1047552,1,1,4;131072,4,1048576,16,8,4;63488,2,522240,1,1,2;65536,2,524288,16,8,2|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
group-01|63488,2,522240,1,1,2|129024,4,1047552,1,1,4;131072,4,1048576,16,8,4;63488,2,522240,1,1,2;65536,2,524288,16,8,2|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
group-01|fake-uuid-01|preferred||
node-01-001|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|10
node-01-002|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|9
node-01-003|262144|1024|261120|2097152|2097152|8|N|fake-uuid-01|8||Y|8
node-01-004|262144|1024|261120|2097152|2097152|8|N|fake-uuid-01|8||Y|8
|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
group-01|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
group-01|fake-uuid-01|preferred||
group-02|fake-uuid-02|preferred||
node-01-001|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|10
node-01-002|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|10
node-01-003|262144|1024|261120|2097152|2097152|8|N|fake-uuid-02|8||N|8
node-01-004|262144|1024|261120|2097152|2097152|8|N|fake-uuid-02|8||N|8
|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
group-01|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
group-02|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
......@@ -8,10 +8,23 @@
>>>= 0
# standard & tiered allocation, using shell parsing to do multiple checks
./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"
./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"
>>>=0
# again, but with a policy containing two min/max specs pairs
./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"
./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"
>>>2
>>>=0
# With exclusive storage
./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"
>>>=0
# With exclusive storage and a policy containing two min/max specs pairs
./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"
>>>2
>>>=0
# Mixed cluster, half with exclusive storage
./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"
>>>=0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment