From: Kienan Stewart Date: Tue, 9 Jan 2024 16:04:58 +0000 (-0500) Subject: lava: Use safe loads for YAML X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a521b3fe651b0c066c206d3e87cdb336ab93502f;p=lttng-ci.git lava: Use safe loads for YAML The version of LAVA we are using was updated last year, and includes fixes for supporting safe YAML. C.f. https://gitlab.com/lava/lava/-/commit/c0da3495c11936d761de4e03d709041f2f9a1d3e Fixes Support #754 Change-Id: I34afafa5643fa45059077468536239e4b48d15ac Signed-off-by: Kienan Stewart --- diff --git a/scripts/system-tests/lava2-submit.py b/scripts/system-tests/lava2-submit.py index e6b4ea2..5a08abd 100644 --- a/scripts/system-tests/lava2-submit.py +++ b/scripts/system-tests/lava2-submit.py @@ -83,7 +83,7 @@ def check_job_all_test_cases_state_count(server, job): """ print("Testcase result:") content = server.results.get_testjob_results_yaml(str(job)) - testcases = yaml.unsafe_load(content) + testcases = yaml.load(content) passed_tests = 0 failed_tests = 0 @@ -105,7 +105,7 @@ def print_test_output(server, job): Parse the attachment of the testcase to fetch the stdout of the test suite """ job_finished, log = server.scheduler.jobs.logs(str(job)) - logs = yaml.unsafe_load(log.data.decode('ascii')) + logs = yaml.load(log.data.decode('ascii')) print_line = False for line in logs: if line['lvl'] != 'target':