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

HACK: try to fetch corrupt user journal files #17837

Closed
Closed
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
20 changes: 19 additions & 1 deletion test/common/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ def system_before(self, version):
return int(v[0]) < version

def setUp(self, restrict=True):
self.allowed_messages = self.default_allowed_messages
self.allowed_messages = []
self.allowed_console_errors = self.default_allowed_console_errors
self.allow_core_dumps = False

Expand Down Expand Up @@ -1889,6 +1889,24 @@ def copy_journal(self, title, label=None):
print("Journal extracted to %s" % (log))
attach(log, move=True)


# packit tests are on the same machine, so hack away
print(os.listdir('/var/log/journal'))
for root, dirs, files in os.walk('/var/log/journal'):
print("root: {}, dirs: {}, files: {}".format(root, dirs, files))
for file in files:
attach(os.path.join(root, file), move=True)

# HACK: Copy journal files
# print("before files ", os.listdir('.'))
# directory = "%s-%s-%s" % (label or self.label(), m.label, title)
# # dest = os.path.abspath(directory)
# print("copy journal entries to: %s" % (directory))
# if os.path.exists(directory):
# shutil.rmtree(directory)
# m.download_dir("/var/log/journal", directory, relative_dir='.')
# print("files", os.listdir(directory))

def copy_cores(self, title: str, label: Optional[str] = None):
if self.allow_core_dumps:
return
Expand Down