lava: Use safe loads for YAML
authorKienan Stewart <kstewart@efficios.com>
Tue, 9 Jan 2024 16:04:58 +0000 (11:04 -0500)
committerKienan Stewart <kstewart@efficios.com>
Tue, 9 Jan 2024 16:11:42 +0000 (11:11 -0500)
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 <kstewart@efficios.com>
scripts/system-tests/lava2-submit.py

index e6b4ea2d5e9931947135c4400d02765447c9948e..5a08abd683236caf2dca1f94f6787abdd8bb2e3c 100644 (file)
@@ -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':
This page took 0.024176 seconds and 4 git commands to generate.