From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#43252: 27.1; DBus properties lack type hints or overrides Date: Tue, 22 Sep 2020 19:36:07 +0200 Message-ID: <87eemt67eg.fsf@gmx.de> References: <87v9gqquct.fsf@ccss.com> <87363sl4hs.fsf@gmx.de> <877dt3bnfl.fsf@ccss.com> <878sdj84kn.fsf@gmx.de> <871rjbaq05.fsf@ccss.com> <874ko6979w.fsf@gmx.de> <87v9gm9x9i.fsf@ccss.com> <871rj9k78r.fsf@gmx.de> <87imclwow5.fsf@gmx.de> <87pn6t9rbq.fsf@ccss.com> <87y2lggzvd.fsf@gmx.de> <87h7rzadlo.fsf@ccss.com> <87k0wtrir2.fsf@gmx.de> <87een19x9n.fsf@ccss.com> <87a6xor25b.fsf@gmx.de> <87bli49rem.fsf@ccss.com> <87h7rva0ku.fsf@gmx.de> <875z8aa1bm.fsf@ccss.com> <87ft7c8p4k.fsf@gmx.de> <87imc7jqms.fsf@gmx.de> <87zh5i8o9h.fsf@ccss.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20204"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43252@debbugs.gnu.org To: Hugh Daschbach Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 22 19:44:11 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 1kKmKp-00059Z-Jv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 19:44:11 +0200 Original-Received: from localhost ([::1]:39106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKmKo-000463-E7 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 13:44:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKmDu-0000FL-ST for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 13:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKmDu-00038V-ET for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 13:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kKmDu-0000ll-9s for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 13:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Sep 2020 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43252 X-GNU-PR-Package: emacs Original-Received: via spool by 43252-submit@debbugs.gnu.org id=B43252.16007961772906 (code B ref 43252); Tue, 22 Sep 2020 17:37:02 +0000 Original-Received: (at 43252) by debbugs.gnu.org; 22 Sep 2020 17:36:17 +0000 Original-Received: from localhost ([127.0.0.1]:33244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKmDB-0000ko-Fj for submit@debbugs.gnu.org; Tue, 22 Sep 2020 13:36:17 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:53015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKmDA-0000kb-DQ for 43252@debbugs.gnu.org; Tue, 22 Sep 2020 13:36:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600796168; bh=RvuQRszeMk8OP17bEL9mMDz/0OgNEm3aI0ZVegZ+TCU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=QdHykU2cu7kLD4Har32mLFLKpxXhNn2JiRMH8yiz/nSS+E8tI9fuEPeuJV/6Zg28S PgevIOQA6m2UlR4sQgHmkaiZgEovgzDjE/CplkkoB73RdRaRfJlSuZQETnzD9DDnxD xiqiKn+9N9txFws785k3wTstqtyy6Oa9KOX+CljU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.86.46.195]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M6Udt-1kNFBZ2HWb-006trT; Tue, 22 Sep 2020 19:36:08 +0200 In-Reply-To: <87zh5i8o9h.fsf@ccss.com> (Hugh Daschbach's message of "Mon, 21 Sep 2020 20:48:58 -0700") X-Provags-ID: V03:K1:ctnenNac+9SX3diH5FzLrARBVLjfIrOPbvuf4D9bMBr71ZyERVv JSb0HE9bfV6Cs2zPTqYLaabUPLz61/iL2a15fCO7GEsCNojEGAp7CLv+e987KAkMwE1jMaD IcVlA4g7129sgoln8lEvlhpFf09odMPQwRu3Vah+F4DGuh5EtelL3rgOfVEud+W5Po4zfpn eRuExDiKaQqjVU5vf1FuA== X-UI-Out-Filterresults: notjunk:1;V03:K0:oyvz6HMfiw4=:J/JI0GLtHODeDYQFwc1KuB SpyTXPzJKti88aWbHS7Pk0CYgXOEOK/CPS+rhjo4IgswcpOCbbnGdNejNlH+VHgfnNvMErbQz Mdo+9amCGphe6uAfblcWw3GVq0uQxYg1kxaLQEAjgc8SgyzXjus2zu75B4ydpT7HRRhIcAb/Z oOlrQJ8lhbLOqCN01Lr/0fk0WkBG12CDnZd0UW0Mk0TCCC3qKljhK+8j3DJJJXcc+CCSPhhHQ 221OaQGggdxP7SpgZxzXq9wNhGPyhR6sjax6wTbjFj3tTeI8QFTeKfut8YdiwtvgfbYCkl0oB pfjDOccKdSXOuDNvKt74VCbmdW22AEqBY8UWrdZwlojO/cJs4nbw6FfrpvZHC7ESGe3E9xD04 tZcxWXF7ZBfjk+wY96NrVV0X7i9/0AzC+vM8ih2eMKKWeE039vsyEZmB+f8jfuLQYUvP3IkNV D7bRkaSTKOGuESdIs+/3oQGloPKn62sZAssVn0jJljvVKM4KtZUx+U9OrsynBApT+RBN0n+Ls /x8U6S2d5DgHEyTv8ZtsjPOBXMxAtXh+1+Ag4jsA21XwazQ+sjU/040WQ2lETFphlBM2tXrNH 8xhjtP+NevLA1HSgCbaMfaTu0lIIe4wyH6ZGYIxzxCWGVBm0g6vr5i63YBJ92g1dRFm/eHzfL erSIBwTbBiLApWTN4++Rezp5O5ekssWTohjjzb2AIMElMHdwehgrGI9HDcqTIRj0ueaFw+wrM SMxvKHR9uudB0VCtto+cYnjxTZJhEvICMEyaqxeB26uHZ0JzFr4TIoJeqD9FYR7CWinIEI6X 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:188731 Archived-At: Hugh Daschbach writes: Hi Hugh, > I could dig deeper into the dbus-introspect-get-interface, but wanted > to come up for air first. Let me know if you think it's worth the > effort given the individual method, signal, and property tests. Thanks for this! It is already very comprehensive (and takes 2 seconds on my laptop, more than all other tests together). So I guess we could take it as is, until new tests are triggered by errors in the wild. OTOH, I don't mind to give this test the :expensive-test tag. Then it doesn't matter how long it runs. Given the time it consumes, there might be a need to cache introspection data. Either the result of dbus-introspect or dbus--parse-xml-buffer, I guess rather the latter. Do you want to investigate it in dbus.el? > And, of course, let me know what you think should be reworked. Here we are. I don't repeat general comments I have given the other review= . > +(defun dbus--test-introspect () > + "Return test introspection string." > + " ... Well, this is one approach. Alternatively, we could regard the introspection file as test data, which is located in a file called .../test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml. This function (the handler for the Introspect method) would read the file, and return its contents. > +(defsubst dbus--test-examine-interface (iface-name > + expected-properties > + expected-methods > + expected-signals > + expected-annotations) This is rather C-style of argument indentation. In ELisp, we do something like (defsubst dbus--test-examine-interface (iface-name expected-properties expected-methods expected-signals expected-annotations) ...) > + (let ((interface (dbus-introspect-get-interface > + :session > + dbus--test-service > + dbus--test-path > + iface-name))) A similar comment applies. > + (should-not (equal expected nil)) This is (should expected) > + (unwind-protect > + ;; dbus-introspect-get-node-names > + (should > + (equal > + (dbus-introspect-get-node-names :session dbus--test-service dbu= s--test-path) > + '("node0" "node1"))) A (progn ... is missing after unwind-protect. > + '("org.freedesktop.DBus.Deprecated"))) Hmm. Maybe we shall give "org.freedesktop.DBus.Deprecated" a defconst in dbus.el? > Thanks, > Hugh Best regards, Michael.