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

28 Commits

Author SHA1 Message Date
Tony Asleson
affe2cebf5 lvmdbus: Make bus name configurable
Add env LVM_DBUS_NAME to change what the bus name is.
2016-11-17 11:35:16 -06:00
Tony Asleson
560229178c lvmdbustest.py: Remove raid4 use
Looks like this isn't support across versions.  Need to add functionality
to service to return the supported segment types, so we only use the
supported ones.
2016-11-17 11:35:16 -06:00
Tony Asleson
e57fd9d963 lvmdbustest.py: ws fixes 2016-10-11 13:16:57 -05:00
Tony Asleson
9c56902365 lvmdbustest.py: Add $PREFIX support
Use the env variable PREFIX for vg & lv names
2016-10-11 13:16:57 -05:00
Tony Asleson
595af62ebd lvmdbustest.py: Use more compatible syntax 2016-10-11 13:16:57 -05:00
Tony Asleson
be06fa695e lvmdbustest.py: Skip test_job_handling_timer on loopback
This test never passes on loop back, so we will skip unless the
pv devices are real devices which contain `/dev/sd`.

We always fail because we need lvm to run slow to get a timer to
pop, and loopback are too fast.
2016-10-10 16:31:00 -05:00
Tony Asleson
3e45285b40 lvmdbustest.py: Denote failure if set_execution fails 2016-10-10 16:31:00 -05:00
Tony Asleson
0c51f369a4 lvmdbustest.py: Print to stderr
It's easier to follow if we print to stderr, so that our print messages
are in the lvm error log in the correct position to other printed
messages.
2016-10-10 16:31:00 -05:00
Tony Asleson
cb4e26dcb3 lvmdbustest.py: Ensure we exit non-zero on fail
If you run multiple runs of unittest.main, unless you don't pass exit=true
the test case always ends with a 0 exit code.  Add ability to store the
result of each invocation of the test and exit with a non-zero exit code
if anyone of them fail.
2016-10-10 16:31:00 -05:00
Tony Asleson
d906fd5201 lvmdbustest.py: Make sure to test for hidden lookups
Test both vgname/[hidden] and vgname/hidden forms
2016-09-27 13:28:54 -05:00
Tony Asleson
ec076b1df2 lvmdbustest.py: Make env variable work 2016-09-27 13:28:45 -05:00
Tony Asleson
d18ea3f2cb lvmdbustest: Remove pyudev deprecated warnings 2016-09-19 15:32:47 -05:00
Tony Asleson
cb2b261510 lvmdbustest.py: Test with/without timeout values
Because of the different code paths we need to test job handling with
all operations.  Test now runs virtually everything with timeout == 0
and timeout == 15 so that we test both use cases.

Note:  If a client passes -1 for the timeout value they need to make
sure that their connection time out is also infinite.  Otherwise, if the client
times out the service side hangs any new dbus calls until the job
that is in progress completes.  Not sure why this behavior is occuring
at this time, but it appears a limitation/bug of the dbus-python library.
2016-09-19 15:32:27 -05:00
Tony Asleson
65f59184c8 lvmdbustest.py: Make methods static
Changed methods to be static that should be.
2016-09-19 15:31:04 -05:00
Tony Asleson
ac2fc7a366 lvmdbusd: Vg.LvCreate* methods, correct return type
The methods were returning an instance of the object instead of the
object path which was causing an exception when the result was returned
with the job object as we are explicity trying to return an object path.

Unit test added which re-creates the issue and verifies the fix.
2016-09-19 15:31:04 -05:00
Tony Asleson
257ce5733e lvmdbustest.py: Add tag regression test
Add '-' back in as acceptable tag character
2016-08-29 17:59:42 -05:00
Tony Asleson
70d4e2e8d5 lvmdbusd: Handle different daemon options
- Prevent --lvmshell with --nojson, not a valid combination
- If user is preventing json, then no lvmshell usage
- Return boolean on Manager.UseLvmShell
2016-08-29 15:26:56 -05:00
Tony Asleson
1d1fe00846 lvmdbusd: Include lvm shell testing as the default 2016-08-29 15:26:56 -05:00
Tony Asleson
9aed18a571 lvmdbustest.py: Remove '-' from tag ch set 2016-08-29 15:26:55 -05:00
Tony Asleson
6f216692b4 lvmdbustest: Comment out refresh check for LV create
When we test Vg.LvCreateRaid some of the hidden LVs volume type go from
'I' to 'i' between the time it takes us to create the LV and
the time it takes to call into refresh to verify the service is up to date.
This is a fairly rare occurance.
2016-06-28 13:36:32 -05:00
Tony Asleson
2d384954ad lvmdbusd: Remove duplicate test code 2016-06-10 16:05:03 -05:00
Tony Asleson
a1febff857 lvmdbusd: Add test for DataLv & MetaDataLv
Added tests which expose an issue found with these properties.
2016-06-10 16:05:03 -05: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
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
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
Alasdair G Kergon
5987562cf9 lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00