1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

1665 Commits

Author SHA1 Message Date
Peter Rajnoha
9a78c258ba tests: add lv-ancestry.sh test 2016-03-03 13:50:59 +01:00
Peter Rajnoha
45c82260db tests: add "get lvh_field" for "lvs -H" 2016-03-03 13:50:59 +01:00
Zdenek Kabelac
5e718ec666 tests: drop check for md5sum 2016-03-03 10:17:03 +01:00
Zdenek Kabelac
49839b6d96 tests: check kernel_cache_ funcs 2016-03-03 10:17:03 +01:00
Zdenek Kabelac
058eb3739d makefile: handle dm-version-expected 2016-03-01 16:03:02 +01:00
David Teigland
e3b904fd08 tests: check [unknown] in lvmetad-pvscan-cache
Update test for new [unknown] VG name from
commit 250b9153.
2016-02-29 12:43:07 -06:00
Alasdair G Kergon
9898126596 report: Shift (u)sed pv_attr under (a)llocatable.
Showing 'u' in the pv_attr reporting field is mostly unnecessary because
most PVs are allocatable, and being allocatable implies it is (u)sed,
and this is already obvious from other fields in the default 'pvs'
output like the VG name.

So move the new (u)sed pv_attr from character position 4 to 1, and only
show it in those rare cases when the PV is not (a)llocatable or the
relevant metadata is missing.

(Scripts should not be using pv_attr, but rather pv_allocatable,
pv_exported, pv_missing, pv_in_use etc.)
2016-02-26 15:46:37 +00:00
Zdenek Kabelac
183bd8ca03 tests: skip on older version
Skip with older driver version.
Update address.
2016-02-26 10:21:36 +01:00
Tony Asleson
26b826ccf5 lvmdbusd testing: Add validatestate.py utility
This simple tool calls the Manager.Refresh method on the dbus service
to check and see if the dbus service has the most up to date state.
This is to be used for testing to ensure that event driven updates are
working as planned.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2016-02-25 16:43:55 -06:00
Tony Asleson
0d620e681f lvmdbustest.py: Move helper code to testlib.py
This will allow us to re-use in other client programs for testing.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2016-02-25 16:43:55 -06:00
Zdenek Kabelac
23a4801dbc tests: lvresize with zero arg 2016-02-25 23:30:26 +01:00
David Teigland
172bad0d56 Use a common message for a used PV
Change some inconsistent messages and adopt
the new wording "PV %s is used by" in place
of "PV %s is marked as belonging to"
or "PV %s belongs to".
2016-02-25 14:23:41 -06:00
Bryn M. Reeves
79f2596215 tests: add simple dmstats report tests
Add tests for the "dmstats report" command:

  * report
  * report --count
  * report --histogram

So far the tests just check the command runs as expected when a
correctly configured stats region exists: validation of output
can be added later.
2016-02-25 16:40:59 +00:00
Bryn M. Reeves
3d3b132d9a tests: add dmstats create tests
Add tests for the "dmstats create" command:

  * simple whole-device region
  * region using --start/--len options
  * region using --segments option
  * region with precise timestamps (--precise)
  * region with histogram bounds (--bounds)
2016-02-25 16:40:59 +00:00
Bryn M. Reeves
11fd7b7c64 tests: make lib/expected-version-dm a dependency of .tests-stamp 2016-02-25 16:40:59 +00:00
Bryn M. Reeves
d4a5c252c5 tests: install does not depend on lib/version-expected
The install target already depends on .tests-stamp - since this
in turn depends on lib/version-expected there is no need to have
this as a dependency of install.
2016-02-25 16:40:59 +00:00
Bryn M. Reeves
2d630ea78a tests: add template tests/shell/dmstats-create.sh
Add a template for testing 'dmstats create' operations.
2016-02-25 16:40:58 +00:00
Bryn M. Reeves
3dae416229 tests: add driver_at_least() to aux.sh
Add a function to test whether the running device-mapper driver
version is at least equal to some given version.
2016-02-25 16:40:58 +00:00
Bryn M. Reeves
1f8fd5a152 tests: add basic dmstats tests
Add initial dmstats tests to 000-basic.sh. These tests ensure that
the dmsetup binary is built and linked correctly when called as
'dmstats' and that the version of the binary matches the expected
library version used for the build.
2016-02-25 16:40:58 +00:00
Bryn M. Reeves
985ed7822f dmstats: create dmstats symlink in test/lib
Create a symbolic link in test/lib for 'dmstats', pointing to the
dmsetup binary in the tools/ build directory.
2016-02-25 16:40:58 +00:00
David Teigland
77f034bfa3 tests: include lvmlockd in default make check 2016-02-23 16:34:46 -06:00
David Teigland
0236a34224 tests: updates for check_lvmlockd
Move the lvmlockd-related setup functions into aux.

For check_lvmlockd_test, start a new instance of
lvmlockd --test for each shell test.
2016-02-23 14:00:28 -06:00
David Teigland
f54253d396 tests: add SKIP_WITH_LVMLOCKD
to all tests that don't already used vgcreate $SHARED
2016-02-23 09:28:48 -06:00
Zdenek Kabelac
5d7e83c73c tests: check warn about belong is printed 2016-02-23 14:41:24 +01:00
Tony Asleson
05eb87ca2d lvmdbusd: Initial unit test driver script
It's disabled until we can fix it up.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2016-02-22 16:07:54 -06:00
Tony Asleson
21034644b6 lvmdbusd: Add env variable to use session bus
export LVMDBUSD_SESSION=True to run on the session bus instead
of the system bus so that we can run the unit test without
installing the dbus conf file.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2016-02-22 16:07:54 -06:00
Tony Asleson
64aab5885d lvmdbus: Make unit tests work in test env
Reduced the size of LVs created and use actual PE numbers instead of hard
coding them to allow us to work with the loop back devices.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2016-02-22 16:07:54 -06:00
Tony Asleson
d7dd8bf9d6 lvmdbustest.py: Make executable
Signed-off-by: Tony Asleson <tasleson@redhat.com>
2016-02-22 16:07:54 -06:00
David Teigland
f4efc2435c tests: fix clean up after lvmlockd tests 2016-02-22 14:15:17 -06:00
Marian Csontos
367fb85e44 spec: Fix 04ab1fa572: Remove left-overs 2016-02-22 17:50:35 +01:00
David Teigland
161ae36363 test: add make check_lvmlockd_test
Which runs lvmlockd in --test mode, without
any lock manager.

Also make some adjustments to the check_lvmlockd
variations using the lock managds.
2016-02-22 09:36:35 -06:00
Zdenek Kabelac
ed5e5c38b5 tests: skip thin-flags test on 32bit el6 kernel
Until kernel is fixed, stop running test always hitting OOPS there.
2016-02-22 14:59:28 +01:00
Tony Asleson
8b6cad3219 lvmdbustest.py: resync latest changes
This file update was missed, copied latest file from:
https://github.com/tasleson/lvm-dubstep/blob/master/test/lvmdbustest.py

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2016-02-19 15:16:05 -06:00
Zdenek Kabelac
a89ddda1a2 tests: needs_check needs version 16
Skip part of test when driver is too old.
2016-02-18 18:11:29 +01:00
Zdenek Kabelac
bcf7f80791 tests: checking thin flags
Test various  (D/M/F) attrs for thin-pool/thin
2016-02-18 16:49:38 +01:00
Peter Rajnoha
ecfa465366 metadata: ask for confirmation before really initializing/removing PV that is marked as belonging to a VG
Ask for confirmation when using pvcreate/pvremove on a PV which is
marked as belonging to a VG, just like we do in case of a PV which
belongs to known VG:

$ pvcreate -ff /dev/sda
Really INITIALIZE physical volume "/dev/sda" that is marked as belonging to a VG [y/n]? n
  /dev/sda: physical volume not initialized

$ pvremove -ff /dev/sda
Really WIPE LABELS from physical volume "/dev/sda" that is marked as belonging to a VG [y/n]? n
  /dev/sda: physical volume label not removed
2016-02-18 14:33:54 +01:00
Alasdair G Kergon
5987562cf9 lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
Peter Rajnoha
8ad93874d6 tests: fix tests checking pv_attr - there's a new bit now 2016-02-15 12:44:46 +01:00
Peter Rajnoha
a4e25f4381 tests: add pv-ext-flags.sh test
Testing PV extension flags. Currently, there's only one PV extension
flag present - the PV_EXT_USED flag (marking PV as used in a VG).
2016-02-15 12:44:46 +01:00
Peter Rajnoha
672deaebc5 man: pvresize: remove old comment about inability to resize PV with more mdas 2016-02-12 16:29:47 +01:00
Zdenek Kabelac
337aa4ca8e tests: indent
Better bash indention
2016-02-12 11:59:42 +01:00
Zdenek Kabelac
a077a64983 tests: update test
Upgrade test to count with much faster dmeventd work thanks
to low_watter_mark support.

Fix some wrong tests.
2016-02-12 10:21:07 +01:00
Zdenek Kabelac
ba111e7f4a tests: check for automated dmeventd resize
Watermark support should handle relatively quickly data LV resizes.
So check if it does what is expected.
2016-02-11 18:38:40 +01:00
Peter Rajnoha
bc8f8ac0fa tests: add pv-check-dev-size.sh 2016-01-22 14:16:00 +01:00
Zdenek Kabelac
fcbef05aae doc: change fsf address
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
2016-01-21 12:11:37 +01:00
Peter Rajnoha
fccb1bb276 report: make devices, metadata_devices, seg_pe_ranges and seg_metadata_le_ranges fields consistent
There are two basic groups of fields for LV segment device reporting:
  - related to LV segment's devices: devices and seg_pe_ranges
  - related to LV segment's metadata devices: metadata_devices and seg_metadata_le_ranges

The devices and metadata_devices report devices in this format:
    "device_name(extent_start)"

The seg_pe_ranges and seg_metadata_le_ranges report devices in
this format:
    "device_name:extent_start-extent_end"

This patch reverts partly what commit 7f74a99502
(v 2.02.140) introduced in this area - it added [] for
hidden devices to mark them for all four fields mentioned above.

We won't be marking hidden devices in devices and metadata_devices
fields.

The seg_metadata_le_ranges field will have hidden devices marked -
it's new enough that we don't need to care about compatibility much
yet.

The seg_pe_ranges is old enough that we shouldn't be changing this
one - so we're reverting to not marking hidden devices here.
Instead, there's going to be a new field "seg_le_ranges" which
is going to replace the seg_pe_ranges and it will mark hidden devices -
this is going to be introduced in a patch later.

So in the end we'll end up with:

   (LV segment's devices)
   devices field with "device_name(extent_start)" format, not marking hidden devices
   seg_pe_ranges field with "device_name:extent_start-extent_end" format, not marking hidden devices (deprecated, new seg_le_ranges should be used instead for standardized format)
   seg_le_ranges field with "device_name:extent_start-extent_end" format, marking hidden devices

   (LV segment's metadata devices)
   metadata_devices field with "device_name:extent_start-extent_end" format, not marking hidden devices
   seg_metadata_le_ranges field with "device_name:extent_start-extent_end" format, marking hidden devices

Also, both seg_le_ranges and seg_metadata_le_ranges will honour the
report/list_item_separator setting which can be used to configure
the delimiter used for list items.

So, to sum it up, we will recommend using the new seg_le_ranges and
seg_metadata_le_ranges fields because they display devices with
standard extent range format, they can mark hidden devices and they
honour the report/list_item_separator setting.

We'll be keeping devices,seg_pe_ranges and metadata_devices fields
for compatibility.
2016-01-19 14:30:20 +01:00
Peter Rajnoha
b82d5ee092 report: add kernel_discards report field to display thin pool discard used in kernel
Thin pool discard mode set in metadata can be different from the one
actually used if any device underneath does not support that mode. Add
kernel_discard report field to make it possible to see this difference.
2016-01-14 16:54:12 +01:00
Peter Rajnoha
04d1a8a5e4 cleanup: rename 'invisible devices' to 'hidden devices' 2016-01-13 16:43:25 +01:00
Peter Rajnoha
1417ed304b cleanup: rename 'invisible devices' to 'hidden devices' 2016-01-13 15:22:46 +01:00
Peter Rajnoha
efab21b411 test: add report-invisible.sh test 2016-01-13 14:37:09 +01:00