Tony Asleson
95afd315b1
lvmdbustest: Don't hard code to /tmp
...
During lvm testing they use an alternative tmp directory.
2023-03-01 15:59:18 -06:00
Tony Asleson
50e6efafb9
lvmdbustest: Add more output for test_log_file_option
2023-03-01 15:52:23 -06:00
Tony Asleson
80f6655956
lvmdbustest.py: Increase udev timeout
2023-03-01 15:26:37 -06:00
Tony Asleson
e3b7395af4
lvmdbustest.py: Remove use of root_dir in glob
...
This feature has only been in python since 10/2021.
2023-02-27 09:07:37 -06:00
Tony Asleson
993bd2ffc8
lvmdbustest: Check and remove lvm debug collection files
...
In setup/teardown ensure we check for and remove any lvm debug
collection, to prevent FS from filling up.
2023-02-20 12:01:53 -06:00
Tony Asleson
61917fbac2
lvmdbustest: Add test to ensure error collection
...
Recreates https://bugzilla.redhat.com/show_bug.cgi?id=2145114
2022-11-29 12:56:55 -06:00
Tony Asleson
736547e7bb
lvmdbustest: Add test for copy signature
...
Add test to ensure we detect when a PV signature is copied to a block
device.
2022-10-20 15:10:35 -05:00
Tony Asleson
5a6ae2d4d8
lvmdbustest: Add test for wipefs
...
Ensure that if an external program or user calles wipefs on a PV that we
correctly update the state of the daemon.
2022-10-20 15:10:35 -05:00
Tony Asleson
fd05b79aad
lvmdbustest: Add test to stress mode changing
...
Add a test to toggle from fork & exec to lvm shell repeatedly, to stress
test it.
2022-09-22 17:14:10 -05:00
Tony Asleson
897b326ccc
lvmdbustest: Re-work setUp
...
Place the addCleanup at the end as we don't want to go through clean up
if we don't make it through setUp. If we don't do this we can remove VGs
that we didn't create in the unit test.
2022-09-22 17:10:13 -05:00
Tony Asleson
7966f1dd18
lvmdbustest: Refuse to remove a VG we didn't create
...
One of our previous commits introduced the side effect that we could
inadvertently remove a VG we didn't create, and lose data.
2022-09-22 16:19:16 -05:00
Tony Asleson
40018cbf53
lvmdbustest: Make vg name suffix more unique
2022-09-22 16:17:20 -05:00
Tony Asleson
a326e35cda
lvmdbustest: Check for self.pvs
...
If we don't make it through setUp, self.pvs will not exist.
2022-09-16 10:49:37 -05:00
Tony Asleson
ead80d134d
lvmdbustest: Move signals to last
...
When we do the signal testing we default back to fork & exec. Put these
on the end to maximize our lvm shell testing until we fix this proper.
2022-09-16 10:49:37 -05:00
Tony Asleson
b6dc96d8ef
lvmdbustest: Utilize addCleanup in unit test
...
Register the clean up with addCleanup so we ensure clean_up gets run
regardless of what happens in setUp.
2022-09-16 10:49:37 -05:00
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