1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
Commit Graph

487 Commits

Author SHA1 Message Date
Petr Rockai
db22d9b978 This patchset refactors some reporting code and completes the remaining
lvseg properties for lvm2app, 'devices' and 'seg_pe_ranges'.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2011-04-12 12:24:29 +00:00
Zdenek Kabelac
e6609094f7 Testing: remove -q from grep
to avoid any problems with pipe breaking.
2011-03-30 13:39:24 +00:00
Zdenek Kabelac
114faabf04 Reduce amount of vgremove and vgchange calls
A bit noticable time defference when whole test-suite is run through valgrind.
2011-03-28 11:35:20 +00:00
Zdenek Kabelac
1092ae2dbe Indent spaces to tabs 2011-03-10 14:47:22 +00:00
Milan Broz
5446fc8cea Fix test for 8k page (fails on Sparc architecture). 2011-03-06 18:28:09 +00:00
Milan Broz
e7f77b36f5 Make the lock test a little bit better... 2011-03-04 15:04:08 +00:00
Milan Broz
90c9d95c15 Wait until dmeventd properly starts in test. 2011-03-04 14:19:18 +00:00
Zdenek Kabelac
26e000eecf Leave some time to scheduler
Looks like scheduler prefers running task before exiting tasks.
So leave some time to finish running flock process.
2011-03-03 16:04:53 +00:00
Zdenek Kabelac
6a9646d1ce Avoid using pipes on lv commands
Failure on pipe kills lv command and produces memory stacktrace.
Add 'true' for empty grep/sed to avoid generating stacktrace.

This should help with long time (7min) for this test on Lenny testing maching
(mimage was filler with stacktrace and each word was used as LV name).
2011-03-03 15:46:05 +00:00
Milan Broz
8595f0c6ac Fix test, "echo n" is not needed when -y is specified. 2011-03-03 14:16:08 +00:00
Zdenek Kabelac
d75045cfb3 Do not echo y to lvconvert
This lvconvert is now able to complete operation automatically without question.
So remove  'echo y |'  - it's breaking pipe on some bash versions.

i.e.:
+ echo y
./t-lvconvert-mirror-basic.sh: line 104: echo: write error: Broken pipe

while command has completed this operation succesfully
2011-03-03 12:30:33 +00:00
Milan Broz
119dd6604e Increase check timeout again.
It fails on my s390x Hercules emulator otherwise. :)
2011-03-02 20:14:39 +00:00
Milan Broz
c17d430b1f Fix test to use explicit /dev/mapper/ node, /proc/mounts should not change this...
(failed on RHEL5)
2011-03-02 13:49:29 +00:00
Petr Rockai
61394ca4aa As requested in BZ 454618:
- dmeventd -R will continue to start up even if no dmeventd is currently
  running + a test for this behaviour
- add -R to dmeventd manpage
2011-03-02 12:49:13 +00:00
Milan Broz
6ae59c32a0 Rather return success if skipping udev wait. 2011-03-01 23:44:07 +00:00
Zdenek Kabelac
a912d581c4 Invert condition for READLINE check 2011-03-01 23:29:14 +00:00
Zdenek Kabelac
e3dd1c81e9 Build test.c also without readline library
Allow bulding of this testing tool also without readline library.
Outputs message about build without readline library then.
2011-03-01 23:18:40 +00:00
Milan Broz
16d0725dd3 Fix tests if udevadm missing (old udev). 2011-03-01 22:28:27 +00:00
Zdenek Kabelac
11ec59c8d5 Quick fix to compile lvm2api tests when possible
Do not build lvm2api tests when lvm2api lib is not enabled.
2011-03-01 21:30:43 +00:00
Zdenek Kabelac
683ef85a1e Use backward compatible configuration for test
Currently the test are not properly working with new code.
Use settings for the previous behaviour.

FIXME: update tests to properly test new allocation policies.
2011-02-28 19:44:21 +00:00
Peter Rajnoha
4b8f066c19 vgconvert is fixed now to work with the changes in metadata area handling - enable the tests.
Add a small fix that preserves pe_start for lvm1 PVs when being converted.

(this fix needs to be replaced with something more clever, but let's have this working now)
2011-02-25 14:12:14 +00:00
Peter Rajnoha
812f4ca12a Temporarily disable 'convert a VG from lvm2 to lvm1 format' test until a known issue is resolved.
Otherwise we get an error:

  PV segment VG free_count mismatch: 32 != 33
  PV segment VG extent_count mismatch: 32 != 33
2011-02-21 12:37:33 +00:00
Zdenek Kabelac
794e94fe16 Replace PV_MIN_SIZE with function pv_min_size()
Add configurable option to define minimal size of
of block device usable as a PV.

pv_min_size() is added to lvm-globals and it's being
initialized through _process_config.

Macro PV_MIN_SIZE is unused and removed.

New define DEFAULT_PV_MIN_SIZE_KB is added to lvm-global
and unlike PV_MIN_SIZE it uses KB units.

Should help users with various slow devices attached to the system,
which cannot be easily filtered out (like FDD on /dev/sdX):
https://bugzilla.redhat.com/show_bug.cgi?id=644578
2011-02-18 14:11:22 +00:00
Petr Rockai
d79ce8aa05 Allow overriding the DM_DEV_DIR used by the test suite (fixes BZ 672796). Use
like this:

# LVM_TEST_DEVDIR=/tmp/dev make check
2011-02-09 17:57:14 +00:00
Zdenek Kabelac
d6833cc7fa Skip sysinit test for cluster
Add #bin/bash to utils.sh
and update fsadm test to current version of aux script
2011-01-31 22:05:30 +00:00
Zdenek Kabelac
116cbc267c Fix udev synchronization for no-locking mode
Instead of implicitly syncing udev operation in clustered and
file locking code -  call synchronization directly in lock_vol() when
the operation unlocks VG

The problem is missing implicit fs_unlock() in the no_locking code.
This is used with --sysinit on read-only filesystem locking dir.
In this case vgchange -ay could exit before all udev nodes are properly
synchronised and may cause problems with accessing such node right after
vgchange --sysinint command is finished.

Add test case for vgchange --sysinit.
2011-01-31 19:52:40 +00:00
Zdenek Kabelac
733b05a693 Lower device size of pvmove test
Lower the size of devices in this test for speedup.
And check only once that  LVs are prepared properly.
2011-01-28 16:15:08 +00:00
Zdenek Kabelac
194afbe34d Lower disk space usage of inconsistent mda test
Smaller size of devices speedups this test.
2011-01-28 16:13:39 +00:00
Zdenek Kabelac
2c3190b237 Replacei sleep wait with udev settle
Use new udev_wait command instead of unpredictable sleep waiting.
As with more devices in the system, udev processing is slower.
2011-01-28 16:12:45 +00:00
Zdenek Kabelac
8f7cff6aec Query only test related vg name 2011-01-28 16:11:14 +00:00
Zdenek Kabelac
6bd4a36dde Add command to wait for udevadm settle 2011-01-28 16:10:21 +00:00
Zdenek Kabelac
8f0b0fea66 Do not break pipes
As the option 'set -e -o pipefail' is very sensite on pipe breaking
stop using '-q' for grep commands.

Otherwise this command (with large enough table) would fail:

 dmsetup table | egrep -q

with exit code 141 (128 + SIGPIPE)

As Peter suggested, he prefers to keep '-o pipefail' - so make sure all
piped commands will read the whole output and will not exit too early.
2011-01-28 16:08:39 +00:00
Zdenek Kabelac
a222da0456 Accelerate mirror tests
Instead of recreation of whole device set for each test round,
just cleanup created LVs to empty VG.
Lower the size of PV devices to 16MB
2011-01-28 16:07:04 +00:00
Zdenek Kabelac
fdc5e381d8 Display duration of tests when it passed.
Enhance output with info about the test duration.
Cleanup few declarations in the code.
2011-01-28 16:05:38 +00:00
Zdenek Kabelac
23fb1fbd48 Add missing lvm_quit in test
Fix occasional confusing memory leak report in testing.
2011-01-26 21:21:56 +00:00
Jonathan Earl Brassow
af7697efbe Add test to make sure that a log device is retained when a
mirror image fails and the policies are set to:
 mirror_image_fault_policy = "replace"
 mirror_log_fault_policy = "remove"
2011-01-19 19:22:07 +00:00
Zdenek Kabelac
e84c7c7c63 Remove -f from list of targets for cleanup
rm -f is already in used for this cleanup.
2011-01-17 15:18:10 +00:00
Zdenek Kabelac
888d273f9a Set default value to counter_last
Missed in previous commit and could be using some random stack value.
2011-01-13 15:03:28 +00:00
Zdenek Kabelac
84b6fab321 Include default make.tmpl
Use default clean targets for this Makefile
Use also same build flags for compiling testing tools like harness.
2011-01-13 14:58:59 +00:00
Zdenek Kabelac
424873390b Enable monitoring for cluster tests 2011-01-13 14:57:18 +00:00
Zdenek Kabelac
c6e087d54a Check for file with clvmd pid
Instead of checking  $LOCAL_CLVMD set during some 'aux' execution which
doesn't seem to be propagated to this shell - check for existance of pid
file of clvmd process - so this test is skipped in singlenode cluster test.
2011-01-13 11:05:27 +00:00
Zdenek Kabelac
d044827d9a Hotfix to stop harness busylooping
Harness seems to be able to busyloop in while cycle and not moving forward
for certain buffer - so check whethere there was some progress.
This fix allows to continue after failed cluster test.

Fix gcc warning for hiding global variable 's' -> sig.
2011-01-13 11:02:55 +00:00
Petr Rockai
fd1aaee33f Kill clvmd properly after locking_type 3 tests (using clvmd/singlenode). 2011-01-12 16:07:55 +00:00
Jonathan Earl Brassow
025e69a15a Add disk to mirrored log type conversion. 2011-01-11 17:05:08 +00:00
Zdenek Kabelac
95d3c5f7e1 Use strndup as GNU extension
strndup needs _GNU_SOURCE defined as it's GNU extension.
Remove duplicate string.h header added in previous harness commit.
2011-01-10 13:25:22 +00:00
Petr Rockai
0011955f3a Skip the api/percent test on kernels <= 2.6.32. 2011-01-07 15:04:52 +00:00
Petr Rockai
dbb55cb3e1 Add a test for the interaction of snapshots of mirrors and lvconvert --repair. 2011-01-07 14:56:52 +00:00
Petr Rockai
235ea42e59 Add a test for the interaction of transient errors and dmeventd mirror repair. 2011-01-07 14:56:10 +00:00
Petr Rockai
be294072a1 Fix a typo in the new relaxed mirror check (test/lib/check.sh). 2011-01-07 14:42:35 +00:00
Petr Rockai
21ee9f3234 Remove *.t in test/api's make clean target. 2011-01-07 13:07:10 +00:00