public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: Re: [PATCH] testsuite: Cleanup after gpg import in repro_test
Date: Mon, 06 Mar 2023 09:12:53 +0300	[thread overview]
Message-ID: <4287985.UPlyArG6xL@home> (raw)
In-Reply-To: <20230303071907.3346-1-ubely@ilbers.de>

In the email from Friday, 3 March 2023 10:19:07 +03 user Uladzimir Bely wrote:
> 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 "<path>/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 <ubely@ilbers.de>
> ---
>  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
> 

Applied to next.




      parent reply	other threads:[~2023-03-06  6:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03  7:19 Uladzimir Bely
2023-03-03  9:10 ` Henning Schild
2023-03-03 13:57   ` Uladzimir Bely
2023-03-06  6:12     ` Uladzimir Bely
2023-03-06  6:12 ` Uladzimir Bely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4287985.UPlyArG6xL@home \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox