Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up udev tests #3542

Merged
merged 5 commits into from
Feb 7, 2024
Merged

Conversation

mulkieran
Copy link
Member

No description provided.

@mulkieran mulkieran self-assigned this Jan 30, 2024
@mulkieran
Copy link
Member Author

It's trivial if the tests run to completion.

@mulkieran
Copy link
Member Author

mulkieran commented Jan 30, 2024

The first commit is enough to cause the f39 tests not to time out anymore, but the failure on the generic test comes back there and the f38 test is still timing out.

======================================================================
ERROR: test_generic (tests.udev.test_udev.UdevTest1.test_generic)
See _test_driver for description.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/dbus_python_client_gen/_invokers.py", line 344, in dbus_func
    return dbus_method(*xformed_args, signature=signature, timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/connection.py", line 634, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/ARTIFACTS/work-alll1x3gpmu/plans/all/discover/default-0/tests/tests/client-dbus/tests/udev/test_udev.py", line 131, in test_generic
    self._test_driver(2, 4)
  File "/var/ARTIFACTS/work-alll1x3gpmu/plans/all/discover/default-0/tests/tests/client-dbus/tests/udev/test_udev.py", line 122, in _test_driver
    self.wait_for_pools(number_of_pools)
  File "/var/ARTIFACTS/work-alll1x3gpmu/plans/all/discover/default-0/tests/tests/client-dbus/tests/udev/_utils.py", line 462, in wait_for_pools
    known_pools = get_pools(name=name)
                  ^^^^^^^^^^^^^^^^^^^^
  File "/var/ARTIFACTS/work-alll1x3gpmu/plans/all/discover/default-0/tests/tests/client-dbus/tests/udev/_utils.py", line 115, in get_pools
    managed_objects = ObjectManager.Methods.GetManagedObjects(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dbus_python_client_gen/_invokers.py", line 351, in dbus_func
    raise DPClientInvocationError(
dbus_python_client_gen._errors.DPClientInvocationError: Error while invoking method "GetManagedObjects" belonging to interface "org.freedesktop.DBus.ObjectManager" with arguments ()

----------------------------------------------------------------------
Ran 12 tests in 845.668s

FAILED (errors=1)
make: *** [Makefile:28: udev-tests] Error 1

@mulkieran
Copy link
Member Author

mulkieran commented Jan 30, 2024

Besides using stop_pool we just need to start the pool when we bring up stratisd again. I think that is a fair test in most cases. I think, though, that enhancing stratis-dumpmetadata to overwrite pool metadata would be exactly what we need here to make a more correct test.

Related: stratis-storage/project#683 .

@mulkieran
Copy link
Member Author

Something has just gone wrong w/ our loop tests on every platform:

test: TANG_URL=localhost RUST_LOG=stratisd=debug STRATISD=/usr/libexec/stratisd STRATIS_DUMPMETADATA=/usr/bin/stratis-dumpmetadata PYTHONPATH=./src make -f Makefile tang-tests dump-metadata-tests

All seem to be yielding clevis errors with three indicating that cryptsetup is not found. All of this should be quite orthogonal to any changes here.

@mulkieran
Copy link
Member Author

Waiting for resolution of #3543

@mulkieran mulkieran changed the title Run udev tests for 40 minutes Tidy up udev tests Feb 6, 2024
@mulkieran mulkieran marked this pull request as ready for review February 6, 2024 02:34
The _clean_up method always throws one of these in, so there is no point
in doing it at the end of the test.

Signed-off-by: mulhern <[email protected]>
It can be made redundant by having remove_stratis_setup raise an
exception if there are still devices remaining. Also, this supports
slightly better encapsulation.

Signed-off-by: mulhern <[email protected]>
Without, the test will wait indefinitely for stratisd to handle the
signal.

Signed-off-by: mulhern <[email protected]>
@mulkieran mulkieran merged commit 7909471 into stratis-storage:master Feb 7, 2024
11 checks passed
@mulkieran mulkieran deleted the packit-duration branch February 7, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants