From a521b3fe651b0c066c206d3e87cdb336ab93502f Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Tue, 9 Jan 2024 11:04:58 -0500 Subject: [PATCH] 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 --- scripts/system-tests/lava2-submit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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': -- 2.34.1