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#43252: 27.1; DBus properties lack type hints or overrides Date: Mon, 28 Sep 2020 16:17:53 -0700 Message-ID: <87ft718p9a.fsf@ccss.com> References: <87v9gqquct.fsf@ccss.com> <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> <87eemt67eg.fsf@gmx.de> <87wo0l8908.fsf@ccss.com> <87wo0kielj.fsf@gmx.de> <87r1qr98sf.fsf@ccss.com> <87r1qrimqf.fsf@gmx.de> <87o8lu8p9p.fsf@ccss.com> <87lfgx8gz9.fsf@ccss.com> <87lfgw987l.fsf@gmx.de> <87imby8v26.fsf@ccss.com> <87zh5arrfn.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="2069"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.5; emacs 27.1 Cc: 43252@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:19:14 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 1kN2QL-0000LG-Cs for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Sep 2020 01:19:14 +0200 Original-Received: from localhost ([::1]:34110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kN2QJ-0005e7-D7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Sep 2020 19:19:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kN2QA-0005az-0e for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 19:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kN2Q9-0006pZ-Ny for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 19:19:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kN2Q9-0007n3-Hv for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 19:19: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:19:01 +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.160133509629894 (code B ref 43252); Mon, 28 Sep 2020 23:19:01 +0000 Original-Received: (at 43252) by debbugs.gnu.org; 28 Sep 2020 23:18:16 +0000 Original-Received: from localhost ([127.0.0.1]:54325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN2PQ-0007m6-Hf for submit@debbugs.gnu.org; Mon, 28 Sep 2020 19:18:16 -0400 Original-Received: from mail1.ccss.com ([159.203.255.73]:45022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN2PO-0007ls-NC for 43252@debbugs.gnu.org; Mon, 28 Sep 2020 19:18:15 -0400 Original-Received: by mail1.ccss.com (Postfix, from userid 114) id F0B93BF8D0; Mon, 28 Sep 2020 16:18:08 -0700 (PDT) Original-Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 4E0A5BF820; Mon, 28 Sep 2020 16:18:08 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 220DD1760652; Mon, 28 Sep 2020 16:18:08 -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 17L0Y6ymYSYh; Mon, 28 Sep 2020 16:18:02 -0700 (PDT) Original-Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 03AE81760465; Mon, 28 Sep 2020 16:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1601335082; bh=g9SZ86qEud/yTOzSGincM4woTk9+gRFz0yrGmMDzH7Q=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=cfV1MzC+f+la5WZnKa2l/DSt3yXtzYILexCcotNz/fsReaungxCQVkhBh9WnTD3eC 68QIi4VIOJ/YwLD3Rk88Hb5SP4091JbCVPOjIdY1gkU10J5+rDHr6tprb5sfwElNS5 xwlfIl3IdyBap0dwqKfevVhI2H/NgOr6eMXjTiuRl7377d7Tx4AN/VHFygAq5+7Asg HGkbKCWDYdrxc5AzU4P/JX4kAeVyMVlfxb5n1fde79hh52FIr8iq+sC5+VN57m9v8c HgPpDTKIlWSoJB9+N/pgxnGSNsob/s8gvb25QJUb32CI2Xv1w9aDAqBkTPvBIlLhN6 n3TzBsuNZijQw== In-reply-to: <87zh5arrfn.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:189229 Archived-At: --=-=-= Content-Type: text/plain Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > Could you, pls, move the dbus-call-method timeout test into a test of > its own, dbus-test04-call-method-timeout? And the other test might be > called dbus-test07-introspect-timeout. Sure. I've attached a draft for your review. >> Timestamps (perhaps optional) would be useful, I think. > > Added. In case of method-return and error messages, I've added also the > time difference to the corresponding method-call. Nice. > And while I'm there, I've added also links between serial numbers. That > is, if you click on the serial number of a message-return or error > message, you jump to the corresponding methoid-call. And vice-versa. That's awesome. Great feature. Cheers, Hugh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-Add-D-Bus-timeout-tests.patch Content-Description: Timeout tests. >From 454a9f4505bde8068675dfdf58658f752f561729 Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Mon, 28 Sep 2020 12:44:34 -0700 Subject: [PATCH 3/4] Add D-Bus timeout tests. * test/lisp/net/dbus-tests.el: Add timeout tests. (dbus-test04-call-method-timeout, dbus-test07-introspection-timeout): New tests. --- test/lisp/net/dbus-tests.el | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 28dcdd95c00..308f22eb6cc 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -581,6 +581,28 @@ dbus-test04-register-method ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(ert-deftest dbus-test04-call-method-timeout () + "Verify `dbus-call-method' request timeout." + :tags '(:expensive-test) + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + (dbus-register-service :session dbus--test-service) + + (unwind-protect + (let ((start (current-time))) + ;; Test timeout override for method call. + (should-error + (dbus-call-method + :session dbus--test-service dbus--test-path + dbus-interface-introspectable "Introspect" :timeout 2500) + :type 'dbus-error) + + (should + (< 2.4 (float-time (time-since start)) 2.7))) + + (dbus-unregister-service :session dbus--test-service))) + + (defvar dbus--test-signal-received nil "Received signal value in `dbus--test-signal-handler'.") @@ -1709,6 +1731,22 @@ dbus-test07-introspection (dbus-unregister-service :session dbus--test-service))) +(ert-deftest dbus-test07-introspection-timeout () + "Verify introspection request timeouts." + :tags '(:expensive-test) + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + (dbus-register-service :session dbus--test-service) + + (unwind-protect + (let ((start (current-time))) + (dbus-introspect-xml :session dbus--test-service dbus--test-path) + ;; Introspection internal timeout is one second. + (should + (< 1.0 (float-time (time-since start))))) + + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-=--