Add Loader argument to 'yaml.load' invocations as required by PyYAML 6.0. Submitted upstream: https://github.com/ganeti/ganeti/pull/1668 diff --git a/qa/qa_utils.py b/qa/qa_utils.py index da485df48..27428e685 100644 --- a/qa/qa_utils.py +++ b/qa/qa_utils.py @@ -450,7 +450,7 @@ def GetObjectInfo(infocmd): master = qa_config.GetMasterNode() cmdline = utils.ShellQuoteArgs(infocmd) info_out = GetCommandOutput(master.primary, cmdline) - return yaml.load(info_out) + return yaml.load(info_out, Loader=yaml.SafeLoader) def UploadFile(node, src): diff --git a/test/py/ganeti.cli_unittest.py b/test/py/ganeti.cli_unittest.py index 9cc980afa..242aac9fd 100755 --- a/test/py/ganeti.cli_unittest.py +++ b/test/py/ganeti.cli_unittest.py @@ -1141,14 +1141,15 @@ class TestFormatPolicyInfo(unittest.TestCase): self._RenameDictItem(minmax, key, keyparts[0]) self.assertTrue(constants.IPOLICY_DTS in parsed) parsed[constants.IPOLICY_DTS] = yaml.load("[%s]" % - parsed[constants.IPOLICY_DTS]) + parsed[constants.IPOLICY_DTS], + Loader=yaml.SafeLoader) @staticmethod def _PrintAndParsePolicy(custom, effective, iscluster): formatted = cli.FormatPolicyInfo(custom, effective, iscluster) buf = StringIO() cli._SerializeGenericInfo(buf, formatted, 0) - return yaml.load(buf.getvalue()) + return yaml.load(buf.getvalue(), Loader=yaml.SafeLoader) def _PrintAndCheckParsed(self, policy): parsed = self._PrintAndParsePolicy(policy, NotImplemented, True) >
path: root/tests/gremlin.scm
AgeCommit message (Collapse)Author
2022-01-16tests: Fix file-needed/recursive on aarch64-linux.Pierre Langlois
Fixes: <https://issues.guix.gnu.org/52943>. * tests/gremlin.scm (file-needed/recursive)[ground-truth]: On aarch64-linux, remove the dynamic linker from this list.
2022-01-14gremlin: Adjust tests for i686 and beyond.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/52752>. Reported by Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>. * tests/gremlin.scm ("file-needed/recursive"): Augment the list of vDSO names.
2022-01-08tests: Fix file-needed/recursive on powerpc64le-linux.Chris Marusich
Fixes: <https://issues.guix.gnu.org/52940>. * tests/gremlin.scm (file-needed/recursive): Consider two entries to be equivalent not when they are the same string, but rather when they refer to the same file. [ground-truth]: In addition to strings that begin with "linux-vdso.so", remove strings that begin with "linux-vdso64.so".
2021-06-23tests: gremlin: Skip file-needed/recursive if DT_NEEDED is empty.Chris Marusich
* tests/gremlin.scm (file-needed/recursive): Skip the test when (file-runpath %guile-executable) evaluates to the empty list. This causes the test to be correctly skipped in the case where Guix has been built using a foreign distro's toolchain and libraries.
2021-04-22gremlin: 'elf-dynamic-info' returns a file name rathern than a dynamic entry.Dion Mendel
* guix/build/gremlin.scm (elf-dynamic-info): Return the dynamic entry value, not the dynamic entry. * tests/gremlin.scm ("elf-dynamic-info-soname"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-12-01gremlin: Add 'file-needed/recursive'.Ludovic Courtès
* guix/build/gremlin.scm (file-needed/recursive): New procedure. * tests/gremlin.scm ("file-needed/recursive"): New test.
2020-09-19gremlin: Add 'set-file-runpath', 'file-runpath', and 'file-needed'.Ludovic Courtès
* guix/build/gremlin.scm (file-dynamic-info, file-runpath, file-needed): New procedures. (&missing-runpath-error, &runpath-too-long-error): New condition types. (set-file-runpath): New procedure. * tests/gremlin.scm ("set-file-runpath + file-runpath"): New test.
2019-05-18gremlin: Adjust tests for foreign distros.Ting-Wei Lan
Fixes <https://bugs.gnu.org/35775>. * tests/gremlin.scm ("elf-dynamic-info-needed, executable"): Expect only libguile and libc among NEEDED. ("strip-runpath"): Pass '--enable-new-dtags' to get RUNPATH, not RPATH.