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

107 Commits

Author SHA1 Message Date
Tony Asleson
f5876a1f3f lvmdbustest: Skip test_nesting if scan_lvs is not enabled 2022-09-16 10:49:37 -05:00
Tony Asleson
f65f7da760 lvmdbustest: Skip test_singleton_daemon running systemd svc. 2022-09-16 10:49:37 -05:00
Tony Asleson
9693709b46 lvmdbustest: Add systemctl daemon start 2022-09-16 10:49:37 -05:00
Tony Asleson
f252e05aae lvmdbustest: Add test for ensuring only 1 instance of daemon 2022-09-16 10:49:37 -05:00
Tony Asleson
d16c0a3e2b lvmdbustest: Add test_sigint test
Get the daemon busy and send it SIGINT to ensure the daemon exits.
2022-09-16 10:49:37 -05:00
Tony Asleson
52415b5708 lvmdbustest: Add optional option to _create_num_lvs
This allows us to create the LVs async., thus queuing them up in daemon.
2022-09-16 10:49:37 -05:00
Tony Asleson
d05d2328e0 lvmdbustest: Factor out tearDown implementation for re-use 2022-09-16 10:49:37 -05:00
Tony Asleson
de0258a600 lvmdbustest: Add DaemonInfo class
This class handles identifying daemon, sending signals to it, and starting
it back up again.
2022-09-16 10:49:37 -05:00
Tony Asleson
ec50979b03 lvmdbusd: Correct typos 2022-09-16 10:49:37 -05:00
Tony Asleson
f4cb78a4e1 lvmdbustest: Add test removing incomplete job
When you try to remove a job that is incomplete you get a dbus exception.
Test for this error condition.
2022-09-16 10:49:37 -05:00
Tony Asleson
2ca4a2dbf3 lvmdbustest: Add test for external event
Ensure that when we trigger an external event that we don't incorrectly
handle multiple --config options.
2022-09-16 10:49:37 -05:00
Tony Asleson
4a202c11ff lvmdbustest: Add test for passing log file in options 2022-09-16 10:49:37 -05:00
Tony Asleson
cef3c75dd4 lvmdbustest: nesting improvements 2022-09-16 10:49:36 -05:00
Tony Asleson
ea45ba753e lvmdbustest: Remove force exception in _wait_for_job
We put this in to test one of the paths in the damon, but unfortunately
if we hit the race condition where the job actually is done we will try
to call j.Wait(1) after the remove.  This fails with:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod:
Method "Wait" with signature "i" on interface "com.redhat.lvmdbus1.Job"
doesn't exist

Which is caused by the dbus object no longer existing.  We could handle
this, but the issue is we no longer have the ability to get the result to
return, they have been lost.

A better solution would be to write a specific unit test to force this code
path and handle all the possible outcomes.
2022-09-16 10:49:36 -05:00
Tony Asleson
4b4d431631 lvmdbustest: Include major number 259
When you have > 16 partitions for a block device the major number
changes, include them for testing.
2022-09-16 10:49:36 -05:00
Tony Asleson
9ffa1ef884 lvmdbustest: Use updated pyudev syntax
Previous syntax has been deprecated.
2022-09-16 10:49:36 -05:00
Tony Asleson
d0f94e763d lvmdbustest: Add test for property "Get"
We typically use "GetAll", so add test for "Get" and check values.
2022-06-30 10:55:16 -05:00
Tony Asleson
73121e3f07 lvmdbustest: Increase number of LVs
As storage is getting faster, we need to create more LVs to pass this test.
2022-06-30 10:55:16 -05:00
Tony Asleson
8fa8dfdb8c lvmdbustest: Correct comment spelling/grammar 2022-06-30 10:55:16 -05:00
Tony Asleson
55059e002a lvmdbustest: Test job remove path when job not complete 2022-06-30 10:55:16 -05:00
Tony Asleson
b3d7aff6a3 lvmdbusd: Fix env variable LVM_DBUSD_TEST_MODE
Make it more logical.
2022-06-30 10:55:16 -05:00
Tony Asleson
47c61907b4 lvmdbusd: Change unit test vdo minimum size 2022-06-30 10:55:16 -05:00
Zdenek Kabelac
8a550fa3e8 tests: test_pv_symlinks works only with /dev dir
Skip test with LVM_TEST_DEVDIR != /dev
2021-03-28 00:21:38 +01:00
Zdenek Kabelac
1f7bd719d0 tests: restore removed prefix
During debugging this prefix was unintentionally lost, restore.
2021-03-27 23:19:08 +01:00
Zdenek Kabelac
93336685f6 tests: update dbus test_nesting
Test has to use PV with suffix  pv[0..9]  otherwise
it's ignored by test suite filter.

Better fix for VG names to use prefix LVMTEST.

Skip the test for runs without LVM_TEST_DEVDIR != /dev
2021-03-26 20:39:41 +01:00
Zdenek Kabelac
25c665d555 tests: dbus update
Always use  PREFIX for vg header - all tests must use this prefix,
VGs without are not allowed.

Modify pv_symlink test - as the test was checking unsupportable
combination - since lvm2 commands withing testsuite are only
allowed to manipulate with /dev/mapper/LVMTESTXXXX path -
nothing else allowed and fails on being filtered.
2021-03-26 13:13:26 +01:00
Vojtech Trefny
8f1068c02d lvmdbusd: Add support for LVM writecache 2020-08-06 13:54:34 -05:00
Vojtech Trefny
c496ba6505 lvmdbusd: Add function to convert LV into a VDO pool 2020-01-09 13:07:55 -06:00
Vojtech Trefny
c3ef41f620 lvmdbusd: Add VDO enable/disable compress & dedup
Added methods to vdo pool interface to allow enabling and
disabling of VDO:
 * Compression
 * Deduplication
2020-01-09 13:07:47 -06:00
Marian Csontos
a2a993d995 tests: VDO detection in dbus tests 2019-12-16 12:06:42 +01:00
Tony Asleson
508d1808b0 lvmdbustest.py: Use local data instead of fetching
Avoid making more dbus calls to get information we already have.  This
also avoids us getting an error where a dbus object representation is
being deleted by another process while we are trying to gather information
about it across the wire.
2019-10-30 10:38:40 -05:00
Tony Asleson
f91df163e2 lvmdbustest.py: Improve concurrent test handling
Filter out LVs too, so that we can run more than 1 instance of the
unit test at the same time.
2019-10-30 10:38:40 -05:00
Tony Asleson
f961311436 lvmdbustest.py: Add tests for LV interface
Add tests for all the different LV types with the standard LV dbus
interface.  These tests shook out a couple of new bugs.
2019-10-30 10:38:40 -05:00
Tony Asleson
89373761c8 lvmdbustest.py: Add basic vdo test 2019-10-30 10:38:40 -05:00
Tony Asleson
5971da2c72 lvmdbusd: VDO Pool LV representation
VDO pool LVs are represented by a new dbus interface VgVdo.  Currently
the interface only has additional VDO properties, but when the
ability to support additional LV creation is added we can add a method
to the interface.
2019-10-30 10:38:40 -05:00
Tony Asleson
455498f206 lvmdbustest.py: Create common func. _create_cache_lv 2019-10-30 10:38:40 -05:00
Tony Asleson
c786636afb lvmdbustest.py: Add nested helper function major_minor 2019-10-30 10:38:40 -05:00
Tony Asleson
e1d3a6c552 lvmdbustest.py: WS corrections 2019-10-30 10:38:40 -05:00
Tony Asleson
5b224d58f7 lvmdbustest.py: Add cache LV rename test 2019-10-30 10:38:40 -05:00
Tony Asleson
9d2ef05c5d lvmdbusd: Add cfg.vdo_support
Will be used to add vdo interfaces on demand.
2019-10-30 10:38:40 -05:00
Tony Asleson
ceb808d26f lvmdbustest.py: Remove 2 TODOs
This issue has been resolved, sizes > 2**32-1 not supported.
2019-10-30 10:38:40 -05:00
Tony Asleson
c5f4f2efb6 lvmdbustest.py: Add func. _pv_scan 2019-10-30 10:38:40 -05:00
Tony Asleson
69d4847975 lvmdbustest.py: Use existing _create_lv 2019-10-30 10:38:40 -05:00
Tony Asleson
293f6d2795 lvmdbustest.py: Add func. _create_thin_lv 2019-10-30 10:38:40 -05:00
Tony Asleson
a4666f63ad lvmdbustest.py: Add func. _all_pv_object_paths
This is needed in a number of places.
2019-10-30 10:38:40 -05:00
Tony Asleson
b8d4969117 lvmdbustest.py: Add function for lv path check 2019-10-30 10:38:40 -05:00
Tony Asleson
22a22a735f lvmdbusdtest.py: Use common function for tag add 2019-10-30 10:38:40 -05:00
Tony Asleson
62136c056a lvmdbustest.py: Remove duplicate setup code
Remove the same copy & pasted code which simply creates a VG to
use.
2019-10-30 10:38:40 -05:00
Tony Asleson
bafe5d15b1 lvmdbusd: Add check for reserved name '_vdata'
Added for vdo support.
2019-10-30 10:38:40 -05:00
Tony Asleson
b7c64fe8e2 lvmdbustest.py: Add blurb about scan_lvs = 1
When developing and testing on a local system, to get the unit
test to pass the test_nesting test, editing the test conf will achieve
the success too.
2019-10-30 10:38:40 -05:00