Revision 189b51fa

b/.gitignore
81 81
/man/*.gen
82 82
/man/footer.man
83 83

  
84
# test
85
/test/hail
86
/test/hbal
87
/test/hcheck
88
/test/hinfo
89
/test/hscan
90
/test/hspace
84
# htest
85
/htest/hail
86
/htest/hbal
87
/htest/hcheck
88
/htest/hinfo
89
/htest/hscan
90
/htest/hspace
91 91

  
92 92
# tools
93 93
/tools/kvm-ifup
b/Makefile.am
361 361

  
362 362
HS_ALL_PROGS = $(HS_PROGS) htest/test htest/hpc-htools htools/hconfd
363 363
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
364
HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=test/%) test/hail
364
HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=htest/%) htest/hail
365 365

  
366 366
HFLAGS = -O -Wall -Werror -fwarn-monomorphism-restriction -fwarn-tabs -ihtools
367 367
# extra flags that can be overriden on the command line (e.g. -Wwarn, etc.)
......
1212 1212
daemons/ganeti-watcher: MODULE = ganeti.watcher
1213 1213
scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@))
1214 1214
tools/ensure-dirs: MODULE = ganeti.tools.ensure_dirs
1215
$(HS_BUILT_TEST_HELPERS): TESTROLE = $(patsubst test/%,%,$@)
1215
$(HS_BUILT_TEST_HELPERS): TESTROLE = $(patsubst htest/%,%,$@)
1216 1216

  
1217 1217
$(PYTHON_BOOTSTRAP): Makefile | stamp-directories
1218 1218
	test -n "$(MODULE)" || { echo Missing module; exit 1; }
b/autotools/run-in-tempdir
23 23
  fi
24 24
done
25 25

  
26
for hfile in hpc-htools test offline-test.sh cli-tests-defs.sh; do
26
for hfile in hpc-htools test offline-test.sh cli-tests-defs.sh \
27
  hbal hscan hspace hinfo hcheck hail; do
27 28
  if [ -e htest/$hfile ]; then
28 29
    cp -p htest/$hfile $tmpdir/htest/
29 30
  fi
b/htest/offline-test.sh
34 34

  
35 35
echo -n Generating hspace simulation data for hinfo and hbal...
36 36
# this cluster spec should be fine
37
./test/hspace --simu p,4,8T,64g,16 -S $T/simu-onegroup \
37
./htest/hspace --simu p,4,8T,64g,16 -S $T/simu-onegroup \
38 38
  --disk-template drbd -l 8 -v -v -v >/dev/null 2>&1
39 39
echo OK
40 40

  
41 41
echo -n Generating hinfo and hbal test files for multi-group...
42
./test/hspace --simu p,4,8T,64g,16 --simu p,4,8T,64g,16 \
42
./htest/hspace --simu p,4,8T,64g,16 --simu p,4,8T,64g,16 \
43 43
  -S $T/simu-twogroups --disk-template drbd -l 8 >/dev/null 2>&1
44 44
echo OK
45 45

  
......
48 48
# policy, then we change all nodes from this group to the allocable
49 49
# one, and we check for rebalancing
50 50
FROOT="$T/simu-rebal-orig"
51
./test/hspace --simu u,4,8T,64g,16 --simu p,4,8T,64g,16 \
51
./htest/hspace --simu u,4,8T,64g,16 --simu p,4,8T,64g,16 \
52 52
  -S $FROOT --disk-template drbd -l 8 >/dev/null 2>&1
53 53
for suffix in standard tiered; do
54 54
  RELOC="$T/simu-rebal-merged.$suffix"
......
75 75
echo -n Checking file-based RAPI...
76 76
mkdir -p $T/hscan
77 77
export RAPI_URL="file://$TESTDATA_DIR/rapi"
78
./test/hscan -d $T/hscan/ -p -v -v $RAPI_URL >/dev/null 2>&1
78
./htest/hscan -d $T/hscan/ -p -v -v $RAPI_URL >/dev/null 2>&1
79 79
# check that we file parsing is correct, i.e. hscan saves correct text
80 80
# files, and is idempotent (rapi+text == rapi); more is tested in
81 81
# shelltest later
82 82
RAPI_TXT="$(ls $T/hscan/*.data|head -n1)"
83
./test/hinfo -p --print-instances -m $RAPI_URL > $T/hscan/direct.hinfo 2>&1
84
./test/hinfo -p --print-instances -t $RAPI_TXT > $T/hscan/fromtext.hinfo 2>&1
83
./htest/hinfo -p --print-instances -m $RAPI_URL > $T/hscan/direct.hinfo 2>&1
84
./htest/hinfo -p --print-instances -t $RAPI_TXT > $T/hscan/fromtext.hinfo 2>&1
85 85
echo OK
86 86

  
87 87
echo Running shelltest...
b/htest/shelltests/htools-balancing.test
1 1
### std tests
2 2

  
3 3
# test basic parsing
4
./test/hinfo -v -v -p --print-instances $BACKEND_BAL_STD
4
./htest/hinfo -v -v -p --print-instances $BACKEND_BAL_STD
5 5
>>>= 0
6
./test/hbal -v -v -v -p --print-instances $BACKEND_BAL_STD -G group-01
6
./htest/hbal -v -v -v -p --print-instances $BACKEND_BAL_STD -G group-01
7 7
>>> !/(Nothing to do, exiting|No solution found)/
8 8
>>>2 !/(Nothing to do, exiting|No solution found)/
9 9
>>>= 0
10 10

  
11 11
# test command output
12
./test/hbal $BACKEND_BAL_STD -G group-01 -C -S $T/simu-rebal.standard
12
./htest/hbal $BACKEND_BAL_STD -G group-01 -C -S $T/simu-rebal.standard
13 13
>>> /gnt-instance (failover|migrate|replace-disks)/
14 14
>>>= 0
15 15

  
16 16
# test saving commands
17
./test/hbal $BACKEND_BAL_STD -G group-01 -C$T/rebal-cmds.standard
17
./htest/hbal $BACKEND_BAL_STD -G group-01 -C$T/rebal-cmds.standard
18 18
>>>= 0
19 19
# and now check the file (depends on previous test)
20 20
cat $T/rebal-cmds.standard
......
28 28
>>>= 0
29 29

  
30 30
# no double rebalance; depends on previous test
31
./test/hbal -t $T/simu-rebal.standard.balanced -G group-01
31
./htest/hbal -t $T/simu-rebal.standard.balanced -G group-01
32 32
>>> /(Nothing to do, exiting|No solution found)/
33 33
>>>= 0
34 34

  
35 35
# hcheck sees no reason to rebalance after rebalancing was already done
36
./test/hcheck -t$T/simu-rebal.standard.balanced --machine-readable
36
./htest/hcheck -t$T/simu-rebal.standard.balanced --machine-readable
37 37
>>> /HCHECK_INIT_CLUSTER_NEED_REBALANCE=0/
38 38
>>>= 0
39 39

  
40 40
### now tiered tests
41 41

  
42 42
# test basic parsing
43
./test/hinfo -v -v -p --print-instances $BACKEND_BAL_TIER
43
./htest/hinfo -v -v -p --print-instances $BACKEND_BAL_TIER
44 44
>>>= 0
45
./test/hbal -v -v -v -p --print-instances $BACKEND_BAL_TIER -G group-01
45
./htest/hbal -v -v -v -p --print-instances $BACKEND_BAL_TIER -G group-01
46 46
>>> !/(Nothing to do, exiting|No solution found)/
47 47
>>>2 !/(Nothing to do, exiting|No solution found)/
48 48
>>>= 0
49 49

  
50 50
# test command output
51
./test/hbal $BACKEND_BAL_TIER -G group-01 -C -S $T/simu-rebal.tiered
51
./htest/hbal $BACKEND_BAL_TIER -G group-01 -C -S $T/simu-rebal.tiered
52 52
>>> /gnt-instance (failover|migrate|replace-disks)/
53 53
>>>= 0
54 54

  
55 55
# test saving commands
56
./test/hbal $BACKEND_BAL_TIER -G group-01 -C$T/rebal-cmds.tiered
56
./htest/hbal $BACKEND_BAL_TIER -G group-01 -C$T/rebal-cmds.tiered
57 57
>>>= 0
58 58
# and now check the file (depends on previous test)
59 59
cat $T/rebal-cmds.tiered
......
67 67
>>>= 0
68 68

  
69 69
# no double rebalance; depends on previous test
70
./test/hbal -t $T/simu-rebal.tiered.balanced -G group-01
70
./htest/hbal -t $T/simu-rebal.tiered.balanced -G group-01
71 71
>>> /(Nothing to do, exiting|No solution found)/
72 72
>>>= 0
b/htest/shelltests/htools-basic.test
1 1
# help/version tests
2
./test/hail --version
2
./htest/hail --version
3 3
>>>= 0
4
./test/hail --help
4
./htest/hail --help
5 5
>>>= 0
6
./test/hbal --version
6
./htest/hbal --version
7 7
>>>= 0
8
./test/hbal --help
8
./htest/hbal --help
9 9
>>>= 0
10
./test/hspace --version
10
./htest/hspace --version
11 11
>>>= 0
12
./test/hspace --help
12
./htest/hspace --help
13 13
>>>= 0
14
./test/hscan --version
14
./htest/hscan --version
15 15
>>>= 0
16
./test/hscan --help
16
./htest/hscan --help
17 17
>>>= 0
18
./test/hinfo --version
18
./htest/hinfo --version
19 19
>>>= 0
20
./test/hinfo --help
20
./htest/hinfo --help
21 21
>>>= 0
22
./test/hcheck --version
22
./htest/hcheck --version
23 23
>>>= 0
24
./test/hcheck --help
24
./htest/hcheck --help
25 25
>>>= 0
b/htest/shelltests/htools-dynutil.test
1
echo a > $T/dynu; ./test/hbal -U $T/dynu $BACKEND_DYNU
1
echo a > $T/dynu; ./htest/hbal -U $T/dynu $BACKEND_DYNU
2 2
>>>2 /Cannot parse line/
3 3
>>>= !0
4 4

  
5
echo a b c d e f g h > $T/dynu; ./test/hbal -U $T/dynu $BACKEND_DYNU
5
echo a b c d e f g h > $T/dynu; ./htest/hbal -U $T/dynu $BACKEND_DYNU
6 6
>>>2 /Cannot parse line/
7 7
>>>= !0
8 8

  
9
echo inst cpu mem dsk net >$T/dynu; ./test/hbal -U $T/dynu $BACKEND_DYNU
9
echo inst cpu mem dsk net >$T/dynu; ./htest/hbal -U $T/dynu $BACKEND_DYNU
10 10
>>>2 /cannot parse string '(cpu|mem|dsk|net)'/
11 11
>>>= !0
12 12

  
13 13
# unknown instances are currently just ignored
14
echo no-such-inst 2 2 2 2 > $T/dynu; ./test/hbal -U $T/dynu $BACKEND_DYNU
14
echo no-such-inst 2 2 2 2 > $T/dynu; ./htest/hbal -U $T/dynu $BACKEND_DYNU
15 15
>>>= 0
16 16

  
17 17
# new-0 is the name of the first instance allocated by hspace
18
echo new-0 2 2 2 2 > $T/dynu; ./test/hbal -U $T/dynu $BACKEND_DYNU
18
echo new-0 2 2 2 2 > $T/dynu; ./htest/hbal -U $T/dynu $BACKEND_DYNU
19 19
>>>= 0
b/htest/shelltests/htools-excl.test
1
./test/hbal $BACKEND_EXCL --exclude-instances no-such-instance
1
./htest/hbal $BACKEND_EXCL --exclude-instances no-such-instance
2 2
>>>2 /Unknown instance/
3 3
>>>= !0
4 4

  
5
./test/hbal $BACKEND_EXCL --select-instances no-such-instances
5
./htest/hbal $BACKEND_EXCL --select-instances no-such-instances
6 6
>>>2 /Unknown instance/
7 7
>>>= !0
8 8

  
9
./test/hbal $BACKEND_EXCL --exclude-instances new-0 --select-instances new-1
9
./htest/hbal $BACKEND_EXCL --exclude-instances new-0 --select-instances new-1
10 10
>>>= 0
b/htest/shelltests/htools-hail.test
1 1
# test that on invalid files it can't parse the request
2
./test/hail /dev/null
2
./htest/hail /dev/null
3 3
>>>2 /Invalid JSON/
4 4
>>>= !0
5 5

  
6 6
# another invalid example
7
echo '[]' | ./test/hail -
7
echo '[]' | ./htest/hail -
8 8
>>>2 /Unable to read JSObject/
9 9
>>>= !0
10 10

  
11 11
# empty dict
12
echo '{}' | ./test/hail -
12
echo '{}' | ./htest/hail -
13 13
>>>2 /key 'request' not found/
14 14
>>>= !0
15 15

  
16
echo '{"request": 0}' | ./test/hail -
16
echo '{"request": 0}' | ./htest/hail -
17 17
>>>2 /key 'request'/
18 18
>>>= !0
19 19

  
20
./test/hail $TESTDATA_DIR/hail-invalid-reloc.json
20
./htest/hail $TESTDATA_DIR/hail-invalid-reloc.json
21 21
>>>2 /key 'name': Unable to read String/
22 22
>>>= !0
23 23

  
24 24
# and now start the real tests
25
./test/hail $TESTDATA_DIR/hail-alloc-drbd.json
25
./htest/hail $TESTDATA_DIR/hail-alloc-drbd.json
26 26
>>> /"success":true,.*,"result":\["node2","node1"\]/
27 27
>>>= 0
28 28

  
29
./test/hail $TESTDATA_DIR/hail-reloc-drbd.json
29
./htest/hail $TESTDATA_DIR/hail-reloc-drbd.json
30 30
>>> /"success":true,.*,"result":\["node1"\]/
31 31
>>>= 0
32 32

  
33
./test/hail $TESTDATA_DIR/hail-node-evac.json
33
./htest/hail $TESTDATA_DIR/hail-node-evac.json
34 34
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/
35 35
>>>= 0
36 36

  
37
./test/hail $TESTDATA_DIR/hail-change-group.json
37
./htest/hail $TESTDATA_DIR/hail-change-group.json
38 38
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/
39 39
>>>= 0
40 40

  
41 41
# check that hail can use the simu backend
42
./test/hail --simu p,8,8T,16g,16 $TESTDATA_DIR/hail-alloc-drbd.json
42
./htest/hail --simu p,8,8T,16g,16 $TESTDATA_DIR/hail-alloc-drbd.json
43 43
>>> /"success":true,/
44 44
>>>= 0
45 45

  
46 46
# check that hail can use the text backend
47
./test/hail -t $T/simu-rebal-merged.standard $TESTDATA_DIR/hail-alloc-drbd.json
47
./htest/hail -t $T/simu-rebal-merged.standard $TESTDATA_DIR/hail-alloc-drbd.json
48 48
>>> /"success":true,/
49 49
>>>= 0
50 50

  
51 51
# check that hail can use the simu backend
52
./test/hail -t $T/simu-rebal-merged.standard $TESTDATA_DIR/hail-alloc-drbd.json
52
./htest/hail -t $T/simu-rebal-merged.standard $TESTDATA_DIR/hail-alloc-drbd.json
53 53
>>> /"success":true,/
54 54
>>>= 0
55 55

  
56 56
# check that hail pre/post saved state differs after allocation
57
./test/hail -v -v -v -p $TESTDATA_DIR/hail-alloc-drbd.json -S $T/hail-alloc >/dev/null 2>&1 && ! diff -q $T/hail-alloc.pre-ialloc $T/hail-alloc.post-ialloc
57
./htest/hail -v -v -v -p $TESTDATA_DIR/hail-alloc-drbd.json -S $T/hail-alloc >/dev/null 2>&1 && ! diff -q $T/hail-alloc.pre-ialloc $T/hail-alloc.post-ialloc
58 58
>>> /Files .* and .* differ/
59 59
>>>= 0
60 60

  
61 61
# check that hail pre/post saved state differs after relocation
62
./test/hail -v -v -v -p $TESTDATA_DIR/hail-reloc-drbd.json -S $T/hail-reloc >/dev/null 2>&1 && ! diff -q $T/hail-reloc.pre-ialloc $T/hail-reloc.post-ialloc
62
./htest/hail -v -v -v -p $TESTDATA_DIR/hail-reloc-drbd.json -S $T/hail-reloc >/dev/null 2>&1 && ! diff -q $T/hail-reloc.pre-ialloc $T/hail-reloc.post-ialloc
63 63
>>> /Files .* and .* differ/
64 64
>>>= 0
65 65

  
66 66
# evac tests
67
./test/hail $T/hail-node-evac.json.primary-only
67
./htest/hail $T/hail-node-evac.json.primary-only
68 68
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/
69 69
>>>= 0
70 70

  
71
./test/hail $T/hail-node-evac.json.secondary-only
71
./htest/hail $T/hail-node-evac.json.secondary-only
72 72
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/
73 73
>>>= 0
74 74

  
75
./test/hail $T/hail-node-evac.json.all
75
./htest/hail $T/hail-node-evac.json.all
76 76
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/
77 77
>>>= 0
b/htest/shelltests/htools-hspace.test
1 1
# test that hspace machine readable output looks correct
2
./test/hspace --simu p,4,8T,64g,16 --machine-readable --disk-template drbd -l 8
2
./htest/hspace --simu p,4,8T,64g,16 --machine-readable --disk-template drbd -l 8
3 3
>>> /^HTS_OK=1/
4 4
>>>= 0
5 5

  
6 6
# test again via a file and shell parsing
7
./test/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"
7
./htest/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 8
>>>= 0
b/htest/shelltests/htools-invalid.test
1 1
# invalid option test
2
./test/hail --no-such-option
2
./htest/hail --no-such-option
3 3
>>>= 2
4 4

  
5 5
# invalid option test
6
./test/hbal --no-such-option
6
./htest/hbal --no-such-option
7 7
>>>= 2
8 8

  
9 9
# invalid option test
10
./test/hspace --no-such-option
10
./htest/hspace --no-such-option
11 11
>>>= 2
12 12

  
13 13
# invalid option test
14
./test/hscan --no-such-option
14
./htest/hscan --no-such-option
15 15
>>>= 2
16 16

  
17 17
# invalid option test
18
./test/hinfo --no-such-option
18
./htest/hinfo --no-such-option
19 19
>>>= 2
20 20

  
21 21
# invalid option test
22
./test/hcheck --no-such-option
22
./htest/hcheck --no-such-option
23 23
>>>= 2
24 24

  
25 25
# extra arguments
26
./test/hspace unexpected-argument
26
./htest/hspace unexpected-argument
27 27
>>>2
28 28
Error: this program doesn't take any arguments.
29 29
>>>=1
30 30

  
31
./test/hbal unexpected-argument
31
./htest/hbal unexpected-argument
32 32
>>>2
33 33
Error: this program doesn't take any arguments.
34 34
>>>=1
35 35

  
36
./test/hinfo unexpected-argument
36
./htest/hinfo unexpected-argument
37 37
>>>2
38 38
Error: this program doesn't take any arguments.
39 39
>>>=1
40 40

  
41
./test/hcheck unexpected-argument
41
./htest/hcheck unexpected-argument
42 42
>>>2
43 43
Error: this program doesn't take any arguments.
44 44
>>>=1
b/htest/shelltests/htools-multi-group.test
1 1
# standard multi-group tests
2
./test/hinfo -v -v -p --print-instances -t$T/simu-twogroups.standard
2
./htest/hinfo -v -v -p --print-instances -t$T/simu-twogroups.standard
3 3
>>>= 0
4
./test/hbal -t$T/simu-twogroups.standard
4
./htest/hbal -t$T/simu-twogroups.standard
5 5
>>>= !0
6 6

  
7 7
# hbal should not be able to balance
8
./test/hbal -t$T/simu-twogroups.standard
8
./htest/hbal -t$T/simu-twogroups.standard
9 9
>>>2 /Found multiple node groups/
10 10
>>>= !0
11 11

  
12 12
# but hbal should be able to balance one node group
13
./test/hbal -t$T/simu-twogroups.standard -G group-01
13
./htest/hbal -t$T/simu-twogroups.standard -G group-01
14 14
>>>= 0
15 15
# and it should not find an invalid group
16
./test/hbal -t$T/simu-twogroups.standard -G no-such-group
16
./htest/hbal -t$T/simu-twogroups.standard -G no-such-group
17 17
>>>= !0
18 18

  
19 19
# tiered allocs multi-group tests
20
./test/hinfo -v -v -p --print-instances -t$T/simu-twogroups.tiered
20
./htest/hinfo -v -v -p --print-instances -t$T/simu-twogroups.tiered
21 21
>>>= 0
22
./test/hbal -t$T/simu-twogroups.tiered
22
./htest/hbal -t$T/simu-twogroups.tiered
23 23
>>>= !0
24 24

  
25 25
# hbal should not be able to balance
26
./test/hbal -t$T/simu-twogroups.tiered
26
./htest/hbal -t$T/simu-twogroups.tiered
27 27
>>>2 /Found multiple node groups/
28 28
>>>= !0
29 29

  
30 30
# but hbal should be able to balance one node group
31
./test/hbal -t$T/simu-twogroups.tiered -G group-01
31
./htest/hbal -t$T/simu-twogroups.tiered -G group-01
32 32
>>>= 0
33 33
# and it should not find an invalid group
34
./test/hbal -t$T/simu-twogroups.tiered -G no-such-group
34
./htest/hbal -t$T/simu-twogroups.tiered -G no-such-group
35 35
>>>= !0
36 36

  
37 37
# hcheck should be able to run with multiple groups
38
./test/hcheck -t$T/simu-twogroups.tiered --machine-readable
38
./htest/hcheck -t$T/simu-twogroups.tiered --machine-readable
39 39
>>> /HCHECK_OK=1/
40 40
>>>= 0
41 41

  
42 42
# hcheck should be able to improve a group with split instances
43
./test/hbal -t $TESTDATA_DIR/hbal-split-insts.data -G group-01 -O node-01-001
43
./htest/hbal -t $TESTDATA_DIR/hbal-split-insts.data -G group-01 -O node-01-001
44 44
>>> /Cluster score improved from .* to .*/
45 45
>>>= 0
b/htest/shelltests/htools-no-backend.test
1 1
# hail no input file
2
./test/hail
2
./htest/hail
3 3
>>>= 1
4 4

  
5 5
# hbal no backend
6
./test/hbal
6
./htest/hbal
7 7
>>>= 1
8 8

  
9 9
# hspace no backend
10
./test/hspace
10
./htest/hspace
11 11
>>>= 1
12 12

  
13 13
# hinfo no backend
14
./test/hinfo
14
./htest/hinfo
15 15
>>>= 1
16 16

  
17 17
# hbal multiple backends
18
./test/hbal -t /dev/null -m localhost
18
./htest/hbal -t /dev/null -m localhost
19 19
>>>2
20 20
Error: Only one of the rapi, luxi, and data files options should be given.
21 21
>>>= 1
b/htest/shelltests/htools-rapi.test
1 1
# test loading data via RAPI
2
./test/hinfo -v -v -p --print-instances -m $RAPI_URL
2
./htest/hinfo -v -v -p --print-instances -m $RAPI_URL
3 3
>>>= 0
4 4

  
5
./test/hbal -v -v -p --print-instances -m $RAPI_URL
5
./htest/hbal -v -v -p --print-instances -m $RAPI_URL
6 6
>>>= 0
7 7

  
8 8
# this compares generated files from hscan
b/htest/shelltests/htools-single-group.test
1 1
# standard single-group tests
2
./test/hinfo -v -v -p --print-instances -t$T/simu-onegroup.standard
2
./htest/hinfo -v -v -p --print-instances -t$T/simu-onegroup.standard
3 3
>>>= 0
4 4

  
5
./test/hbal  -v -v -p --print-instances -t$T/simu-onegroup.standard
5
./htest/hbal  -v -v -p --print-instances -t$T/simu-onegroup.standard
6 6
>>>= 0
7 7

  
8 8
# hbal should not be able to balance
9
./test/hbal -t$T/simu-onegroup.standard
9
./htest/hbal -t$T/simu-onegroup.standard
10 10
>>> /(Nothing to do, exiting|No solution found)/
11 11
>>>= 0
12 12

  
13 13

  
14 14
# tiered single-group tests
15
./test/hinfo -v -v -p --print-instances -t$T/simu-onegroup.tiered
15
./htest/hinfo -v -v -p --print-instances -t$T/simu-onegroup.tiered
16 16
>>>= 0
17 17

  
18
./test/hbal  -v -v -p --print-instances -t$T/simu-onegroup.tiered
18
./htest/hbal  -v -v -p --print-instances -t$T/simu-onegroup.tiered
19 19
>>>= 0
20 20

  
21 21
# hbal should not be able to balance
22
./test/hbal -t$T/simu-onegroup.tiered
22
./htest/hbal -t$T/simu-onegroup.tiered
23 23
>>> /(Nothing to do, exiting|No solution found)/
24 24
>>>= 0
25 25

  
26 26
# hcheck should not find reason to rebalance
27
./test/hcheck -t$T/simu-onegroup.tiered --machine-readable
27
./htest/hcheck -t$T/simu-onegroup.tiered --machine-readable
28 28
>>> /HCHECK_INIT_CLUSTER_NEED_REBALANCE=0/
29 29
>>>= 0
b/htest/shelltests/htools-text-backend.test
1 1
# missing resources test
2
./test/hbal -t $TESTDATA_DIR/missing-resources.data
2
./htest/hbal -t $TESTDATA_DIR/missing-resources.data
3 3
>>>2 /node node2 is missing .* ram and .* disk/
4 4
>>>= 0
5
./test/hinfo -t $TESTDATA_DIR/missing-resources.data
5
./htest/hinfo -t $TESTDATA_DIR/missing-resources.data
6 6
>>>2 /node node2 is missing .* ram and .* disk/
7 7
>>>= 0
8 8

  
9 9

  
10 10
# common suffix test
11
./test/hbal -t $TESTDATA_DIR/common-suffix.data -v -v
11
./htest/hbal -t $TESTDATA_DIR/common-suffix.data -v -v
12 12
>>>/Stripping common suffix of '\.example\.com' from names/
13 13
>>>= 0
14
./test/hinfo -t $TESTDATA_DIR/common-suffix.data -v -v
14
./htest/hinfo -t $TESTDATA_DIR/common-suffix.data -v -v
15 15
>>>/Stripping common suffix of '\.example\.com' from names/
16 16
>>>= 0
17 17

  
18 18

  
19 19
# invalid node test
20
./test/hbal -t $TESTDATA_DIR/invalid-node.data
20
./htest/hbal -t $TESTDATA_DIR/invalid-node.data
21 21
>>>2 /Unknown node '.*' for instance new-0/
22 22
>>>= !0
23 23

  
24
./test/hspace -t $TESTDATA_DIR/invalid-node.data
24
./htest/hspace -t $TESTDATA_DIR/invalid-node.data
25 25
>>>2 /Unknown node '.*' for instance new-0/
26 26
>>>= !0
27 27

  
28
./test/hinfo -t $TESTDATA_DIR/invalid-node.data
28
./htest/hinfo -t $TESTDATA_DIR/invalid-node.data
29 29
>>>2 /Unknown node '.*' for instance new-0/
30 30
>>>= !0

Also available in: Unified diff