From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hugh Daschbach Newsgroups: gmane.emacs.bugs Subject: bug#43251: 27.1; DBus signals error when GetManagedObjects received while waiting for dbus-call-method Date: Mon, 28 Sep 2020 16:36:19 -0700 Message-ID: <87d0258oek.fsf@ccss.com> References: <87y2lmqwdl.fsf@ccss.com> <87mu22dp05.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40042"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.5; emacs 27.1 Cc: 43251@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 29 01:37:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kN2ho-000AKZ-GW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Sep 2020 01:37:16 +0200 Original-Received: from localhost ([::1]:37804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kN2hn-0008IL-2K for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Sep 2020 19:37:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kN2ha-0008I9-6Q for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 19:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kN2hZ-0000sV-TY for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 19:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kN2hZ-0008Cf-QP for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 19:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Hugh Daschbach Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Sep 2020 23:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43251 X-GNU-PR-Package: emacs Original-Received: via spool by 43251-submit@debbugs.gnu.org id=B43251.160133619431500 (code B ref 43251); Mon, 28 Sep 2020 23:37:01 +0000 Original-Received: (at 43251) by debbugs.gnu.org; 28 Sep 2020 23:36:34 +0000 Original-Received: from localhost ([127.0.0.1]:54331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN2h8-0008Bz-6Q for submit@debbugs.gnu.org; Mon, 28 Sep 2020 19:36:34 -0400 Original-Received: from mail1.ccss.com ([159.203.255.73]:45138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN2h6-0008Bm-AU for 43251@debbugs.gnu.org; Mon, 28 Sep 2020 19:36:32 -0400 Original-Received: by mail1.ccss.com (Postfix, from userid 114) id 9279CBF8D0; Mon, 28 Sep 2020 16:36:26 -0700 (PDT) Original-Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 38FB3BF820; Mon, 28 Sep 2020 16:36:26 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 0D4D31760652; Mon, 28 Sep 2020 16:36:26 -0700 (PDT) Original-Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hlAAks-IHAXV; Mon, 28 Sep 2020 16:36:20 -0700 (PDT) Original-Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 500E71760465; Mon, 28 Sep 2020 16:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1601336180; bh=Iwm6WSVHLQC736f3n3doHr0lHvEssskuWdoTQaa+AhU=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=Y2s1VXg27KnqVL27OIcXFElt/ZrgdqL0t5vZu6GcQ/iyrA0SXhwnA+rH/+j0Mm7Vb Nt0bOB5hnyyJpP6vf9ab/dPXHM5g+m6Uep5GnksMxUf6mte/iYvDGyiiFKrDZrpEqn QpU8ZaAgj9GRRWp50pKxETW62c2O8cDiGXJfh7Nqs4Yi7wuN6O5ELhdzTZP+YZKia9 zz5pt9DIXP4H53aD89WrZKEAVfz20PuDDVCKhmKYDfEV+BNGJPRDx3rf6Ba1aOLZeU EmvgRN3/0myg0L78vYHyHHYJDA5XF4TAoEliSo8gd6zkZgiWT34+OrOE+RkafdSHCF agqugm5UkChVw== In-reply-to: <87mu22dp05.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189230 Archived-At: --=-=-= Content-Type: text/plain Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > >> But if that GetManagedObjects method call is received while a >> dbus-call-method request is waiting for a reply message, processing the >> GetManagedObjects request signals an error. > > Thanks, I will investigate. I believe this issue is fixed on master. The attached test fails on 27.1 and does not fail on master. Feel free to close. Thanks, Hugh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-Add-D-Bus-method-call-reentry-test.patch Content-Description: Test case for dbus-call-method reentry. >From 51eabb23d839827beccad86ba3755d1fc32c20b3 Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Mon, 28 Sep 2020 14:34:54 -0700 Subject: [PATCH 4/4] Add D-Bus method call reentry test. * test/lisp/net/dbus-tests.el (dbus--tests-method-reentry-handler): New defun. (dbus-test04-method-reentry): New test. --- test/lisp/net/dbus-tests.el | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 308f22eb6cc..a4305b5942a 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -581,6 +581,39 @@ dbus-test04-register-method ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(defun dbus--test-method-reentry-handler (&rest args) + "Method handler for `dbus-test04-method-reentry'." + (dbus-get-all-managed-objects :session dbus--test-service dbus--test-path) + 42) + +(ert-deftest dbus-test04-method-reentry () + "Check receiving method call while awaiting response. +Ensure that incoming method calls are handled when call to `dbus-call-method' +is in progress." + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + + (unwind-protect + (let ((method "Rentry")) + (should + (equal + (dbus-register-method + :session dbus--test-service dbus--test-path + dbus--test-interface method #'dbus--test-method-reentry-handler) + `((:method :session ,dbus--test-interface ,method) + (,dbus--test-service ,dbus--test-path + dbus--test-method-reentry-handler)))) + + (should + (= + (dbus-call-method + :session dbus--test-service dbus--test-path + dbus--test-interface method) + 42))) + + ;; Cleanup. + (dbus-unregister-service :session dbus--test-service))) + (ert-deftest dbus-test04-call-method-timeout () "Verify `dbus-call-method' request timeout." :tags '(:expensive-test) -- 2.28.0 --=-=-=--