Skip to content

Commit

Permalink
DBG - testUsed UDisks2 timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mvollmer committed Nov 6, 2023
1 parent 2715d4d commit eb51f4f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
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
44 changes: 37 additions & 7 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):
m = self.machine
b = self.browser

Expand Down Expand Up @@ -84,17 +84,47 @@ ExecStart=/usr/bin/sleep infinity

# No go ahead and let the automatic teardown take care of the mount

b.click('button:contains(Create partition table)')
self.dialog_wait_open()
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()
count = 0;
while True:
b.click('button:contains(Create partition table)')
self.dialog_wait_open()
b.wait_visible("#dialog tbody:first-of-type button:contains(Currently in use)")
b.assert_pixels('#dialog', "format-disk")
self.dialog_apply()
try:
self.dialog_wait_close()
break;
except:

Check notice

Code scanning / CodeQL

Except block handles 'BaseException' Note test

Except block directly handles BaseException.
if count == 5:
raise
self.dialog_cancel()
count += 1

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

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

def testUsed1(self):
self.checkUsed()

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

0 comments on commit eb51f4f

Please sign in to comment.