From nobody Fri Apr 19 02:03:21 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154964930586048.977571000494095; Fri, 8 Feb 2019 10:08:25 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 90C4A59461; Fri, 8 Feb 2019 18:08:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 84E2E5C6A6; Fri, 8 Feb 2019 18:08:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7442118033A3; Fri, 8 Feb 2019 18:08:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x18I8NGJ001799 for ; Fri, 8 Feb 2019 13:08:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id 68D66277B0; Fri, 8 Feb 2019 18:08:23 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-71.ams2.redhat.com [10.36.112.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD65F27067 for ; Fri, 8 Feb 2019 18:08:17 +0000 (UTC) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Fri, 8 Feb 2019 19:08:16 +0100 Message-Id: <20190208180816.4199-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] tester: use different lock files for each instance X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 08 Feb 2019 18:08:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This allows installing multiple tester instances under the same user Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- patchew-cli | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patchew-cli b/patchew-cli index b2d0bbb..d79c76f 100755 --- a/patchew-cli +++ b/patchew-cli @@ -609,8 +609,8 @@ class TesterCommand(SubCommand): shutil.rmtree(wd) return True =20 - def _check_singleton(self): - lockfile =3D os.path.expanduser("~/.patchew-tester.lock") + def _check_singleton(self, name): + lockfile =3D os.path.expanduser("~/.%s.lock" % name) self._lockfile =3D open(lockfile, "w+") try: fcntl.flock(self._lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB) @@ -632,7 +632,7 @@ class TesterCommand(SubCommand): print(i) return 0 if args.singleton: - self._check_singleton() + self._check_singleton(args.name or "patchew-tester") subprocess.check_output(["git", "version"]) count =3D 0 cap_refresh =3D 10 --=20 2.20.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel