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

DBG - testUsed UDisks2 timeout #19572

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/run
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ case "${TEST_SCENARIO:=}" in
PREPARE_OPTS="$PREPARE_OPTS --quick"
;;&
*storage*)
RUN_OPTS="$RUN_OPTS $(echo "$ALL_TESTS" | grep -E "$RE_STORAGE")"
RUN_OPTS="$RUN_OPTS TestStorageUsed"
PREPARE_OPTS="$PREPARE_OPTS --quick"
;;&
*expensive*)
Expand Down
37 changes: 35 additions & 2 deletions test/verify/check-storage-used
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import testlib
@testlib.nondestructive
class TestStorageUsed(storagelib.StorageCase):

def testUsed(self):
def checkUsed(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need for this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes yes yes... :-)

m = self.machine
b = self.browser

Expand Down Expand Up @@ -89,12 +89,45 @@ ExecStart=/usr/bin/sleep infinity
b.wait_visible("#dialog tbody:first-of-type button:contains(Currently in use)")
b.assert_pixels('#dialog', "format-disk")
self.dialog_apply()
self.dialog_wait_close()
try:
self.dialog_wait_close()
except testlib.Error:
if "Timed out waiting for object" in b.text("#dialog"):
# Sometimes /dev/sda1 is still held open by something
# immediately after locking it. the prevents the
# kernel from reading the new partition table. Let's
# just try again.
print("WARNING: Retrying partition table creation")
self.dialog_apply()
self.dialog_wait_close()
else:
raise

m.execute("! systemctl --quiet is-active keep-mnt-busy")

self.content_row_wait_in_col(1, 0, "Free space")

def testUsed1(self):
self.checkUsed()
Comment on lines +110 to +111
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just call self.testUsed() in the amplifications.


def testUsed2(self):
self.checkUsed()

def testUsed3(self):
self.checkUsed()

def testUsed4(self):
self.checkUsed()

def testUsed5(self):
self.checkUsed()

def testUsed6(self):
self.checkUsed()

def testUsed7(self):
self.checkUsed()

def testUsedAsPV(self):
m = self.machine
b = self.browser
Expand Down
Loading