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

test: Attach criu dump log on checkpoint failures #1878

Merged
merged 1 commit into from
Oct 14, 2024
Merged
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
18 changes: 13 additions & 5 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -1539,11 +1539,19 @@ class TestApplication(testlib.MachineCase):
b.wait_not_present(".pf-v5-c-modal-box")

if self.has_criu:
b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in NOT_RUNNING)
b.wait_text(
f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Latest checkpoint") + dd',
'less than a minute ago'
)
try:
b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in NOT_RUNNING)
b.wait_text(
f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Latest checkpoint") + dd',
'less than a minute ago'
)
except testlib.Error:
# dump.log may help with debugging criu failures
attachment = self.label() + "-dump.log"
dump_log = m.execute("find /var/lib/containers -name dump.log").strip()
m.download(dump_log, attachment, ".")
testlib.attach(attachment, move=True)
raise
else:
# expect proper error message
b.wait_in_text(".pf-v5-c-alert.pf-m-danger", "Failed to checkpoint container swamped-crate")
Expand Down