summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-06 19:33:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-07 09:11:49 +0100
commit1334b064d3f04a976a42fe9dad64831b33d93755 (patch)
treefb273b3e4355c2ca5d8a14d4ed7905fa56223fa8 /meta/lib/oeqa
parent0a72ec2ed1fd0d1bd7951c1d21be731c873e0964 (diff)
downloadpoky-1334b064d3f04a976a42fe9dad64831b33d93755.tar.gz
gpg_sign/selftest: Fix secmem parameter handling
We keep seeing "cannot allocate memory" errors from rpm when signing packages on the autobuilder. The following were tried: * checking locked memory use (isn't hitting limits) * Restricting RPM_GPG_SIGN_CHUNK to 1 * Limiting to 10 parallel do_package_write_rpm tasks * Allowing unlimied memory overcommit * Disabling rpm parallel compression and the test still failed. Further invetigation showed that the --auto-expand-secmem wasn't being passed to gpg-agent which meant the secmem couldn't be expanded hence the errors when there was pressure on the agent. The reason this happens is that some of the early gpg commands can start the agent without the option and it sticks around in memory so a version with the correct option may or may not get started. We therefore add the option to all the key gpg calls. (From OE-Core rev: c7e131a76e522503df55e211dd261829feacfa28) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/signing.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index 9c710bd0ff..b390f37d8e 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -30,7 +30,8 @@ class Signing(OESelftestTestCase):
30 self.secret_key_path = os.path.join(self.testlayer_path, 'files', 'signing', "key.secret") 30 self.secret_key_path = os.path.join(self.testlayer_path, 'files', 'signing', "key.secret")
31 31
32 nsysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native") 32 nsysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native")
33 runCmd('gpg --batch --homedir %s --import %s %s' % (self.gpg_dir, self.pub_key_path, self.secret_key_path), native_sysroot=nsysroot) 33
34 runCmd('gpg --agent-program=`which gpg-agent`\|--auto-expand-secmem --batch --homedir %s --import %s %s' % (self.gpg_dir, self.pub_key_path, self.secret_key_path), native_sysroot=nsysroot)
34 return nsysroot + get_bb_var("bindir_native") 35 return nsysroot + get_bb_var("bindir_native")
35 36
36 37