From: Yu Watanabe Date: Thu, 20 Jul 2023 07:42:35 +0000 (+0900) Subject: test: fix a syntax error in test-ukify X-Git-Tag: v254-rc3~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4fc925a0268cff33497f8969ff516880f589c782;p=thirdparty%2Fsystemd.git test: fix a syntax error in test-ukify Follow-up for d7d36252e5fdc345b110f824031e20f41ee75e86. Fixes #28464. --- diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py index 0b1d7f17f15..cff4ebe5ba8 100755 --- a/src/ukify/test/test_ukify.py +++ b/src/ukify/test/test_ukify.py @@ -601,7 +601,7 @@ def test_pcr_signing(kernel_initrd, tmpdir): priv = unbase64(ourdir / 'example.tpm2-pcr-private.pem.base64') output = f'{tmpdir}/signed.efi' - opts = ukify.parse_args([ + args = [ 'build', *kernel_initrd, f'--output={output}', @@ -610,18 +610,19 @@ def test_pcr_signing(kernel_initrd, tmpdir): '--os-release=ID=foobar\n', '--pcr-banks=sha1', # use sha1 because it doesn't really matter f'--pcr-private-key={priv.name}', - ]) + ] # If the public key is not explicitly specified, it is derived automatically. Let's make sure everything # works as expected both when the public keys is specified explicitly and when it is derived from the # private key. for extra in ([f'--pcrpkey={pub.name}', f'--pcr-public-key={pub.name}'], []): + opts = ukify.parse_args(args + extra) try: - ukify.check_inputs(opts + extra) + ukify.check_inputs(opts) except OSError as e: pytest.skip(str(e)) - ukify.make_uki(opts + extra) + ukify.make_uki(opts) # let's check that objdump likes the resulting file dump = subprocess.check_output(['objdump', '-h', output], text=True)