From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7206216186707574784 X-Received: by 2002:a05:6638:cd0:b0:3e5:4c9d:6e14 with SMTP id e16-20020a0566380cd000b003e54c9d6e14mr201952jak.4.1677827953809; Thu, 02 Mar 2023 23:19:13 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a92:8708:0:b0:315:e39c:90ef with SMTP id m8-20020a928708000000b00315e39c90efls753366ild.6.-pod-prod-gmail; Thu, 02 Mar 2023 23:19:13 -0800 (PST) X-Google-Smtp-Source: AK7set91/RFgOEZpFWxc5PHp30lukrPHtCesg5zvsnx+t+mqzMKIjz84A1l77XlfTQwGWwj/Vorh X-Received: by 2002:a05:6e02:2199:b0:317:9768:fbb4 with SMTP id j25-20020a056e02219900b003179768fbb4mr1008695ila.31.1677827953123; Thu, 02 Mar 2023 23:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677827953; cv=none; d=google.com; s=arc-20160816; b=B9m5QtC9w6QxSQtvNZZgkEqlLKBJG0DLMmHu6jhurNclvcnU66VEHKziAWy3Y3D/tq Fp88SHzkaX0Ja2zXTStgHqf9n0MrmBIonZ0uSFg8ojLGobNp5Q1mgbpLwuQohVc0E+tu 2CsauwRKp4ek/leIVDJvODe+FjAPLY69U5cPV/n32WuuC1Q6gW6CXNQau19F0a/L+Yq3 Cc3ebUcMed1C5RfcjFnirMOOHW1m2XvFYFrvAYmpEoXxaJZJs2ZPwGOhQcjcPmQqC9Sy spzOs2CkdsFxmQuRh5GCGDSTkiQ/DjYPLTZQRXSLCSpZsHsMv1nh0Ho1ZbL1dA4Fm7/M MsIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=k2nalpzMIJuaLvzMN/E5tvXEySE/6xBpDdens37ZDmI=; b=YW37Z4qrM2uFch3OcxIzphJWldFY6c9bNZLW7cst+E+S2mXNUWuTvFwVJ7Pl+UJlbD XgsUNFwA8CxSnb0sCQwCQZ+hcU/I1+kWJVzx0P3Tf/6HEl968IUxprqahwf3tbeWf2+C OoYaIo8mKG1TG2EBxe8VMkrC/vie1cI+W98UuWe3rV1WSX1MKvEfSy8jc+fjEl7xirYv OmivGQM3UEm8OjLY7V+uPn7Tup9Qo7GsA3LL1uzeksSKvxWqzruYE/q2QZr9wqd7GDEN sDVMqCa8GwkEmcLs225Hn3N4MzxRygjkPBtr3oOk4/OgMZ0Uy9Nsj1lIcb1I3eIvGpQO zLag== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id n20-20020a056638211400b003636f49184dsi166770jaj.7.2023.03.02.23.19.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Mar 2023 23:19:12 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 3237J7uv027611 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 3 Mar 2023 08:19:07 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH] testsuite: Cleanup after gpg import in repro_test Date: Fri, 3 Mar 2023 08:19:07 +0100 Message-Id: <20230303071907.3346-1-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: OZf5jV7SONml After each repro_test a random GNUPGHOME directory and `gpg-agent` process are left. After multiple full tests in CI we may come to the situation when all inotify descriptors are busy: ``` File "/bitbake/lib/pyinotify.py", line 1728, in _init_ raise OSError(err % self._inotify_wrapper.str_errno()) OSError: Cannot initialize new instance of inotify, Errno=Too many open files (EMFILE) ``` This patch provides an appropriate cleanup routine. Signed-off-by: Uladzimir Bely --- testsuite/cibase.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testsuite/cibase.py b/testsuite/cibase.py index f2e4e957..7ac8ebc7 100755 --- a/testsuite/cibase.py +++ b/testsuite/cibase.py @@ -3,6 +3,7 @@ import glob import os import re +import shutil import tempfile import time @@ -35,7 +36,7 @@ class CIBaseTest(CIBuilder): os.chdir(self.build_dir) - os.environ['GNUPGHOME'] = tempfile.mkdtemp() + os.environ['GNUPGHOME'] = gnupg_home = tempfile.mkdtemp() result = process.run('gpg --import %s %s' % (gpg_pub_key, gpg_priv_key)) if result.exit_status: @@ -56,6 +57,10 @@ class CIBaseTest(CIBuilder): self.configure(**kwargs) self.bitbake(targets, **kwargs) + # Cleanup + process.run('gpgconf --kill gpg-agent') + shutil.rmtree(gnupg_home, True) + def perform_ccache_test(self, targets, **kwargs): def ccache_stats(dir, field): # Look ccache source's 'src/core/Statistic.hpp' for field meanings -- 2.20.1