Zdenek Kabelac
1daa1cc3a9
tests: use properly quoted device list
2017-07-12 13:50:25 +02:00
Zdenek Kabelac
5a91b0a2e2
tests: fix detection of running dmeventd after test
...
The checking order here has happend after TESTDIR was removed
resulting in weird further error on trap path.
Properly check for unexpected dmeventd before removing TESTDIR
since 'trap' codepath is still using it.
Also try to kill this unexpected dmeventd so testing is
not skipping all next dmeventd tests.
(Downside would be - if user would be accidentally starting
dmeventd by some regular system admin work - such dmeventd
might be killd if it's unused. It can't kill dmeventd in-use.
2017-07-12 13:38:07 +02:00
Zdenek Kabelac
d9ef564e42
tests: utils.sh drop gdb_commands.txt
...
Remove file after use (fixes recursive STACKTRACE calls)
2017-07-12 01:50:06 +02:00
Zdenek Kabelac
0f2dccc601
tests: bounds still more vars
2017-07-12 01:37:29 +02:00
Zdenek Kabelac
ec9b845aaa
tests: drop type
...
Assuming test wanted to check $lv3 does not exists.
2017-07-12 01:21:44 +02:00
Zdenek Kabelac
a1ed9bc145
tests: more exact test
...
Check there is really just linear.
Also short-circuit mimages_are_on_ when file is empty
(avoids unbound mimages[@] access on older bash)
2017-07-12 01:21:44 +02:00
Zdenek Kabelac
8387f4efc9
tests: more vars bounded
2017-07-12 01:21:44 +02:00
Zdenek Kabelac
2baac408fc
tests: aux.sh better loop logic
...
Instead of using pipe for read and haveing no chance
to modify shell vars inside such loop use <( )
and keep using bash arrays.
2017-07-12 01:21:44 +02:00
Zdenek Kabelac
b97f75b133
tests: improve logic for a race to catch abortion
2017-07-11 17:21:25 +02:00
Zdenek Kabelac
a87860965e
tests: hardening - no unbound vars
...
Dissallow usage of any unbound shell variable in tests.
All vars needs to have some defined value.
2017-07-11 16:48:25 +02:00
Zdenek Kabelac
41e11e0f21
tests: check.sh simplify in_sync
...
Avoid calling sed.
2017-07-11 16:26:12 +02:00
Zdenek Kabelac
5ab2676bac
tests: double quote
2017-07-11 16:26:12 +02:00
Zdenek Kabelac
21e0e98665
tests: correct typo
...
Use defined MARKED_AS_USED_MSG shell var.
2017-07-11 16:26:12 +02:00
Zdenek Kabelac
429e613ba8
tests: avoid unbound shell var usage
2017-07-11 16:26:12 +02:00
Zdenek Kabelac
f11e74ae3d
tests: improve test logic
...
Use existing vars.
Reduce extra lvchange -an and use directly activation with lvcreate.
2017-07-11 16:26:12 +02:00
Zdenek Kabelac
e9a544b942
tests: avoid using readarray
...
Real bashman can live without readarray.
Support older tested machines with bash <4.0....
2017-07-10 17:40:31 +02:00
Zdenek Kabelac
d23a475c98
tests: using prepare_vg
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
dafeb0274a
tests: assign path
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
f818a83a1d
tests: fix array usage
...
Use bash arrays to pass devs.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
85e5a8803c
tests: simplify and doublequote
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
1c9789b0cc
tests: use well defined test
...
Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Apparently && and || "short-circuit" while -a and -o do not.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
9c0a92ee8d
tests: cleaner written eval
...
Although code work this coding style is better.
This \c will be a regular 'c' in this context.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
ec05890026
tests: mixes string and array
...
Argument mixes string and array. Use * or separate argument
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
4e2fd6f6ab
tests: fix caller of mirror_images_on
...
Missed vg name.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
bc10d0373a
tests: fix working with devs in array
...
Also fixes one instance of invalid 'mirror_image_on' test
and places there correct indexed set of PVs.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
fdbb680531
tests: check mirror_images_on fixed
...
Fix mirror_images_on() to actually report something useful (thought
it might be tuned later).
So for now the function got through all '_mimages_' and compares
where the order of them is matching given list of devices.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
91d6a62fc5
tests: correcting usage of $@
...
Use "$@" (with quotes) to prevent whitespace problems.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
f161c6ee9f
tests: assign as string
...
Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
2e47ab9b8c
tests: secure rm call
...
Use "${var:?}" to ensure this never expands to / .
(Should never happen as 'dir' was supposed to exist from preceding
test.)
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
4ed3f1bee3
tests: improve loop
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
e68d986cd5
tests: check result directly
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
160cb1e713
tests: replace cat usage
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
e11de5847d
tests: add space to split words
...
Fixing shellcheck warning:
This word is outside of quotes. Did you intend to 'nest '"'single quotes'"' instead'?
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
270e526734
tests: fix tests variable
...
Actually check $r instead or 'r' for test failure.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
38917ee51c
tests: replace legacy code
...
Use $(..) instead of legacy `..`.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
d606891e4a
tests: fix quoting
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
494d819a6f
tests: drop extra sourcing of utils
...
This sourceing is automatic by . lib/inittest
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
ff2242036b
tests: drop useless literal
...
Here was usage of '\' unneeded.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
5214e62f09
tests: drop unneeded ;
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
c3d8ee4da2
tests: drop unneeded check
...
Test should actually fail in this condition as it's testing lvmetad.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
4a5eea7758
tests: drop unneeded echo
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
2d96b758e4
tests: drop unneeded cat
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
eba96a9720
tests: fix possible misspelling
...
Possible misspelling: FAILED_MIXED_STR may not be assigned, but FAIL_MIXED_STR is.
Possible misspelling: FAILED_MULTI_STR may not be assigned, but FAIL_MULTI_STR is.
Possible misspelling: FAILED_BLACK_STR may not be assigned, but FAIL_BLACK_STR is.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
d4345220cc
tests: avoid masking return values
...
Declare and assign separately to avoid masking return values.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
146bfb2417
tests: math drop uncessary $/${}
...
$/${} is unnecessary on arithmetic variables.
Use $((..)) instead of deprecated $[..]
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
72e82b42a9
tests: aux.sh tweaks
...
Some improvements.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
73cb5b486a
tests: aus.sh avoid duplicating arg list
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
f612fdd1dd
tests: aux.sh common pattern for starting daemons
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
4fc0166ca9
tests: aux.sh move corosyn
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
408e3b84f6
tests: cleanup msg
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
73bbd5528c
tests: scripts double quote
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
74ef5f07d0
tests: use read -r
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
7a8f87d28b
tests: replace egrep
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
bdd95051ed
tests: use bash array
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
efcbad25ee
tests: drop wc -l when grep -c works
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
e55bae2b2c
tests: use bash
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
24751b45bd
tests: double quote
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
5ca4fd0478
tests: correcting usage of '==' in bash
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
d12c0ae163
tests: utils.sh assign directly
...
Assign properly quoted vars in eval directly.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
f21d812127
tests: get.sh use simplier tr
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
d426d7e709
tests: aux.sh check for already present config
...
'aux lvmconf' detects if new config needs to be regenerated.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
32c0dc3549
tests: aux.sh double quote
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
84e83ac37e
tests: aux.sh replace sed call
...
Use internal shell vars manips
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
928a49a7c8
tests: aux.sh use grep -E
...
egrep is nonstandard.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
5bd09cb79d
tests: aux.sh drop useless echo
...
Simply trim on space.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
6be61bf044
tests: aux.sh check cd result
...
Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
2017-07-10 14:23:53 +02:00
Zdenek Kabelac
c87e1afa03
tests: export many shell vars with 1 command
2017-07-10 14:23:53 +02:00
Heinz Mauelshagen
70c340dbc2
test: return 0 if ignoring 'a' device health chars is requested
...
This allows lvconvert-raid-reshape-striped_to_linear.sh to succeed when
it reduces raid5 to two stripes before converting to raid1 and linear.
2017-07-04 19:34:10 +02:00
Zdenek Kabelac
006a9eaada
tests: aux.sh fix pattern
...
Commit 72a58ce4b0
fixed 'translation' of
pattern by bash by using "" - so we need to drop '\' here to get
wanted behavior.
2017-06-30 21:13:07 +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
52f4042f1a
cmdline: fix missing NULL at end of array of args
...
lvm_run needs to place NULL as the last element into argv[].
Otherwise we get:
Conditional jump or move depends on uninitialised value(s)
_command_required_pos_matches (lvmcmdline.c:1443)
_find_command (lvmcmdline.c:1610)
lvm_run_command (lvmcmdline.c:2770)
lvm2_run (lvmcmdlib.c:91)
2017-06-26 20:07:21 +02:00
Zdenek Kabelac
0cc49bda15
tests: show more debug info
...
Helpful for analysis (revert later).
2017-06-24 23:02:42 +02:00
Zdenek Kabelac
1b9bf5ce9e
tests: slightly longer delay
...
Try to avoid race with slightly longer delay.
2017-06-24 22:58:08 +02:00
Zdenek Kabelac
cac9e0b681
tests: correct percent values are reported
2017-06-24 17:44:42 +02:00
Zdenek Kabelac
cefb8bcfc4
tests: unit test for percent printing
2017-06-24 17:44:42 +02:00
Zdenek Kabelac
2a50a28f3e
tests: use allocate policy in raid test
2017-06-23 23:32:44 +02:00
Zdenek Kabelac
1598bf154e
tests: add transient failure test
...
Check raid repairs still 'present', but failed device.
TODO: tests needs more checking about repair actually doing its work.
2017-06-23 23:32:44 +02:00
Zdenek Kabelac
f48d1bf147
tests: require also no 'a' for in-sync
...
Raid easily reports 'idle' with 'a', so in this case
we will not report in-sync.
2017-06-23 23:32:44 +02:00
Zdenek Kabelac
535f7209d2
tests: request 1.12 for reshaping raid
...
We will need 1.12 as the kernel needs some mandatory md fixes,
otherwise random freezes may appear.
2017-06-23 18:44:01 +02:00
Zdenek Kabelac
d0c97b4401
tests: handle su login difference
...
Workaround case, where it matters if 'su' was user with '-' or without.
2017-06-23 18:44:01 +02:00
Zdenek Kabelac
cb2c2484b9
tests: flushing of cache is abortable
2017-06-22 20:17:20 +02:00
Zdenek Kabelac
7d5afcc0cb
tests: check lvdisplay for cache works
2017-06-22 20:17:20 +02:00
Zdenek Kabelac
93fbfa2ed3
tests: lvresize needs --yes
2017-06-21 14:03:29 +02:00
Zdenek Kabelac
710f51e7f2
tests: test also different lock holder
2017-06-20 18:25:10 +02:00
Zdenek Kabelac
3d591ac376
tests: avoid double lines
...
Skip showing same line twice in test's verbose log.
2017-06-20 18:24:52 +02:00
Zdenek Kabelac
31cd01c9b3
tests: check conversion of thin-pool
2017-06-19 23:30:11 +02:00
Jonathan Brassow
915d20d0e6
test: New test file for validating kernel status during sync ops
...
New tests to add checking for '100%' in-sync at start of "recover"
process (it shouldn't happen, but I've seen it before). Also,
check status over the whole cycle of various sync processes ("resync"
and "recover").
2017-06-16 10:16:07 -05:00
Zdenek Kabelac
dd866a67f4
tests: use exclusive activation
...
Conversion needs exlusively active LV for clustered testing.
2017-06-16 17:04:02 +02:00
Jonathan Brassow
3592243afb
test: New test file for validating kernel status during sync ops
...
First test in this file checks whether 'aa' is ever spotted during
a "recover" operation (it should not be). More tests should follow
in this file to look for oddities in status output - especially as
it relates to the sync_ratio, dev_health, and sync_action fields.
2017-06-15 11:06:08 -05:00
Jonathan Brassow
1f57a5263e
clean-ups: remove unused var, add 'static' for local fn, adjust test
...
For the test clean-up, I was providing too many devices to the first
command - possibly allowing it to allocate in the wrong place. I was
also not providing a device for the second command - virtually ensuring
the test was not performing correctly at times.
2017-06-14 14:49:42 -05:00
Jonathan Brassow
ddb14b6b05
lvconvert: Disallow removal of primary when up-converting (recovering)
...
This patch ensures that under normal conditions (i.e. not during repair
operations) that users are prevented from removing devices that would
cause data loss.
When a RAID1 is undergoing its initial sync, it is ok to remove all but
one of the images because they have all existed since creation and
contain all the data written since the array was created. OTOH, if the
RAID1 was created as a result of an up-convert from linear, it is very
important not to let the user remove the primary image (the source of
all the data). They should be allowed to remove any devices they want
and as many as they want as long as one original (primary) device is left
during a "recover" (aka up-convert).
This fixes bug 1461187 and includes the necessary regression tests.
2017-06-14 08:41:05 -05:00
Jonathan Brassow
c87907dcd5
lvconvert: linear -> raid1 upconvert should cause "recover" not "resync"
...
Two of the sync actions performed by the kernel (aka MD runtime) are
"resync" and "recover". The "resync" refers to when an entirely new array
is going through the process of initializing (or resynchronizing after an
unexpected shutdown). The "recover" is the process of initializing a new
member device to the array. So, a brand new array with all new devices
will undergo "resync". An array with replaced or added sub-LVs will undergo
"recover".
These two states are treated very differently when failures happen. If any
device is lost or replaced while "resync", there are no worries. This is
because any writes created from the inception of the array have occurred to
all the devices and can be safely recovered. Even though non-initialized
portions will still be resync'ed with uninitialized data, it is ok. However,
if a pre-existing device is lost (aka, the original linear device in a
linear -> raid1 convert) during a "recover", data loss can be the result.
Thus, writes are errored by the kernel and recovery is halted. The failed
device must be restored or removed. This is the correct behavior.
Unfortunately, we were treating an up-convert from linear as a "resync"
when we should have been treating it as a "recover". This patch
removes the special case for linear upconvert. It allows each new image
sub-LV to be marked with a rebuild flag and treats the array as 'in-sync'.
This has the correct effect of causing the upconvert to be treated as a
"recover" rather than a "resync". There is no need to flag these two states
differently in LVM metadata, because they are already considered differently
by the kernel RAID metadata. (Any activation/deactivation will properly
resume the "recover" process and not a "resync" process.)
We make this behavior change based on the presense of dm-raid target
version 1.9.0+.
2017-06-14 08:35:22 -05:00
Zdenek Kabelac
b6945b8510
tests: no longer allowed too big thin-pools for small chunks
2017-06-09 13:03:42 +02:00
Zdenek Kabelac
b3ef051e06
cache: lvcreate --cachepool checks for cache pool
...
Code path missed validation of lvcreate --cachepool argument.
If the non cache-pool LV was passed in, code has still continued
further work and failed later on internal error. Validate this
condition at right place now.
2017-06-09 10:59:37 +02:00
Zdenek Kabelac
f91ea96b4f
tests: fix compilation of unit tests
...
Rule for TARGET compiling got missing and needs to be explicitely
expressed, otherwise default unsuitable rule is applied.
2017-06-08 11:59:02 +02:00
Zdenek Kabelac
ee5ecde35e
tests: check thin-pool boundary sizes
2017-06-08 11:58:36 +02:00
Zdenek Kabelac
743ffb1962
tests: longer delay
...
Slower sync a bit more and use bigger raid arrays to
be more sure we will catch raid being sychronized.
2017-05-31 13:59:42 +02:00
Zdenek Kabelac
42b87c23e2
tests: add some extra udev waits
...
To get less random results on older systems with systemd (i.e. fc23)
put few extra udev wait operations to avoid any udev event collision.
2017-05-31 13:23:34 +02:00
Zdenek Kabelac
091c55a13f
tests: skip reshaping raid10
...
Needs newer target >= 1.10.1 for reshaping of raid10 LVs.
2017-05-31 12:59:53 +02:00
Zdenek Kabelac
c245996d70
tests: missed to export lvm binary for fsadm
2017-05-30 18:43:56 +02:00
Zdenek Kabelac
b876e8c915
tests: drop extra debug vvvv
...
Also show output of mount so when it fails we can check the state.
2017-05-30 18:43:56 +02:00
Zdenek Kabelac
7c84c5c421
tests: also check new flag with segtype
...
Make sure new unknown flag is having same behavior as old unknown segtype.
2017-05-30 18:43:56 +02:00
Zdenek Kabelac
597b3576c7
tests: wait for raid in sync
...
Lvchange needs synchronized raid.
2017-05-29 14:41:53 +02:00
Marian Csontos
223c594f0e
test: Fix dbus testing using testsuite
...
- Must reread all objects as PVs might be removed.
- Never consider testsuite provided PVs nested, or tearDown fails to
remove any outstanding VGs on them.
2017-05-26 15:39:20 +02:00
Marian Csontos
7687ab82c8
test: Use _pv suffix for nested devices
...
Testsuite uses global_filter to accept only test devices with
suffix matching /_pv[0-9_]*$/ set by generate_config in aux.sh.
2017-05-26 08:33:39 +02:00
Zdenek Kabelac
5e8beb4023
tests: fix test for fsadm
...
Avoid mountinfo
Pass 'y' - since ATM lvresize cannot pass --yes to fsadm.
2017-05-23 14:02:43 +02:00
Zdenek Kabelac
3877ef0e43
tests: catch some fsadm tricky paths
...
When user is renaming a device, we are getting into troubles.
We needs to recognize which case is actually supportable by fsadm.
2017-05-22 15:12:31 +02:00
Marian Csontos
9291fb7bf5
test: Fix condition
2017-05-17 11:43:49 +02:00
Marian Csontos
1fb13e8660
test: Fix skipped cleanup
2017-05-17 11:37:29 +02:00
Heinz Mauelshagen
48408ece6d
test: add missing yes option to lvconvert stripe removal
2017-05-16 17:52:54 +02:00
Marian Csontos
f4f408610c
test: Fix previous commit - skip only RAID6 part
2017-05-16 10:47:53 +02:00
Marian Csontos
cdb49216c5
test: Update condition for changing RAID regionsize
...
The test is failing on F23 and F25 with 1.9.1
2017-05-16 10:44:52 +02:00
Zdenek Kabelac
b817cc5746
tests: better skip
2017-05-10 15:40:32 +02:00
Zdenek Kabelac
455a4de090
dmeventd: restore multiple warnings
...
With recent updates for thin pool monitoring in version 169
we lost multiple WARNINGs to be printed in syslog, when
pool crossed 80%, 85%, 90%, 95%, 100%.
Restore this logic as we want to keep user informed more
then just once when 80% boundary is passed.
2017-05-10 15:39:36 +02:00
Tony Asleson
fcce7e1660
lvmdbustest.py: Add PV symlink testing
...
We fixed this issue once before and it's back, add a test to make
sure it never comes back again!
https://bugzilla.redhat.com/show_bug.cgi?id=1318754
https://bugzilla.redhat.com/show_bug.cgi?id=1445654
2017-05-05 10:30:06 -05:00
David Teigland
4f9ff14508
pvcreate: add prompt when setting dev size
...
If the device size does not match the size requested
by --setphysicalvolumesize, then prompt the user.
Make the pvcreate checking/prompting code handle
multiple prompts for the same device, since the
new prompt can be in addition to the existing
prompt when the PV is in a VG.
2017-04-27 13:25:41 -05:00
Heinz Mauelshagen
33afe2ca76
test: add -y to raid1 up conversions
2017-04-27 15:56:58 +02:00
Marian Csontos
14c84c79db
test: Update pattern to match code
...
Fix commit a3fdc966b5
2017-04-27 15:30:03 +02:00
Alasdair G Kergon
813bcb24f0
test: Add -y to pvresize --setphysicalvolumesize
2017-04-27 02:57:59 +01:00
Tony Asleson
e50fb06792
lvmdbustest.py: Add nested testing
...
Make sure when a LV is used as a PV the dbus service works correctly.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
2017-04-26 07:30:45 -05:00
Tony Asleson
6de3a9b4d0
lvmdbustest.py: Handle nested setUp & tearDown
...
Handle cleaning up correctly if a LV is used as a PV.
2017-04-26 07:10:18 -05:00
Heinz Mauelshagen
effeb2b93d
test: add raid4 to upconvert allocation failure tests
2017-04-22 00:43:31 +02:00
Heinz Mauelshagen
149e4fa04b
test: consider changed default
...
commit b81b4aad24
raised the region size so demand the sizes the
test checks for.
2017-04-22 00:42:09 +02:00
Heinz Mauelshagen
7c7122a3b1
test: add upconvert allocation failure tests
2017-04-21 20:57:31 +02:00
Heinz Mauelshagen
d48b816764
test: also prevent lvconvert-raid-reshape.sh on single core
2017-04-21 02:17:55 +02:00
Heinz Mauelshagen
a004cceed2
test: Adjust previous commit
...
Change have_single_core to have_multi_core and go back to || logic in related test scripts.
2017-04-21 01:21:24 +02:00
Heinz Mauelshagen
18bf954801
test: Fix skip some reshape tests that hang on single core machines
...
Fix commit c7fb0cb861
.
2017-04-20 21:45:56 +02:00
Alasdair G Kergon
c7fb0cb861
test: Skip some reshape tests that hang on single core machines
...
Skip hanging raid reshape tests until https://bugzilla.redhat.com/1443999
is fixed
2017-04-20 20:05:07 +01:00
Zdenek Kabelac
aa25cfe084
test: correcting binary usage
...
Ensure 'test suite' run uses fsadm and dmeventd from compiled dir,
while for 'rpm' installed test use binaries installed in system.
2017-04-14 01:03:18 +02:00
David Teigland
0ea9a15612
tests: use raid_region_size 512
...
given the new default from 5ae7a016b8
2017-04-13 14:21:34 -05:00
Zdenek Kabelac
a3e8354479
tests: use egrep to check for message
...
Seems we may get different '' around option on different nixes.
2017-04-12 23:05:50 +02:00
Zdenek Kabelac
59d54d70e7
tests: aux defines fsadm path
2017-04-12 23:05:50 +02:00
Zdenek Kabelac
56704383bf
tests: test for new supported commands
...
New tests for:
lvconvert --regionsize | --swapmetadata | --startpoll |
--mergesnapshot | mergethin
2017-04-12 21:34:08 +02:00
Zdenek Kabelac
f8034e14e6
tests: restore some test changes
...
Restore existing tests and separate new tests
for new options later.
Keep coverage for existing syntax
Reverts bits from commits:
a801b92b2c
.
d71aaca07b
fa2a728a39
1e2420bca8
46abc28a48
0e3e611a13
2017-04-12 21:34:08 +02:00
Zdenek Kabelac
1095322901
thin: properly check for status for max sizes metadata
...
When metadata LV size was over DM_THIN_MAX_METADATA_SIZE sectors,
the info() routine was incorrectly trying to match bigger size,
while we do never pass any bigger device.
Fixing a case, where lvs should be displaying status for metadata
LV with 16GB size.
2017-04-12 21:34:08 +02:00
Heinz Mauelshagen
532388fad5
lvconvert: fix failing valid regionsize change
...
Reshape check failed when regionsize changed and current raid type
was provided with no other change requested (stripes or stripesize).
E.g. "lvconvert --type raid6 --regionsize 256K" on a raid6 LV
with != 256K regionsize.
Enable --type in test script.
2017-04-12 14:38:49 +02:00
Heinz Mauelshagen
0f65d7ec3a
lvconvert: prompt on raid1 image changes
...
Don't change resilience of raid1 LVs without --yes.
Adjust respective tests.
2017-04-06 18:47:41 +02:00
Zdenek Kabelac
fb1f38a6f6
tests: fix LD_LIBRARY_PATH
...
Use only selected paths for finding .so in builddir.
So if builddir constains some embeded subdirs with some more
occurences of project (i.e. 'make rpm' build subdir)
those library paths will not get into list.
2017-03-31 17:12:00 +02:00
Zdenek Kabelac
df86ee8c21
tests: fix typo in makefile
...
Use properly $(SORT)
2017-03-30 00:38:41 +02:00
Zdenek Kabelac
88e408b8ed
tests: update to better fit
...
Die is automatic on 'error' result
Cleanup everything on 'regular' code path.
2017-03-27 20:50:19 +02:00
Zdenek Kabelac
17b56a4aed
tests: early detect leaking error dev
...
lvconvert should not leak 'error' device.
(This patch is not fix the problem, just makes it more easily visible
instead of more confusing 'clvmd' trace).
2017-03-20 14:18:50 +01:00
Zdenek Kabelac
07ea9887d3
tests: raise min dm cache version
...
Since we want to test different cache policies with profiles mq&smq
raise version to 1.8.
TODO: maybe split in more tests so older targets can test here as well.
N.B.: passthrough is also not supported with version 1.3
2017-03-17 14:22:33 +01:00
Heinz Mauelshagen
17bee733d1
raid: conditionally reject convert to striped/raid0*
...
If SubLVs to be removed still exist after an image removing
conversion (i.e. "lvconvert --yes --force --stripes N "
with N < total stripes) any request to convert to a different
striped/raid* level has to be rejected until after those freed
SubLVs got removed by running the aforementioned lvconvert again.
Add tests to check conversion to striped/raid* gets rejected.
Enhance a test comment.
Related: rhbz1191935
Related: rhbz1366296
2017-03-17 13:58:54 +01:00
Heinz Mauelshagen
b0336e8b3c
lvconvert: ensure upconversion restrictions
...
Ensure minimum number of 3 data stripes on conversions to raid6.
Add test for it.
Resolves: rhbz1432675
2017-03-16 22:10:32 +01:00
Heinz Mauelshagen
76b843a4bf
test: adjust to proper dm-raid target version
...
Adjust to final target version 1.10.1 supporting reshape
properly and to recently changed report field specifications
(e.g. rehape_len_le) to allow these tests to run.
Lower mirror region size to suite the tiny test VG.
2017-03-16 21:17:58 +01:00
Zdenek Kabelac
51b9de7249
tests: better disk delay
...
Delay only writable extents.
Skip zeroing for earlier lvcreate finish.
2017-03-16 08:49:52 +01:00
Zdenek Kabelac
7fa08ae4e8
tests: add missing --yes
2017-03-16 08:44:44 +01:00
Zdenek Kabelac
53f5cf0af0
tests: cache profile and metadata2
...
New tests trying to cover support syntax variants.
A lot it still missing...
2017-03-10 19:33:02 +01:00
Zdenek Kabelac
c717011f8e
tests: use LVM_SYSTEM_DIR for etc
...
Instead of hardcoding etc/ dir use $LVM_SYSTEM_DIR.
2017-03-10 19:33:01 +01:00
Tony Asleson
97b6486b27
lvmdbustest.py: Correct debug & assert order
...
If we do the assert first we won't get to the print statement.
2017-03-09 16:39:47 -06:00
Tony Asleson
ee7946ed82
lvmdbustest.py: Correct call_lvm doc
2017-03-09 16:39:47 -06:00
Tony Asleson
28754145d8
lvmdbustest.py: Add unit test for external PV create
...
Ensure a PV created outside of the dbus service is immediately found by
service user.
2017-03-09 16:39:47 -06:00
Tony Asleson
e06e4d9355
lvmdbustest.py: Add unit test for external LV create
...
Ensure a LV created outside of the dbus service is immediately found by
service user.
2017-03-09 16:39:47 -06:00
Tony Asleson
43d0fbeba2
lvmdbustest.py: Add unit test for external VG create
...
Ensure a VG created outside of the dbus service is immediately found by
service user.
2017-03-09 16:39:47 -06:00
Tony Asleson
92b7c329ee
lvmdbustest.py: Remove un-used import time
2017-03-09 16:39:47 -06:00
David Teigland
716c345334
tests relative-sign-options: only skip thin part
2017-03-09 11:29:54 -06:00
David Teigland
43bcd7393c
tests relative-sign-options.sh: skip without thin
2017-03-09 10:43:41 -06:00
Heinz Mauelshagen
6dfe1ce251
lvconvert: prompt when splitting off LV of a 2-legged raid1 LV
...
Splitting off an image LV of a 2-legged
raid1 LV causes loss of resilience.
Ask user to avoid uninformed loss of all resilience.
Don't ask for N > 2 legged raid1 LVs.
Adjust tests.
2017-03-09 13:59:47 +01:00
Heinz Mauelshagen
6b1b66c266
test: raid1 down convert to linear
...
Missed one test in last commit.
2017-03-09 13:21:21 +01:00
Heinz Mauelshagen
4b0ae266c2
test: raid1 down convert to linear
...
Add/adjust more tests for commit 7fbe6ef16b
.
2017-03-09 13:16:08 +01:00
Heinz Mauelshagen
3d1df10af3
test: raid1 down convert to linear / split and track tests
...
Add/adjust tests for commits d250aa7208
and 7fbe6ef16b
.
2017-03-09 04:01:47 +01:00
Heinz Mauelshagen
8daad11666
test: "lvconvert --repair" after vgreduce
...
Add test for commit 921b496fff
.
2017-03-09 02:35:57 +01:00
Heinz Mauelshagen
00b8c2bebc
test: Copyright
2017-03-09 00:10:55 +01:00
David Teigland
14c7912f45
tests: add test for relative option values
...
Combinations of: lvcreate/lvresize/lvextend/lvreduce,
--size/--extents/--poolmetadatasize, +/-/nosign.
2017-03-08 13:51:33 -06:00
Heinz Mauelshagen
43fb4aa69b
test: add delay to lvchange-raid1-writemostly.sh
...
Commit 8ab0725077
introduced this new test.
Add a read delay to the PVs to avoid a race
in the script causing the test to fail.
Correct comment.
2017-03-07 15:18:13 +01:00
Heinz Mauelshagen
17838e6439
test: fix typo
2017-03-03 23:22:29 +01:00
Tony Asleson
26ca308ba9
lvmdbustest.py: Remove un-used variable
...
Not needed with new validation function.
2017-03-01 17:47:04 -06:00
Tony Asleson
7b0371e74e
lvmdbustest.py: Validate LV lookups
...
Ensure that the LV lookups work as expected for newly created LVs.
2017-03-01 17:47:04 -06:00