Zdenek Kabelac
2ceb5a0abb
coverity: just make impossible division by zero
...
Visible for analyzer code will not try to use 0 for division.
2017-06-30 20:39:23 +02:00
Zdenek Kabelac
3d08b0971f
man_generator: release buffer after use
...
Although ATM this code has no memory management at all,
it will not make any harm to release some memory,
when it's not needed anymore.
2017-06-30 20:39:02 +02:00
Zdenek Kabelac
ad286a3227
raid: ensure enum is defined
...
Just making sure enum is always defined.
TODO: code path using this enum needs closer inspection.
2017-06-30 20:39:02 +02:00
Zdenek Kabelac
c31614eccc
tests: aux.sh use subshell for simple redirection
2017-06-30 17:08:47 +02:00
Zdenek Kabelac
57779e39ec
tests: correcting globbing usage
...
Ensure globbing uses current dir.
Break loop when no match is found.
Let STACKTRACE finish its output when gdb fails.
2017-06-30 14:40:50 +02:00
Zdenek Kabelac
9348ad4f16
tests: aux prepares lvmdbusd
...
Correctly skip the test when lvmdbusd is found already running.
For pgrep usage we need to add '-f -l' options to get python3 name
printed.
Remove no longer used 'pids' local var.
2017-06-30 12:12:16 +02:00
Zdenek Kabelac
674a93ffe3
tests: aux do not specify bitmap for raid0
2017-06-30 12:09:10 +02:00
Zdenek Kabelac
596cf2c6fa
tests: check LV in proper VG
2017-06-30 12:09:10 +02:00
Zdenek Kabelac
e84a145cf4
tests: check.sh uses array for list
...
For properly quoted args, switch to use arrays for arg list.
2017-06-30 12:09:10 +02:00
Zdenek Kabelac
c613fa48ff
tests: api updates
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
3d90c7fffc
tests: get.sh declare and assign separately
...
Declare and assign separately to avoid masking return values.
Also comment-out currently unused orig variable.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
834b82b0cd
tests: get.sh double quote
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
d7b3815223
tests: utils.sh separately assign
...
Declare and assign separately to avoid masking return values.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
cf4b671acd
tests: utils.sh avoid iterating over ls output
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
4697937af4
tests: utils.sh arithmetic
...
expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
$ is unnecessary on arithmetic variables.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
00957450eb
tests: utils.sh no mixed string array
...
Argument mixes string and array. Use * or separate argument.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
c396053955
tests: utils.sh double quote
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
b442861f50
tests: lvm-wrapper.sh legacy syntax
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
b1f80512c8
tests: lvm-wrapper.sh double quote
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
32be18959d
tests: inittest.sh double quote and mixing string
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
b45ca523ec
tests: check.sh eliminate useless cat
...
Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
51237cb504
tests: check.sh better if
...
Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
db338c2b42
tests: check.sh drop unnecessary $
...
$/${} is unnecessary on arithmetic variables.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
c0197040a5
tests: check.sh using grep -F
...
fgrep is non-standard and deprecated. Use grep -F instead.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
824db54128
tests: check.sh no mixing string
...
Argument mixes string and array. Use * or separate argument.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
810f856c24
tests: check.sh assign separately
...
Declare and assign separately to avoid masking return values.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
02729202f3
tests: check.sh double quote
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
491fcd2a92
tests: aux.sh fix pid handling
...
Modification of pids is local (to subshell caused by pipeline).
pids was modified in a subshell. That change might be lost.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
96fcf82ddd
tests: aux.sh add -r to read
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
ec02307e95
tests: aux.sh array assing
...
Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
8a912d6dbc
tests: aux.sh separately assign
...
Declare and assign separately to avoid masking return values.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
4f63b7e9c1
tests: aux.sh using grep -c
...
Consider using grep -c instead of grep|wc -l.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
b16ca76260
tests: aux.sh no mixing string
...
Argument mixes string and array. Use * or separate argument.
2017-06-29 22:23:17 +02:00
Zdenek Kabelac
44e530b919
tests: aux.sh drop unnecessary $
...
$/${} is unnecessary on arithmetic variables.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
474e3cd66d
tests: aux.sh use pgrep
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
72a58ce4b0
tests: aux.sh double quote
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
191dadc623
clvmd_fix_conf.sh: double quote
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
99925d0d41
clvmd_fix_conf.sh: legacy code
...
Use $(..) instead of legacy `..`.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
afa0bd916e
vgimportclone.sh: do not quote regex
...
Don't quote rhs of =~, it'll match literally rather than as a regex.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
ef4506069a
vgimportclone.sh: use well defined tests
...
Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
8dc29d7cc7
vgimportclone.sh: drop extra $
...
$/${} is unnecessary on arithmetic variables.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
16a38dede9
vgimportclone.sh: add -r to read
...
read without -r will mangle backslashes.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
588b12e71d
vgimportclone.sh: avoid legacy syntax
...
Use $(..) instead of legacy `..`.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
d745593e89
vgimportclone.sh: cannot trap signal 9
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
275eeb4631
vgimportclone.sh: double quote
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
96a2e00240
vgimportclone.sh: no mixing string and array
...
Argument mixes string and array. Use * or separate argument.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
4d34bc65dd
lvm2_cluster_activation_red_hat.sh: double quote
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
051c7f88cf
lvmconf_lockingtype2: double quote
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
ef8691a2d2
lvmconf_lockingtype2: preferable syntax
...
Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
2017-06-29 22:23:16 +02:00
Zdenek Kabelac
030912ec03
lvmdump: replace individual redirects
...
Consider using { cmd1; cmd2; } >> file instead of individual redirects.
2017-06-29 22:23:16 +02:00