From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 20:54:58 2020 Received: (at submit) by debbugs.gnu.org; 7 Sep 2020 00:54:58 +0000 Received: from localhost ([127.0.0.1]:47475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF5Qu-0001q8-F7 for submit@debbugs.gnu.org; Sun, 06 Sep 2020 20:54:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:48956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF5Qs-0001q0-A2 for submit@debbugs.gnu.org; Sun, 06 Sep 2020 20:54:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kF5Qs-0000mj-0x for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2020 20:54:54 -0400 Received: from mail1.ccss.com ([159.203.255.73]:46928) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kF5Qo-0000tV-2f for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2020 20:54:53 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 30BD7BF8A7; Sun, 6 Sep 2020 17:54:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 67CD5BF8A5 for ; Sun, 6 Sep 2020 17:54:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 35CE8176065A for ; Sun, 6 Sep 2020 17:54:47 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ciFpxnwZ5FXv for ; Sun, 6 Sep 2020 17:54:43 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 0368417605A2 for ; Sun, 6 Sep 2020 17:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1599440083; bh=dpC6BiC+0sOPST3HjyFstnxL0vGhvhuygrhfhX2FJf0=; h=From:To:Subject:Date:From; b=rvV+Rg/dJvFkesAYeI2Un6y5dA9yy3TeZ0lKDLTWAyHTH2j3ZpEbBzA00LWkOfKVJ sr++rc6Dx2zXnBZH6KNvjKNsiYnWUd8fvqOFKCvVJQb+eu4MbC9G3atxaDdQb/dDWt tAnMMgq7xPwiRFYA9kpNANXNjYZwBoMCBN6yfbWf0MI7e+8tEt2alqIoXL02j3OdlK wy4/36x1ztMTnMb1ZKVM95Tz8YEQPln7Uvt0VQnp1qPqPQBjkvwOqMImOJjIjBbc57 2en4RDl7AU3bBSdhMV8NLZ/76ubRAENsiHaJml5AKwgFwsfdyCRDy8eHVZyP/ub9bh E9om1BNvdtVuQ== From: Hugh Daschbach To: bug-gnu-emacs@gnu.org Subject: 27.1; DBus properties lack type hints or overrides Date: Sun, 06 Sep 2020 17:54:42 -0700 Message-ID: <87v9gqquct.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=159.203.255.73; envelope-from=hugh@ccss.com; helo=mail1.ccss.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/06 20:11:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) In order to implement a service exposing interface "org.bluez.GattService1", I need to export the properties defined for that interface. (See, https://kernel.googlesource.com/pub/scm/bluetooth/bluez/+/refs/tags/5.55/doc/gatt-api.txt) There are two properties that require an object path: "Device", and "Includes". Since there is no type information associated with the registered property, introspection supplies its best guess. If the value is a string it is described as a :string, not an :object-path There doesn't seem to be any mechanism to register the property and have introspection describe it as as an :object-path. Am I missing something? Is this out of scope? Is there anyway to specify simple types for parameter values? Thanks, Hugh In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2020-08-06 built on klaatu Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8 Repository branch: emacs-27 Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Artix Linux Recent messages: [mu4e] Indexing completed; processed 0, updated 0, cleaned-up 0 Mark set [mu4e] Indexing... processed 2, updated 2 [mu4e] Indexing completed; processed 2, updated 2, cleaned-up 0 [mu4e] Found 19 matching messages Mark set C-x C-g is undefined Winner undo (1 / 199) Winner undo (2 / 198) Auto-saving...done Configured using: 'configure --with-x-toolkit=lucid' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: pdf-occur-global-minor-mode: t global-magit-file-mode: t magit-file-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t ggtags-navigation-mode: t desktop-save-mode: t which-key-mode: t hungry-delete-mode: t paredit-mode: t amx-mode: t ivy-mode: t winner-mode: t shell-dirtrack-mode: t save-place-mode: t global-edit-server-edit-mode: t auto-insert-mode: t override-global-mode: t straight-use-package-mode: t straight-package-neutering-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox hides /home/hugh/.config/emacs/straight/build/org/ox /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-texinfo hides /home/hugh/.config/emacs/straight/build/org/ox-texinfo /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-publish hides /home/hugh/.config/emacs/straight/build/org/ox-publish /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-org hides /home/hugh/.config/emacs/straight/build/org/ox-org /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-odt hides /home/hugh/.config/emacs/straight/build/org/ox-odt /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-md hides /home/hugh/.config/emacs/straight/build/org/ox-md /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-man hides /home/hugh/.config/emacs/straight/build/org/ox-man /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-latex hides /home/hugh/.config/emacs/straight/build/org/ox-latex /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-icalendar hides /home/hugh/.config/emacs/straight/build/org/ox-icalendar /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-html hides /home/hugh/.config/emacs/straight/build/org/ox-html /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-beamer hides /home/hugh/.config/emacs/straight/build/org/ox-beamer /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-ascii hides /home/hugh/.config/emacs/straight/build/org/ox-ascii /home/hugh/.config/emacs/straight/build/org-plus-contrib/org hides /home/hugh/.config/emacs/straight/build/org/org /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-timer hides /home/hugh/.config/emacs/straight/build/org/org-timer /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-tempo hides /home/hugh/.config/emacs/straight/build/org/org-tempo /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-table hides /home/hugh/.config/emacs/straight/build/org/org-table /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-src hides /home/hugh/.config/emacs/straight/build/org/org-src /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-refile hides /home/hugh/.config/emacs/straight/build/org/org-refile /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-protocol hides /home/hugh/.config/emacs/straight/build/org/org-protocol /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-plot hides /home/hugh/.config/emacs/straight/build/org/org-plot /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-pcomplete hides /home/hugh/.config/emacs/straight/build/org/org-pcomplete /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-num hides /home/hugh/.config/emacs/straight/build/org/org-num /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-mouse hides /home/hugh/.config/emacs/straight/build/org/org-mouse /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-mobile hides /home/hugh/.config/emacs/straight/build/org/org-mobile /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-macs hides /home/hugh/.config/emacs/straight/build/org/org-macs /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-macro hides /home/hugh/.config/emacs/straight/build/org/org-macro /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-list hides /home/hugh/.config/emacs/straight/build/org/org-list /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-lint hides /home/hugh/.config/emacs/straight/build/org/org-lint /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-keys hides /home/hugh/.config/emacs/straight/build/org/org-keys /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-inlinetask hides /home/hugh/.config/emacs/straight/build/org/org-inlinetask /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-indent hides /home/hugh/.config/emacs/straight/build/org/org-indent /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-id hides /home/hugh/.config/emacs/straight/build/org/org-id /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-habit hides /home/hugh/.config/emacs/straight/build/org/org-habit /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-goto hides /home/hugh/.config/emacs/straight/build/org/org-goto /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-footnote hides /home/hugh/.config/emacs/straight/build/org/org-footnote /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-feed hides /home/hugh/.config/emacs/straight/build/org/org-feed /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-faces hides /home/hugh/.config/emacs/straight/build/org/org-faces /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-entities hides /home/hugh/.config/emacs/straight/build/org/org-entities /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-element hides /home/hugh/.config/emacs/straight/build/org/org-element /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-duration hides /home/hugh/.config/emacs/straight/build/org/org-duration /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-datetree hides /home/hugh/.config/emacs/straight/build/org/org-datetree /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-ctags hides /home/hugh/.config/emacs/straight/build/org/org-ctags /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-crypt hides /home/hugh/.config/emacs/straight/build/org/org-crypt /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-compat hides /home/hugh/.config/emacs/straight/build/org/org-compat /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-colview hides /home/hugh/.config/emacs/straight/build/org/org-colview /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-clock hides /home/hugh/.config/emacs/straight/build/org/org-clock /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-capture hides /home/hugh/.config/emacs/straight/build/org/org-capture /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-attach hides /home/hugh/.config/emacs/straight/build/org/org-attach /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-attach-git hides /home/hugh/.config/emacs/straight/build/org/org-attach-git /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-archive hides /home/hugh/.config/emacs/straight/build/org/org-archive /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-agenda hides /home/hugh/.config/emacs/straight/build/org/org-agenda /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol hides /home/hugh/.config/emacs/straight/build/org/ol /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-w3m hides /home/hugh/.config/emacs/straight/build/org/ol-w3m /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-rmail hides /home/hugh/.config/emacs/straight/build/org/ol-rmail /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-mhe hides /home/hugh/.config/emacs/straight/build/org/ol-mhe /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-irc hides /home/hugh/.config/emacs/straight/build/org/ol-irc /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-info hides /home/hugh/.config/emacs/straight/build/org/ol-info /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-gnus hides /home/hugh/.config/emacs/straight/build/org/ol-gnus /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-eww hides /home/hugh/.config/emacs/straight/build/org/ol-eww /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-eshell hides /home/hugh/.config/emacs/straight/build/org/ol-eshell /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-docview hides /home/hugh/.config/emacs/straight/build/org/ol-docview /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-bibtex hides /home/hugh/.config/emacs/straight/build/org/ol-bibtex /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-bbdb hides /home/hugh/.config/emacs/straight/build/org/ol-bbdb /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob hides /home/hugh/.config/emacs/straight/build/org/ob /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-vala hides /home/hugh/.config/emacs/straight/build/org/ob-vala /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-tangle hides /home/hugh/.config/emacs/straight/build/org/ob-tangle /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-table hides /home/hugh/.config/emacs/straight/build/org/ob-table /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-stan hides /home/hugh/.config/emacs/straight/build/org/ob-stan /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-sqlite hides /home/hugh/.config/emacs/straight/build/org/ob-sqlite /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-sql hides /home/hugh/.config/emacs/straight/build/org/ob-sql /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-shen hides /home/hugh/.config/emacs/straight/build/org/ob-shen /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-shell hides /home/hugh/.config/emacs/straight/build/org/ob-shell /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-sed hides /home/hugh/.config/emacs/straight/build/org/ob-sed /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-screen hides /home/hugh/.config/emacs/straight/build/org/ob-screen /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-scheme hides /home/hugh/.config/emacs/straight/build/org/ob-scheme /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-sass hides /home/hugh/.config/emacs/straight/build/org/ob-sass /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ruby hides /home/hugh/.config/emacs/straight/build/org/ob-ruby /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ref hides /home/hugh/.config/emacs/straight/build/org/ob-ref /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-python hides /home/hugh/.config/emacs/straight/build/org/ob-python /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-processing hides /home/hugh/.config/emacs/straight/build/org/ob-processing /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-plantuml hides /home/hugh/.config/emacs/straight/build/org/ob-plantuml /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-picolisp hides /home/hugh/.config/emacs/straight/build/org/ob-picolisp /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-perl hides /home/hugh/.config/emacs/straight/build/org/ob-perl /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-org hides /home/hugh/.config/emacs/straight/build/org/ob-org /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-octave hides /home/hugh/.config/emacs/straight/build/org/ob-octave /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ocaml hides /home/hugh/.config/emacs/straight/build/org/ob-ocaml /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-mscgen hides /home/hugh/.config/emacs/straight/build/org/ob-mscgen /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-maxima hides /home/hugh/.config/emacs/straight/build/org/ob-maxima /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-matlab hides /home/hugh/.config/emacs/straight/build/org/ob-matlab /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-makefile hides /home/hugh/.config/emacs/straight/build/org/ob-makefile /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-lua hides /home/hugh/.config/emacs/straight/build/org/ob-lua /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-lob hides /home/hugh/.config/emacs/straight/build/org/ob-lob /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-lisp hides /home/hugh/.config/emacs/straight/build/org/ob-lisp /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-lilypond hides /home/hugh/.config/emacs/straight/build/org/ob-lilypond /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ledger hides /home/hugh/.config/emacs/straight/build/org/ob-ledger /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-latex hides /home/hugh/.config/emacs/straight/build/org/ob-latex /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-js hides /home/hugh/.config/emacs/straight/build/org/ob-js /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-java hides /home/hugh/.config/emacs/straight/build/org/ob-java /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-io hides /home/hugh/.config/emacs/straight/build/org/ob-io /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-hledger hides /home/hugh/.config/emacs/straight/build/org/ob-hledger /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-haskell hides /home/hugh/.config/emacs/straight/build/org/ob-haskell /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-groovy hides /home/hugh/.config/emacs/straight/build/org/ob-groovy /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-gnuplot hides /home/hugh/.config/emacs/straight/build/org/ob-gnuplot /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-fortran hides /home/hugh/.config/emacs/straight/build/org/ob-fortran /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-forth hides /home/hugh/.config/emacs/straight/build/org/ob-forth /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-exp hides /home/hugh/.config/emacs/straight/build/org/ob-exp /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-eval hides /home/hugh/.config/emacs/straight/build/org/ob-eval /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-eshell hides /home/hugh/.config/emacs/straight/build/org/ob-eshell /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-emacs-lisp hides /home/hugh/.config/emacs/straight/build/org/ob-emacs-lisp /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ebnf hides /home/hugh/.config/emacs/straight/build/org/ob-ebnf /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-dot hides /home/hugh/.config/emacs/straight/build/org/ob-dot /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ditaa hides /home/hugh/.config/emacs/straight/build/org/ob-ditaa /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-css hides /home/hugh/.config/emacs/straight/build/org/ob-css /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-core hides /home/hugh/.config/emacs/straight/build/org/ob-core /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-coq hides /home/hugh/.config/emacs/straight/build/org/ob-coq /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-comint hides /home/hugh/.config/emacs/straight/build/org/ob-comint /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-clojure hides /home/hugh/.config/emacs/straight/build/org/ob-clojure /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-calc hides /home/hugh/.config/emacs/straight/build/org/ob-calc /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-awk hides /home/hugh/.config/emacs/straight/build/org/ob-awk /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-asymptote hides /home/hugh/.config/emacs/straight/build/org/ob-asymptote /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-abc hides /home/hugh/.config/emacs/straight/build/org/ob-abc /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-R hides /home/hugh/.config/emacs/straight/build/org/ob-R /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-J hides /home/hugh/.config/emacs/straight/build/org/ob-J /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-C hides /home/hugh/.config/emacs/straight/build/org/ob-C /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-loaddefs hides /home/hugh/.config/emacs/straight/build/org/org-loaddefs /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-install hides /home/hugh/.config/emacs/straight/build/org/org-install /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-texinfo hides /usr/local/share/emacs/27.1/lisp/org/ox-texinfo /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-publish hides /usr/local/share/emacs/27.1/lisp/org/ox-publish /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-org hides /usr/local/share/emacs/27.1/lisp/org/ox-org /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-odt hides /usr/local/share/emacs/27.1/lisp/org/ox-odt /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-md hides /usr/local/share/emacs/27.1/lisp/org/ox-md /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-man hides /usr/local/share/emacs/27.1/lisp/org/ox-man /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-latex hides /usr/local/share/emacs/27.1/lisp/org/ox-latex /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-icalendar hides /usr/local/share/emacs/27.1/lisp/org/ox-icalendar /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-html hides /usr/local/share/emacs/27.1/lisp/org/ox-html /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox hides /usr/local/share/emacs/27.1/lisp/org/ox /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-beamer hides /usr/local/share/emacs/27.1/lisp/org/ox-beamer /home/hugh/.config/emacs/straight/build/org-plus-contrib/ox-ascii hides /usr/local/share/emacs/27.1/lisp/org/ox-ascii /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-timer hides /usr/local/share/emacs/27.1/lisp/org/org-timer /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-tempo hides /usr/local/share/emacs/27.1/lisp/org/org-tempo /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-table hides /usr/local/share/emacs/27.1/lisp/org/org-table /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-src hides /usr/local/share/emacs/27.1/lisp/org/org-src /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-protocol hides /usr/local/share/emacs/27.1/lisp/org/org-protocol /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-plot hides /usr/local/share/emacs/27.1/lisp/org/org-plot /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-pcomplete hides /usr/local/share/emacs/27.1/lisp/org/org-pcomplete /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-num hides /usr/local/share/emacs/27.1/lisp/org/org-num /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-mouse hides /usr/local/share/emacs/27.1/lisp/org/org-mouse /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-mobile hides /usr/local/share/emacs/27.1/lisp/org/org-mobile /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-macs hides /usr/local/share/emacs/27.1/lisp/org/org-macs /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-macro hides /usr/local/share/emacs/27.1/lisp/org/org-macro /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-list hides /usr/local/share/emacs/27.1/lisp/org/org-list /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-lint hides /usr/local/share/emacs/27.1/lisp/org/org-lint /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-keys hides /usr/local/share/emacs/27.1/lisp/org/org-keys /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-inlinetask hides /usr/local/share/emacs/27.1/lisp/org/org-inlinetask /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-indent hides /usr/local/share/emacs/27.1/lisp/org/org-indent /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-id hides /usr/local/share/emacs/27.1/lisp/org/org-id /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-habit hides /usr/local/share/emacs/27.1/lisp/org/org-habit /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-goto hides /usr/local/share/emacs/27.1/lisp/org/org-goto /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-footnote hides /usr/local/share/emacs/27.1/lisp/org/org-footnote /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-feed hides /usr/local/share/emacs/27.1/lisp/org/org-feed /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-faces hides /usr/local/share/emacs/27.1/lisp/org/org-faces /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-entities hides /usr/local/share/emacs/27.1/lisp/org/org-entities /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-element hides /usr/local/share/emacs/27.1/lisp/org/org-element /home/hugh/.config/emacs/straight/build/org-plus-contrib/org hides /usr/local/share/emacs/27.1/lisp/org/org /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-duration hides /usr/local/share/emacs/27.1/lisp/org/org-duration /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-datetree hides /usr/local/share/emacs/27.1/lisp/org/org-datetree /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-ctags hides /usr/local/share/emacs/27.1/lisp/org/org-ctags /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-crypt hides /usr/local/share/emacs/27.1/lisp/org/org-crypt /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-compat hides /usr/local/share/emacs/27.1/lisp/org/org-compat /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-colview hides /usr/local/share/emacs/27.1/lisp/org/org-colview /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-clock hides /usr/local/share/emacs/27.1/lisp/org/org-clock /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-capture hides /usr/local/share/emacs/27.1/lisp/org/org-capture /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-attach-git hides /usr/local/share/emacs/27.1/lisp/org/org-attach-git /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-attach hides /usr/local/share/emacs/27.1/lisp/org/org-attach /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-archive hides /usr/local/share/emacs/27.1/lisp/org/org-archive /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-agenda hides /usr/local/share/emacs/27.1/lisp/org/org-agenda /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-w3m hides /usr/local/share/emacs/27.1/lisp/org/ol-w3m /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-rmail hides /usr/local/share/emacs/27.1/lisp/org/ol-rmail /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-mhe hides /usr/local/share/emacs/27.1/lisp/org/ol-mhe /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-irc hides /usr/local/share/emacs/27.1/lisp/org/ol-irc /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-info hides /usr/local/share/emacs/27.1/lisp/org/ol-info /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-gnus hides /usr/local/share/emacs/27.1/lisp/org/ol-gnus /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-eww hides /usr/local/share/emacs/27.1/lisp/org/ol-eww /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-eshell hides /usr/local/share/emacs/27.1/lisp/org/ol-eshell /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol hides /usr/local/share/emacs/27.1/lisp/org/ol /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-docview hides /usr/local/share/emacs/27.1/lisp/org/ol-docview /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-bibtex hides /usr/local/share/emacs/27.1/lisp/org/ol-bibtex /home/hugh/.config/emacs/straight/build/org-plus-contrib/ol-bbdb hides /usr/local/share/emacs/27.1/lisp/org/ol-bbdb /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-vala hides /usr/local/share/emacs/27.1/lisp/org/ob-vala /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-tangle hides /usr/local/share/emacs/27.1/lisp/org/ob-tangle /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-table hides /usr/local/share/emacs/27.1/lisp/org/ob-table /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-stan hides /usr/local/share/emacs/27.1/lisp/org/ob-stan /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-sqlite hides /usr/local/share/emacs/27.1/lisp/org/ob-sqlite /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-sql hides /usr/local/share/emacs/27.1/lisp/org/ob-sql /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-shen hides /usr/local/share/emacs/27.1/lisp/org/ob-shen /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-shell hides /usr/local/share/emacs/27.1/lisp/org/ob-shell /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-sed hides /usr/local/share/emacs/27.1/lisp/org/ob-sed /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-screen hides /usr/local/share/emacs/27.1/lisp/org/ob-screen /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-scheme hides /usr/local/share/emacs/27.1/lisp/org/ob-scheme /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-sass hides /usr/local/share/emacs/27.1/lisp/org/ob-sass /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ruby hides /usr/local/share/emacs/27.1/lisp/org/ob-ruby /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-R hides /usr/local/share/emacs/27.1/lisp/org/ob-R /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ref hides /usr/local/share/emacs/27.1/lisp/org/ob-ref /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-python hides /usr/local/share/emacs/27.1/lisp/org/ob-python /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-processing hides /usr/local/share/emacs/27.1/lisp/org/ob-processing /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-plantuml hides /usr/local/share/emacs/27.1/lisp/org/ob-plantuml /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-picolisp hides /usr/local/share/emacs/27.1/lisp/org/ob-picolisp /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-perl hides /usr/local/share/emacs/27.1/lisp/org/ob-perl /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-org hides /usr/local/share/emacs/27.1/lisp/org/ob-org /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-octave hides /usr/local/share/emacs/27.1/lisp/org/ob-octave /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ocaml hides /usr/local/share/emacs/27.1/lisp/org/ob-ocaml /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-mscgen hides /usr/local/share/emacs/27.1/lisp/org/ob-mscgen /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-maxima hides /usr/local/share/emacs/27.1/lisp/org/ob-maxima /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-matlab hides /usr/local/share/emacs/27.1/lisp/org/ob-matlab /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-makefile hides /usr/local/share/emacs/27.1/lisp/org/ob-makefile /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-lua hides /usr/local/share/emacs/27.1/lisp/org/ob-lua /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-lob hides /usr/local/share/emacs/27.1/lisp/org/ob-lob /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-lisp hides /usr/local/share/emacs/27.1/lisp/org/ob-lisp /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-lilypond hides /usr/local/share/emacs/27.1/lisp/org/ob-lilypond /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ledger hides /usr/local/share/emacs/27.1/lisp/org/ob-ledger /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-latex hides /usr/local/share/emacs/27.1/lisp/org/ob-latex /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-js hides /usr/local/share/emacs/27.1/lisp/org/ob-js /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-J hides /usr/local/share/emacs/27.1/lisp/org/ob-J /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-java hides /usr/local/share/emacs/27.1/lisp/org/ob-java /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-io hides /usr/local/share/emacs/27.1/lisp/org/ob-io /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-hledger hides /usr/local/share/emacs/27.1/lisp/org/ob-hledger /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-haskell hides /usr/local/share/emacs/27.1/lisp/org/ob-haskell /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-groovy hides /usr/local/share/emacs/27.1/lisp/org/ob-groovy /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-gnuplot hides /usr/local/share/emacs/27.1/lisp/org/ob-gnuplot /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-fortran hides /usr/local/share/emacs/27.1/lisp/org/ob-fortran /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-forth hides /usr/local/share/emacs/27.1/lisp/org/ob-forth /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-exp hides /usr/local/share/emacs/27.1/lisp/org/ob-exp /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-eval hides /usr/local/share/emacs/27.1/lisp/org/ob-eval /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-eshell hides /usr/local/share/emacs/27.1/lisp/org/ob-eshell /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-emacs-lisp hides /usr/local/share/emacs/27.1/lisp/org/ob-emacs-lisp /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob hides /usr/local/share/emacs/27.1/lisp/org/ob /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ebnf hides /usr/local/share/emacs/27.1/lisp/org/ob-ebnf /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-dot hides /usr/local/share/emacs/27.1/lisp/org/ob-dot /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-ditaa hides /usr/local/share/emacs/27.1/lisp/org/ob-ditaa /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-css hides /usr/local/share/emacs/27.1/lisp/org/ob-css /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-core hides /usr/local/share/emacs/27.1/lisp/org/ob-core /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-coq hides /usr/local/share/emacs/27.1/lisp/org/ob-coq /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-comint hides /usr/local/share/emacs/27.1/lisp/org/ob-comint /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-clojure hides /usr/local/share/emacs/27.1/lisp/org/ob-clojure /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-C hides /usr/local/share/emacs/27.1/lisp/org/ob-C /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-calc hides /usr/local/share/emacs/27.1/lisp/org/ob-calc /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-awk hides /usr/local/share/emacs/27.1/lisp/org/ob-awk /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-asymptote hides /usr/local/share/emacs/27.1/lisp/org/ob-asymptote /home/hugh/.config/emacs/straight/build/org-plus-contrib/ob-abc hides /usr/local/share/emacs/27.1/lisp/org/ob-abc /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-loaddefs hides /usr/local/share/emacs/27.1/lisp/org/org-loaddefs /home/hugh/.config/emacs/straight/build/org-plus-contrib/org-install hides /usr/local/share/emacs/27.1/lisp/org/org-install /home/hugh/.config/emacs/straight/build/let-alist/let-alist hides /usr/local/share/emacs/27.1/lisp/emacs-lisp/let-alist Features: (shadow emacsbug sh-script smie python tramp-cmds rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid nxml-mode nxml-outln nxml-rap sgml-mode company-tng company transpose-frame autoload lisp-mnt descr-text gl-bluez-gatt dabbrev quail org-eldoc ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir ol-docview ol-bibtex bibtex ol-bbdb ol-w3m pdf-sync pdf-outline pdf-links pdf-history pdf-occur ibuf-ext pdf-isearch let-alist pdf-annot tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-misc pdf-tools pdf-view pdf-cache pdf-info tq pdf-util rect epa-mail epa-file mailalias face-remap tabify man view timezone gnutls url-http url-gw url-cache url-auth eww mm-url magit-extras magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit package url-handlers magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff magit-core magit-autorevert autorevert magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils crm log-edit pcvs-util add-log with-editor async-bytecomp async tmm eieio-opt speedbar sb-image ezimage dframe dbus-bluetooth dbus-formatters dbus-inspector tree-mode flyspell repeat bug-reference macrostep-c cmacexp macrostep ggtags etags fileloop ewoc cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs pulse xref project debug backtrace dired-aux tramp-cache tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp recentf tree-widget visual-fill-column sort gnus-cite smiley shr-color qp mm-archive mail-extr gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader iso-transl csv executable disp-table network-stream nsm cl-print ace-window avy rcirc help-fns radix-tree persistent-soft list-utils pcache eieio-compat eieio-base font-utils unicode-fonts misearch multi-isearch two-column vc-git diff-mode elfeed-org elfeed-show elfeed-search bookmark elfeed-csv elfeed elfeed-curl url url-proxy url-expand url-methods url-history mailcap elfeed-log elfeed-db elfeed-lib url-queue xml-query mu4e mu4e-org mu4e-main mu4e-view mu4e-headers mu4e-compose mu4e-context mu4e-draft mu4e-actions ido rfc2368 smtpmail sendmail mu4e-mark mu4e-proc mu4e-utils doc-view jka-compr image-mode exif mu4e-lists mu4e-message flow-fill ox-reveal desktop frameset ox-hugo org-refile ffap thingatpt ox-blackfriday ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-md ox-html table ox-beamer ox-latex ox-ascii ox-publish ox org-element avl-tree generator org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline ob-gnuplot ob-dot ob-ditaa ob-shell ob-awk ob-calc calc-store calc-trail calc-ext calc calc-loaddefs calc-macs ob ob-tangle org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs mule-util hl-line mu4e-vars message rmc format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader mu4e-meta which-key server hungry-delete paredit ivy-posframe posframe ivy-hydra amx ivy flx delsel ivy-faces ivy-overlay colir color winner url-privacy filenotify slime-company-autoloads slime-autoloads macrostep-autoloads shr text-property-search url-cookie url-domsuf url-util url-parse auth-source eieio eieio-core eieio-loaddefs password-cache url-vars puny svg dom zenburn-theme zenburn-theme-autoloads which-key-autoloads visual-fill-column-autoloads unicode-fonts-autoloads ucs-utils-autoloads font-utils-autoloads persistent-soft-autoloads list-utils-autoloads cl pcache-autoloads tree-mode-autoloads transpose-frame-autoloads tex-mode shell pcomplete smtpmail-multi-autoloads smart-mode-line-respectful-theme smart-mode-line rich-minority smart-mode-line-autoloads rich-minority-autoloads saveplace ripgrep-autoloads restclient-autoloads pdf-tools-autoloads tablist-autoloads paredit-autoloads ox-reveal-autoloads ox-hugo-autoloads org-gcal-autoloads persist-autoloads request-deferred-autoloads deferred-autoloads request-autoloads org-caldav-autoloads org-plus-contrib-autoloads magit-svn-autoloads json-mode-autoloads json-snatcher-autoloads json-reformat-autoloads ix grapnel ix-autoloads grapnel-autoloads ivy-posframe-autoloads posframe-autoloads ivy-hydra-autoloads ispell ielm pp ibuffer ibuffer-loaddefs hyperbole-autoloads kotl-autoloads hydra lv hydra-autoloads lv-autoloads hungry-delete-autoloads gnuplot-autoloads ggtags-autoloads geiser-autoloads flx-autoloads forge-autoloads markdown-mode-autoloads magit-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads async-autoloads ghub-autoloads treepy-autoloads let-alist-autoloads closql-autoloads emacsql-sqlite-autoloads emacsql-autoloads esup-autoloads elpher-autoloads emojify apropos tar-mode arc-mode archive-mode pcase json map ht emojify-autoloads ht-autoloads emms-autoloads elfeed-org-autoloads org-autoloads org-version elfeed-autoloads edit-server advice edit-server-autoloads dmenu-autoloads deft-autoloads dired-x use-package-ensure dired-subtree-autoloads dired-hacks-utils-autoloads diminish diminish-autoloads dictionary-autoloads link-autoloads connection-autoloads delight-autoloads deadgrep-autoloads spinner-autoloads dbus-inspector-autoloads dash-functional dash-functional-autoloads csv-autoloads counsel-projectile-autoloads projectile-autoloads pkg-info-autoloads epl-autoloads counsel-autoloads swiper-autoloads ivy-autoloads company-quickhelp-autoloads pos-tip-autoloads company-autoloads use-package-diminish autoinsert amx-autoloads alert log4e rx notifications dbus xml gntp alert-autoloads log4e-autoloads gntp-autoloads ag vc-svn compile comint ansi-color ring find-dired s dash dired dired-loaddefs ag-autoloads s-autoloads dash-autoloads adaptive-wrap adaptive-wrap-autoloads ace-window-autoloads avy-autoloads finder-inf edmacro kmacro browse-url cus-edit cus-start cus-load wid-edit use-package-bind-key bind-key easy-mmode cl-seq use-package-core use-package-autoloads bind-key-autoloads straight-autoloads info cl-extra help-mode easymenu seq byte-opt straight subr-x cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile cconv early-init tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 2346615 242711) (symbols 48 72629 6) (strings 32 326956 25390) (string-bytes 1 11416553) (vectors 16 122495) (vector-slots 8 2358061 258976) (floats 8 5596 2288) (intervals 56 234189 8288) (buffers 1000 244)) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 03:48:39 2020 Received: (at 43252) by debbugs.gnu.org; 7 Sep 2020 07:48:39 +0000 Received: from localhost ([127.0.0.1]:47806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFBtH-0003pX-En for submit@debbugs.gnu.org; Mon, 07 Sep 2020 03:48:39 -0400 Received: from mout.gmx.net ([212.227.15.19]:43875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFBtE-0003pJ-UY for 43252@debbugs.gnu.org; Mon, 07 Sep 2020 03:48:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599464909; bh=HtgWfcc/luNl1+FJfYsvpcdsdhnbJo+jiY3lHuXPpV0=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=lbptgYuutSHey02O2GD1wi+tanQIYH7ZfOSjZkKInSMFk0iRpuOW7wSBicxYc/R+/ 2xfTdGc/6CGAUw95DbPkuh4Slu/lE8II4wKEcxJMGovrAKF6k+JTWP/UDk3UZWeLvN seeQVGh45s/w0jcGbzQG/seuVFi1t1e87BTSfLOo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.91.238.230]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MOA3P-1jv4ZZ3me1-00OaOR; Mon, 07 Sep 2020 09:48:29 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> Date: Mon, 07 Sep 2020 09:48:27 +0200 In-Reply-To: <87v9gqquct.fsf@ccss.com> (Hugh Daschbach's message of "Sun, 06 Sep 2020 17:54:42 -0700") Message-ID: <87imcqdo38.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:zIs5pQ1hQsUwitc1NxUxmR+Dm/0vb/PDKGchF1rjKTB30yTb7tb TT8MbxpjHL/uwrTaC0sDavjngFRylmyoCpE5wZdYC/PpJ3/shPrj5AmF24t9qDUk5rKC3g2 ueMx5vE5rykHHfLSFjgCE+bh+eX0NOnzxRBtJP+pS0/gOjD3xqGpzMGhxPi3i4dFFvDTsCD EaUJ3TKw1zxnkrszQ3eSA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:kFVltS1Wbvs=:j1p+gtUMRVw10jHTwV0Qne NzuBd+jrFc24/e10r5X5ag7YrFqAUl98lQgqsCqdSHctvr2zqSdOEDOTbGOHhZr8ZdMyYj1gE 02l2F86h5J5OZnRsVwLsgwgxtewmI4IhtCzjbyW1WEMYfInsC3SfS+DQh1sZN4lpkIY6Hpal/ 8UHFpQalVX+PV1llH067r6VxQPm9EYDk3zZrTkIpJQurvgekuHCOv0ac5NSQG/3VJNvMFhji+ e8qNGpTkZO7a+p0CJBtsLSc7MvsFJBCV/aQ1PN8KFEVcNJqfnRngrk4yCPJs8/2ItxElJEWik Aq0hn2V0AOMBHHhyLAAlbwgbYovtbMSy5oIOfjLHx2CiWGs/95ZVGRBFxa2UtZ/snwAYrg6LH x13y14mqdMpBC/G9Fq46ZBYuqAV1W22PypczTFSnCmzsWFVBLRnzGXRLWOdsvbkG5twRjFxPq dQu/py5zJo2SWRBJmiEztstaQm2cWDbeb+mm/UpIcPQFZmv5jpIfSK64AVPScwGi87GIIEgmz aflaIK3RSkesdvzNIZwJUhVneXitzIvFgiXNEpgCI7sG7OVBAGC7A/+zHyLVE8a7d9YxH90qs E0n87VIPx2bTaklVsPJxz4mgE8+xHvDgWKn/6RfBwKTFRNceZUW9bRg+JxmS8xAEZFdw+yNga 2ezSkT58OnSV5aXj2ESowigNix/LYe5i9AxWHvDVjF3AV6FhSEAYGk4TjvnlUTyUSqRjIKRw9 LIqKlSqUI5rohRqqbEsidOSXD1msNtT7ftNl46Po8y+jIH6b7AT4D7eBYfbIoc/UvqtPAS8li TZetDQgG6rsH5xVyNiDsRpQFbvzyt4Twmd2jbqQbeh8pcpSSwygUeWe5CUwMZ6sTz9APKGwe1 Qce4WK681v3I3H5geiJa2t2V1wqSYU/BuG/p8r3J45K+mclj3DmCkKO8wwSRKp7JNpwAK5EwC 2NBVsO0mrpC4Akw+Tl1nUYZhqYyywP/wCCIjvocpp9nN10z4HLSnKReIihUa4yPMJ+jbkPdE4 /pRFvKGjmTP4NgW/UE040OGATwRrSSRvCmCdURbacMsj0Z8WTp8HxdTlIU7ywsY1rn3xj82Si tbXKnMATDb3LyTfU9S/drGV5toQRYvcUo+ckTjCCXSBM57bkABul1AGMq7oDz73qEm3vbfEU8 vxrGc6ZB7/4m5N7HE8jTlibdqCFGmK2QwRYMd6Fj6MLH/DOHve8ToVRCJx3RscRPJRDPv9Vsq W4m3UCbWaAZrjc6WcT66Sh1+qYxTp6o8E6Qt/7A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, > In order to implement a service exposing interface > "org.bluez.GattService1", I need to export the properties defined for > that interface. (See, > https://kernel.googlesource.com/pub/scm/bluetooth/bluez/+/refs/tags/5.55/doc/gatt-api.txt) > > There are two properties that require an object path: "Device", and > "Includes". Since there is no type information associated with the > registered property, introspection supplies its best guess. If the > value is a string it is described as a :string, not an :object-path > > There doesn't seem to be any mechanism to register the property and have > introspection describe it as as an :object-path. > > Am I missing something? Is this out of scope? Is there anyway to > specify simple types for parameter values? Confirmed. In `dbus-registered-objects-table', properties are stored w/o signature. An object path is stored as string, and dbus-get-property returns a string. Introspection data could be used if exists (like in your case). But they are optional, so one cannot trust on their existence. Maybe we could say that, in absence of introspection data, ofD.Properties.Get and ofD.Properties.GetAll shall return a default type, like string in case of object paths? Then it would be the responsibility of the user to provide proper introspection data if needed. > Thanks, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 13:35:41 2020 Received: (at 43252) by debbugs.gnu.org; 7 Sep 2020 17:35:41 +0000 Received: from localhost ([127.0.0.1]:50722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFL3N-0000dR-L3 for submit@debbugs.gnu.org; Mon, 07 Sep 2020 13:35:41 -0400 Received: from mail1.ccss.com ([159.203.255.73]:53540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFL3M-0000dD-7f for 43252@debbugs.gnu.org; Mon, 07 Sep 2020 13:35:40 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 7DF51BF879; Mon, 7 Sep 2020 10:35:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 20941BF486; Mon, 7 Sep 2020 10:35:34 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id E76411760655; Mon, 7 Sep 2020 10:35:33 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OQyofxijN4Vy; Mon, 7 Sep 2020 10:35:28 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 26BC31760578; Mon, 7 Sep 2020 10:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1599500128; bh=H4ysLufYcTCxtoIuMhSoF9tJgJIT8hPJnloiRNItSwQ=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=Z1C5gO+QVSRj8caUvhbYgUW+TuB46PJJ2LyxcDrUiB1MYj3eO4MJ/GgqgwtU7ZUH/ QNo2eExGY0Va2Nl4Ssd6rGW1T2tsBMhpXWnLAE5lz5+8TSv1AzownZRIvPmP0NFGdZ ohn+mim9u4qZ0FCaRga3yDcxK1H3bQo9DD2S3iyUEHojRrdRKX6eS0H6OahctqA/iR 5bTk9ETjRFnyS3aRY9cmOhSxWaN1bpgHWo/sI3MxVV3rQ1fTfu2TGpfBycjhoBxIcy RgZfb4x0uGcjfdMzw/yB0K0mV0OgOkpzPCDB+BTi0QgGL2lE4zr8H6BebLg7bTwpE7 QSXz41q0Ps8qw== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87imcqdo38.fsf@gmx.de> Date: Mon, 07 Sep 2020 10:35:27 -0700 Message-ID: <87sgbtqylc.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > >> There doesn't seem to be any mechanism to register the property >> and have >> introspection describe it as as an :object-path. >> > > Confirmed. In `dbus-registered-objects-table', properties are > stored w/o > signature. An object path is stored as string, and > dbus-get-property > returns a string. > > Introspection data could be used if exists (like in your > case). But they > are optional, so one cannot trust on their existence. Maybe we > could say > that, in absence of introspection data, ofD.Properties.Get and > ofD.Properties.GetAll shall return a default type, like string > in case > of object paths? Then it would be the responsibility of the user > to > provide proper introspection data if needed. > I had considered an optional or keyword argument to dbus-register-property, but I like introspection even more. Then the application simply registers ofD.Introspectable.Introspect for each of its objects? Introspect returns XML. The SEXP that dbus-introspect-xml returns is easier to work with. So do you memoize the returned value? There may not be enough overhead to be concerned. I'm just trying to imagine what overhead would be introduced. I'm looking at emulating a Bluetooth keyboard. So I'm anticipating bursty property updates on the order of tens per second. User initiated, rather than continuous background activity. But I don't want to bog the system down. An introspection per property update probably isn't much to worry about. Sounds good to me. Cheer, Hugh From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 14:00:54 2020 Received: (at 43252) by debbugs.gnu.org; 7 Sep 2020 18:00:54 +0000 Received: from localhost ([127.0.0.1]:50774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFLRm-0001GO-BW for submit@debbugs.gnu.org; Mon, 07 Sep 2020 14:00:54 -0400 Received: from mout.gmx.net ([212.227.17.20]:51949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFLRk-0001GB-6V for 43252@debbugs.gnu.org; Mon, 07 Sep 2020 14:00:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599501644; bh=TD3iihpeycuK1HPKKh/zLwOVK2/mBo9M+39yOBQYQQM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ZLv/voCvCtaHr/ScS+UKHeO4GCEHveEgfvFzTSAIboVurzycz6SAJ0FjPuupw+Mz5 1tUREXB8KzyMt8oj8XlkowCKqOhNdKpjhcDYt6kSkusFvQhMR6bZG2EwWTZi5dLA3P YQUK36DiRI2vfBhFvIEkCEyylN6OWvhHpCSl39hE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.91.238.230]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MMobU-1jwZZY17wa-00IpRT; Mon, 07 Sep 2020 20:00:44 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> Date: Mon, 07 Sep 2020 20:00:43 +0200 In-Reply-To: <87sgbtqylc.fsf@ccss.com> (Hugh Daschbach's message of "Mon, 07 Sep 2020 10:35:27 -0700") Message-ID: <87sgbtcvqs.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:RzmFmHmwPIrK+Fvg5t02SxM86bYQ//q/h/aZ11qzEHYLMg5VWro le//OeqVrEmndYDuNg/INkteaCcXyOBy06cOHyMnEi1QKqJG3OEGZgkHW/XN7nzakTJz7Xc iT54fwgoxR4WFhMexZ/lPRMiMfbOOTtpxMzwpFRnqGEQ7DXj40AzztWUfZRlimEv9JaXqmc OkNQ2vIxzLgFf9scWuioA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:CeTJMYDwzyw=:k9soPYnzNXZHD4aWZR9EKE mW40letxz+OL/qcZlCu9Zp0H7k+MkiU5OqczxZgRSDHQeFBZQCdDnGnDfHpdFwDY7blxNVwm+ m50GeFdKnNSFnUWOoJ+lnjHXItTx9sYoQRw85b5Ot6VLoxa0sVOmsTc3OSuTpCMj9ZMejUFv9 AN+vkTnkb4Dsi/6UVVkFSbjEsqyA1oWaFBXpWKG7jb8v9DVQNPFf9fsxCU8XhmApwm4Utc0q+ 0HpNfrapxn+6Ny24O+KlUYdISBcFDKAkc6nExuC6hTmOaYoVKXwYm9C0sKG/cDyth1GC/hSzV STo2FqetX+Yvk7yaS+cOcYDH8cRavlpAFJ0EnRikRBSHF3vG9Bv2G1qr9Q/zyVmIhoyXWRxF/ KgWX4PIMYQTrP5WiJS8l/adnnYUGcofTHAOPC9DxjqlBqTGVxCur9muIeYlbhUvB6FscgKclU xsOCQZMIbBvs6zpqtiQ2EeRZybia+BunxJQ8luHttPNODi98qLHzRYMxH7mIC23Xie6NOU1u1 4DswDOBlXlTa4Z4DbYEF555tIZ7ml2/SBKJQGMiVRkpiWzYc+beZ6LGucETdlqw7a/BAGUGJy HUzyiGlGhw+WYaB0fBtGmBMqkURqN+V3ka86Tst4W5B5skMbFMkX4NytOgYtsBiB/8UwiPz8e oifpF4tDIoChnvFqkNJzY5MPxEAD9pc/Fj7KOEnxggLTwzu+lx5i5GaPmPMABRW0g9t1HN1c7 PAkaS9ZWuCOlPAx/Ygw+CHM8nV1rJ6jCIumGvVDW/s8ar2BYrZBXYWezxi9+1fAIIDAtOjMDh jiNNt50zOjX1eNUJGmJJXLIPsKtp1A5DiCFkRXYk7/qTNZHRS0u4pSCP8lcwz4RLOwCuRlEDn dEK8fg4zil1P+X+ru2cN7UrlAIko5N54vh2b6l6uZ2jpdZ49mAny3YH5EskDtZalxYkZTeB+H Ws0cYuB1BLhTTp7vNRz+ixbszErF8npCA8i6U59a3Qy89UkGa6DmNsKSn/4EBabjmeRiwjk/8 0RdadskBWgdeK5jzLaJ8lbKuu9IxY2LMnJDrZVJyRs1Oi+pWNPkH/MfNJw1D/tD+yPj5ykmxX 6hUoX+MAVFNY90zk483hRQiAW/svRPVkxNCnWwUb5eOoMJXb4yijUh7o3RJhimfuQrw50MhcM /ZVVIyiFmRrDUUifpx5vGPLMM/rcJl29NgWSw7o3KDjIFmmpo2N7CMso3pfkN/66OO71dLD7F Ha+fEuhR7dwiOo6N/pMPN/+1Q075MZT7c2KzRzA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >>> There doesn't seem to be any mechanism to register the property and >>> have >>> introspection describe it as as an :object-path. >>> >> >> Confirmed. In `dbus-registered-objects-table', properties are stored >> w/o >> signature. An object path is stored as string, and dbus-get-property >> returns a string. >> >> Introspection data could be used if exists (like in your case). But >> they >> are optional, so one cannot trust on their existence. Maybe we could >> say >> that, in absence of introspection data, ofD.Properties.Get and >> ofD.Properties.GetAll shall return a default type, like string in >> case >> of object paths? Then it would be the responsibility of the user to >> provide proper introspection data if needed. >> > > I had considered an optional or keyword argument to > dbus-register-property, but I like introspection even more. Then the > application simply registers ofD.Introspectable.Introspect for each of > its objects? I'm just sitting at this. Yes, introspection data is the best way to go. I've already extended dbus-introspect-get-signature to support also properties (it does already work for methods and signals, modulo a bug I have fixed this way). Looks promising. > Introspect returns XML. The SEXP that dbus-introspect-xml returns is > easier to work with. Sure. But there are several helper functions, like the just mentioned dbus-introspect-get-signature. Have a look at dbus.el; not everything is documented. (And since I'm bad in documentation; comments for improvements are appreciated) > So do you memoize the returned value? There may not be enough > overhead to be concerned. I'm just trying to imagine what overhead > would be introduced. Not yet. But in case of performance problems, we could indeed do caching. > I'm looking at emulating a Bluetooth keyboard. So I'm anticipating > bursty property updates on the order of tens per second. User > initiated, rather than continuous background activity. But I don't > want to bog the system down. An introspection per property update > probably isn't much to worry about. My experience is that method calls are very responsive. But I haven't tested with bulk data yet, we'll see. Another problem: The changes I apply do not qualify as bug fixing any longer, so I fear they are not applicable to Emacs 27. I'm working on Emacs' master branch (what will be Emacs 28 later), the patches I have provided to you were backports. Do you have a chance to use Emacs' master branch? This will avoid discussions with the maintainers whether those changes are good for Emacs 27, and it will simplify my life considerably, because the sources for D-Bus in Emacs 27 and 28 differ. I have even applied changes to dbusbind.c, which means it would be harder for you to integrate my patches into Emacs 27. > Cheer, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 15:19:03 2020 Received: (at 43252) by debbugs.gnu.org; 7 Sep 2020 19:19:03 +0000 Received: from localhost ([127.0.0.1]:50895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFMfO-0005OK-Tq for submit@debbugs.gnu.org; Mon, 07 Sep 2020 15:19:03 -0400 Received: from mail1.ccss.com ([159.203.255.73]:53762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFMfM-0005Nr-PD for 43252@debbugs.gnu.org; Mon, 07 Sep 2020 15:19:01 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 0AB13BF8A7; Mon, 7 Sep 2020 12:18:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id BED64BF879; Mon, 7 Sep 2020 12:18:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 94E2B1760655; Mon, 7 Sep 2020 12:18:54 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UnKKpeNoW7yx; Mon, 7 Sep 2020 12:18:53 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 25780176064A; Mon, 7 Sep 2020 12:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1599506333; bh=gKWlBZmCLzrXwDzG9FjUNK9hMzQE5ZllDNar2zpwCW8=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=IOeQwnTA5FAstOS14MTCt2ad6v7XYbFWqKItG+XNXAuskJaCYyDFG0PnV/Y1BXnkE /+IU0FouDssK0kelXT6QXIKfAQLG1hGeg8i6CE30xmaBEe8/EdYm454K5u2byzK91+ nRKoqThTDXx+thfflY4vntVfE0VZ76yFmdNn5a0egpg8ikmXc3HD75b30C2Uk9L8Ip ha16uL06MDhn0l5hGNfeiefHy6WI4AQ/9mcXM7Xcx8xwnEAuZHXwOurs20VjkwKWrH WR/FfeWl2oTsjDatwktqpcFZbd9dAq1cgWxh0DhmgARmf1osj47BzMS1kUBcIben0P v2AF205geP8rA== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87sgbtcvqs.fsf@gmx.de> Date: Mon, 07 Sep 2020 12:18:52 -0700 Message-ID: <87pn6xqtsz.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > Another problem: The changes I apply do not qualify as bug > fixing any > longer, so I fear they are not applicable to Emacs 27. I'm > working on > Emacs' master branch (what will be Emacs 28 later), the patches > I have > provided to you were backports. Do you have a chance to use > Emacs' > master branch? This will avoid discussions with the maintainers > whether > those changes are good for Emacs 27, and it will simplify my > life > considerably, because the sources for D-Bus in Emacs 27 and 28 > differ. I > have even applied changes to dbusbind.c, which means it would be > harder > for you to integrate my patches into Emacs 27. This all sounds good. I'd be happy to move my testing to master. I'd already realized that part of what I depend on won't make it to 27. I'll build master this afternoon. Thanks. Hugh From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 08 10:36:58 2020 Received: (at 43252) by debbugs.gnu.org; 8 Sep 2020 14:36:58 +0000 Received: from localhost ([127.0.0.1]:55836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFejy-0002EF-G3 for submit@debbugs.gnu.org; Tue, 08 Sep 2020 10:36:58 -0400 Received: from mout.gmx.net ([212.227.15.19]:52035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFejw-0002E1-F1 for 43252@debbugs.gnu.org; Tue, 08 Sep 2020 10:36:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599575808; bh=rDGuX8DRCynfdJcsedHkfv8bbbdzFTcC0PQBpGgQ5CU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=OriKyfye83/gyODl8U/3Mafa99wc93SMf5Fi+0rSKIAcmvx7iiDR6tkttBh9EavvV BovXutSxduy0gwLa2DT6qZY2u9Ztig3xzgjj19TZk0HWIiOIAj7PQ/dHsFdeMPBDl7 Bh9jQ8uXabF/k+Skv9sjMBeoKTmQarLaDVxqHEQA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.41.194]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M42nS-1kFejo16rQ-0006Ty; Tue, 08 Sep 2020 16:36:48 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.fsf@ccss.com> Date: Tue, 08 Sep 2020 16:36:47 +0200 In-Reply-To: <87pn6xqtsz.fsf@ccss.com> (Hugh Daschbach's message of "Mon, 07 Sep 2020 12:18:52 -0700") Message-ID: <87363sl4hs.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:RKO6GMZ2eTx9X6nEJW3LrBZoYTfkdkhDNFa5odr1BPjUX/aN8Wv CGu8h5diIF/+TO6RIqdL62dPqhmYDRo4GDSaynx8PMH0kKtEvg4Y1n1q6mCtAtImrr1hvYr 7+Dmaz7UGmA/PEufpliTOOnPQpna9uDe3RYpg9sO9bKcY1BLCM9NyFmNMUqfggnX2L/hfsK fbRFa+ZdmLXYoCE7FKV0w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:maEvk26TJTE=:LHKMtXLrOAg7ROC3uL1EyM /Up1xXn01daDdEJEopXfmPIIlB+rlw8zCqQGjAeFGSD3ruZImw/HeN6z5pyGLvl2h3vs65Svb B3joMgasiTgrMAS/acp9x+tyTqSFrceXO7L9tVFbVAn4Zg0j3pYawwUJLRB8Wm0q3AB4tEoO+ yONCkEU+4dkqNa6pseu2TLDMX0gSCMv1AVy9KiK4d/MfrQ3QhGe+5wwoD/0a1xmY3xR+Jp/bZ 1leIMt7zLS7A1csDG2mCOX7ce7rVHWRwGrl6ACspBFjykmK+eNrPf2C1H8wZjxDAf5HNerY5i WZoDIRQPugx9f8YJFarvbDW0qlkHayRlSt1sA3mr6m2AEmrNLl4zBKzlShJ4PDXjvcIxMqM8k QMNBz1osoyMiDzK2mffiIn4Pm8SX21Q6JXW+nM6ux5SJ6gWwKL5J9a8/3l3PxgfEfm7518kJa XKf/n/fCSTLJ9XKvrhpL7/3c7qqroDj0dcLFR9yQrgwbGeEbmruaeX/ACCzJlScT56WIZFG33 1x84PJFPRIntJs3UG7vriX2OkQNEC5uhDl9XJ64JedhS5nuGLS6xlVfV79NHPR1v1+us+z3oD ppA+rRbPw0sE6LmuOyPSKD1rvyYLsaQnl2mSDCg98M9LW8e/p8hIOPfKncnyHxRkAky39hKtl k/J+SEzm1WjlNyyBC1B0pQCsk8jkqyPJhck8zgRlW2BoD8zaSJUoR4jsgF0GUF6X17YLbwVsS l8n0mt/4ZGo+I95DGW8LGCFuWr+saLD5NRCKNPhX88G5pQN4i3No6R0NGoBxOOLqPEW4slfBX mFnOEbt3M/6vhCYBcnFwnTo7T7PcVHJMtdZ1FRp2vq7K8N7QbjNE4DYlZFFGSclDLUVykKAvP IYnwZrIbqCevoBv/9KiWuG1qtgYoqSnwed5X13MjkpY7Raf70PMqAhpovYm3zQhizCeu8Tu8Y Dem/DVtKqFTUVYSNd9f7IUK/5e0Ub6w+obYWX5XxZkivODjnkpu9VHVJGS9DoMavU02EFKHuG OSTP1B8qMP3jLfmPvqrTa8+PWgqklnlQDkHiqu006yI1e8M4qH31SZTzczEm50O8drMRPqn9O l1Zc50kzTvI8GNnqIRsAx0mw4WH0ADYJcEKchxOb9bHIhBCDIISOsaaaaF1u0eGoA7xq+BQOx PBlhq5yIoK3BbAP42CtgjVv29h+i5tcISjNOF4f6fSm2VVv6ABPtOv8U/kvp9mq9olNo90gfj wNMXaqh5AwkvPmYI+ygzsjEUN16ENjiSd3piQFw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >> Another problem: The changes I apply do not qualify as bug fixing any >> longer, so I fear they are not applicable to Emacs 27. I'm working on >> Emacs' master branch (what will be Emacs 28 later), the patches I >> have provided to you were backports. Do you have a chance to use >> Emacs' master branch? This will avoid discussions with the >> maintainers whether those changes are good for Emacs 27, and it will >> simplify my life considerably, because the sources for D-Bus in Emacs >> 27 and 28 differ. I have even applied changes to dbusbind.c, which >> means it would be harder for you to integrate my patches into Emacs >> 27. > > This all sounds good. I'd be happy to move my testing to master. I'd > already realized that part of what I depend on won't make it to 27. I've pushed a fix to master, which shall solve the problem. Playing with introspection, I found the problem that it stalls if there are no introspection data. Not applicable. So I've turned to the alternative approach, allowing type symbols in `dbus-set-property' and `dbus-register-property'. You could call now (dbus-register-property :session "org.gnu.Emacs" "/node1" "org.bluez.GattService1" "Device" :readwrite :object-path "/path/node1") Similar in `dbus-set-property'. Documentation is adapted, dbus-tests.el extended accordingly. > I'll build master this afternoon. Good luck! If everything goes well, could you pls check whther this problem is solved? > Thanks. > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 00:10:23 2020 Received: (at 43252) by debbugs.gnu.org; 9 Sep 2020 04:10:23 +0000 Received: from localhost ([127.0.0.1]:56911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFrR8-0005Jz-Um for submit@debbugs.gnu.org; Wed, 09 Sep 2020 00:10:23 -0400 Received: from mail1.ccss.com ([159.203.255.73]:58394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFrR5-0005Jg-Mn for 43252@debbugs.gnu.org; Wed, 09 Sep 2020 00:10:22 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 066AFBF8AB; Tue, 8 Sep 2020 21:10:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 357D9BF877; Tue, 8 Sep 2020 21:10:13 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 095B41760611; Tue, 8 Sep 2020 21:10:13 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1lHFkargiT8f; Tue, 8 Sep 2020 21:10:07 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id DFB1D1760428; Tue, 8 Sep 2020 21:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1599624606; bh=JbImnuSjy1QR40n/VVpAbOV/dFUIZPH2qq6GFCREtZg=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=ClSAD+7S4OByv0FN0nOEjd/RmAWdBpkGg3yETurP1T41jxU83wakJLcN2IBERaTmv v0EJVgsgrVZPnq2n6iwaAHORB8Wh7AbofDj9/Bk8jTgiZQSbimpOPBi6YxLg9C/BiJ 38cKdwrIAX8oTPqUbtcOIw+iFe21wgpvu/wI0/epY53eyTTZvSB3I3mSONO7qD6DaZ hutfXRBNb+QbxX7cFPIbpFz3OFpKjbAavhfIczMtsmYmlqKmZCCPMpzQGWmolDYNYu a7FIPSTe+qAux5sbC69Xd5/xDCP219OGLdQ7xQB57bF2r/jHtHe5B9pJzhHNTC9LUF xAX9f00usjGPw== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.fsf@ccss.com> <87363sl4hs.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87363sl4hs.fsf@gmx.de> Date: Tue, 08 Sep 2020 21:10:06 -0700 Message-ID: <877dt3bnfl.fsf@ccss.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > I've pushed a fix to master, which shall solve the=20 > problem. Playing with > introspection, I found the problem that it stalls if there are=20 > no > introspection data. Not applicable. So I've turned to the=20 > alternative > approach, allowing type symbols in `dbus-set-property' and > `dbus-register-property'. You could call now > > (dbus-register-property :session "org.gnu.Emacs" "/node1" > "org.bluez.GattService1" "Device" :readwrite > :object-path "/path/node1") > > Similar in `dbus-set-property'. Documentation is adapted,=20 > dbus-tests.el > extended accordingly. Thanks, Michael. I think I still have issues. The attached script generates two boolean properties, then issues=20 a GetManagedObjects method call. The two properties are not=20 returned, though they are in the registered objects table. The script also drops an elisp =E2=80=98dbus-get-all-managed-objects=E2=80= =99=20 request in the *scratch* buffer. If I execute that, I get a similar failure=20 to #43251. That may not be surprising. I=E2=80=99m working an a more comprehensive test that registers the=20 variety of types I need to support. I=E2=80=99ll post that when I have something=20 worth looking at. I=E2=80=99d like to present that in a form compatible with dbus-test.el rather than throw more one off scripts at you. So=20 give me a bit. I think the mechanism you implemented works well for simple types.=20 Is there a mechanism to specify the signature for an empty compound=20 type? I need arrays and dictionaries of various types. For something like a byte array, I expect I=E2=80=99ll need to interleave=20 the :byte type between each value in the array. Correct? Thanks, Hugh --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=register-property-test.el Content-Description: GetManagedObjects test. ;;; register-property-test.el --- Test program for complex :dict-entry. -*- lexical-binding: t; -*- ;; Copyright (C) 2020 Hugh Daschbach ;; Author: Hugh Daschbach ;; Keywords: tools ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; This program demonstrates an error in handling D-Bus properties ;; interface. ;; ;;; Code: (require 'dbus) (dbus-register-service :system "org.gnu.Emacs") (defun main () (interactive) (setq dbus-debug t) (setq debug-on-error t) ;; Boolean (dbus-register-property :system "org.gnu.Emacs" "/org/gnu/Emacs/hci0/dev_45_6d_61_63_73_01/service0002/characteristic0003" "org.bluez.GattCharacteristic1" "Discoverable-untyped" :read nil t) (dbus-register-property :system "org.gnu.Emacs" "/org/gnu/Emacs/hci0/dev_45_6d_61_63_73_01/service0002/characteristic0003" "org.bluez.GattCharacteristic1" "Discoverable-typed" :read :boolean nil t) (sit-for 1) (start-process "gmo" "*GMO*" "dbus-send" "--system" "--print-reply" "--type=method_call" "--system" "--dest=org.gnu.Emacs" "/" "org.freedesktop.DBus.ObjectManager.GetManagedObjects") (switch-to-buffer "*scratch*") (insert "(pp (dbus-get-all-managed-objects :system \"org.gnu.Emacs\" \"/\"))\n") (sit-for 1) (split-window-right) (switch-to-buffer "*GMO*") (goto-char (point-min))) (provide 'register-property-test) ;;; register-property-test.el ends here --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 00:25:51 2020 Received: (at 43252) by debbugs.gnu.org; 9 Sep 2020 04:25:51 +0000 Received: from localhost ([127.0.0.1]:56916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFrg7-0005gF-BI for submit@debbugs.gnu.org; Wed, 09 Sep 2020 00:25:51 -0400 Received: from mail1.ccss.com ([159.203.255.73]:58486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFrg5-0005g1-Lh for 43252@debbugs.gnu.org; Wed, 09 Sep 2020 00:25:50 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 06E1BBF8A6; Tue, 8 Sep 2020 21:25:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 9C927BF877; Tue, 8 Sep 2020 21:25:43 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 76B261760611; Tue, 8 Sep 2020 21:25:43 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a1xfbzWjfryM; Tue, 8 Sep 2020 21:25:38 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id DD2241760476; Tue, 8 Sep 2020 21:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1599625537; bh=b0x4UKIEOj9zvMXFxz8DHKoEfIxQuXQVmVv3AFIh65c=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=Ea6UQdJ6WycG7OQnSi6qXtKqqD9RlkHEcXhEAOnkoCiu9EcY+3QeDTTbDVGZz1MXB OdiSOAoZAkQEtP1lK0y+m8iGSxaKBwX56/KfSxiuDZsh7qESdFpmwsrIitVzS/hxlG gFJfgtX4KLGu7CE2ib2LPUdBoa4Jcizhj9OWXdG4jEe5pM9hIHXWAi5/dEi1xcL6DI RKVKGqb5zOuzGJ/lfkjh3fkAImnC53wCQYxMnrF46z7LnTL7uz0TMfRjAypAoPmEwr VLbqfXAGkQX0jMmfUy/Bi76YPtl+DF1tf3pZI4fJ6muYP+408qDt3/tbGNkHmi9chp QrFTkzoLzaCnw== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.fsf@ccss.com> <87363sl4hs.fsf@gmx.de> <877dt3bnfl.fsf@ccss.com> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <877dt3bnfl.fsf@ccss.com> Date: Tue, 08 Sep 2020 21:25:37 -0700 Message-ID: <874ko7bmpq.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hugh Daschbach writes: > Michael Albinus writes: > > Thanks, Michael. I think I still have issues. > > The attached script generates two boolean properties, then=20 > issues=20 > a GetManagedObjects method call. The two properties are not=20 > returned, though they are in the registered objects table. My apologies. I left off the script invocation: ./src/emacs -q -Q --load ~/.config/emacs/register-property-test.el=20 --eval "(main)" > The script also drops an elisp =E2=80=98dbus-get-all-managed-objects=E2= =80=99=20 > request in > the *scratch* buffer. If I execute that, I get a similar=20 > failure=20 > to #43251. That may not be surprising. And please ignore the above paragraph. That was an operator=20 error. Thanks, Hugh From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 09:25:55 2020 Received: (at 43252) by debbugs.gnu.org; 9 Sep 2020 13:25:55 +0000 Received: from localhost ([127.0.0.1]:57905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG06l-0001Iy-A1 for submit@debbugs.gnu.org; Wed, 09 Sep 2020 09:25:55 -0400 Received: from mout.gmx.net ([212.227.15.18]:55503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG06j-0001Ij-2n for 43252@debbugs.gnu.org; Wed, 09 Sep 2020 09:25:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599657945; bh=kA7ay0NiYER+ku4POrSZozXX6ufLbTEM0AtSX34Ci3s=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=cyQ6y0SFE/WgZFoFz7PFYOnCHdKJ0Vm2yFOaZNcX4zEQXoMfXzNturrAswh5nyl3t DCrtYdMqtdk8dwBneX7+LguqBDn7IeaLahJaCeyzE71gONt/9bKyYM6UPhNdCidML6 NAcv9Z6TLkEzi5BrrQTlO2d0tCurEOregSeLK8QE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.125.194]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MaJ7v-1k47Se1qFB-00WF2D; Wed, 09 Sep 2020 15:25:45 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.fsf@ccss.com> <87363sl4hs.fsf@gmx.de> <877dt3bnfl.fsf@ccss.com> Date: Wed, 09 Sep 2020 15:25:44 +0200 In-Reply-To: <877dt3bnfl.fsf@ccss.com> (Hugh Daschbach's message of "Tue, 08 Sep 2020 21:10:06 -0700") Message-ID: <878sdj84kn.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:s4MKEVu1sXNvGm2PyAa1nWOMLQlq8fFJw9jkCKDiEgUf22q/Lh5 VDDtRQc77Ui9iE3rP9wtTVaxWwtNKxOwvDlIdu8xSl/GIpwtJFzZPxzxQrcQUevF4rqLrv3 0qC1irzv+6RjFvcDCq1Bht6fdUGGPdMEma92L9TAn+jTwswuSfm0d7ucprHBEnIvPfQ5xRj qRQDCVh/QmMpc1fHq7TZA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:HXS8amptZGE=:sNtQJjRcduK1HCpkfaQ01Y EpmRTkiyAUZeKyQfo8uCYH519OOk37kU3uBMrl64/59u9LmCGKgKMXUhKc5c8Q9qJllVuvs2H 3ANHwDDmIYSgIJIaMGtcm75PpzpZuqPo3+xQ8WYtMCKubnQRQaiqYIdL1hfaknCORqVBnWARB fzFE1RoXA0APs6012f2irjrf1HJRQbSGoO4exBblSqyqsdhDj5Qp6ZIAqytbl+BbMTOz+746A EmUgeFUQnSJwgviBStWBy1Vcxb7q3Fe7CB0qAHSods3Ix4C3XitZuEg2HAmS0AaaQ9DfhHOvK 1txJdMUsRurHKCewpgik9yDISADaWVide7cv3Mp60GpPJ49Iwa+WXPAjgrFOapbUc4FpstT5H /ltl+KXJWlmdtBelDZZWCCvA3CgbuC5fY+Ft5GkGeE1egGItIToaQ7fhFOb0EN43/JdAidv/m ddkDtT1vCnme2QMTfMmnvsVK/89BFnGGJnhLAa23n2P/GrXTTED4gLKuQde1NQxaJerd7og7d O3qmIjMmsB7yVikaUGgmVPT/PMeU4qyvRGz0QWcrJBAFug7g8L6G2GT3s46XhxXx/8O21u7be xzuKoifq+/+E9UDPX7ugnB/qfTjEQHOz50ErwO8onqfi5+bO7f1TA2Aqw4O28cinviAzbTUjC hU/ppaxFHKomci6usPYYlOtNCCUejQ6fZliYz6ntB2FneTG+MNtuPtxbyXU6eRdu5GsHa+0YD VDX/tkY9TD0rynbNkIJnAkCV3RJlUCB1CW4yoVJYXO/++qcz7XENI1OObthkhJvNOWJK31zN0 YYcHOPImE/3NPG0pXf8tTBoCKDoarWhm0zh+6ZK0+BThglS03em5JmvZK1aTLBzQ3AVZPNgqo JSL6N78cLQg+RDbsP1gvjaE3nEDESY6kGW2DJBnyvEgZnoiryU63mQzdmtXoTxDNZ42o0MYxJ SiJEl2ya2BMDkc4teYASCLnBfej7jlQ0HUQ43y4D27TLhA7pu3iwpHnPnxv/pjQ+JfB2HM6Sl bgA30yqjO1m5QCf0z3zhgMswvQglO0jEHkCq9hNoKiZYgwfXLKi1lzWGIo7puG2M0F9rZJIme SopVkn4fmqPgFMM62VAixvpWJ2NzRF+vp2nJvU8t/Xga950oMvB4YNWpTr2QGlfbjuCbaj6f6 aPhD0yf7moYo7e6JL6JuU2NH3S1OqXrJRJvWZMxXVRpbux9GzrdoKjGLIRb88cDIWYxOtIvOp kUFI3c6EkVJmPJvIs6L4sTf3+YNWKE7TocVblTw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, > The attached script generates two boolean properties, then issues a > GetManagedObjects method call. The two properties are not returned, > though they are in the registered objects table. Thanks for the heads up. There was still a small thinko in dbus-managed-objects-handler which I haven't noticed, because in my tests I have registered both methods and properties in parallel. I've pushed a fix to master, including extension of dbus-tests.el (which shall prevent this problem to reappear silently). > The script also drops an elisp =E2=80=98dbus-get-all-managed-objects=E2= =80=99 request > in > the *scratch* buffer. If I execute that, I get a similar failure to > #43251. That may not be surprising. Sure. I haven't worked on this yet. > I=E2=80=99m working an a more comprehensive test that registers the varie= ty of > types I need to support. I=E2=80=99ll post that when I have something wo= rth > looking at. I=E2=80=99d like to present that in a form compatible with > dbus-test.el rather than throw more one off scripts at you. So give > me > a bit. That would be great! I'll happily add your tests to dbus-tests.el. However, this would be a contribution to Emacs. For contributions exceeding ~15 lines, every contributor shall sign the legal papers from the FSF. Would you be willing to do? > I think the mechanism you implemented works well for simple types. Is > there a mechanism to specify the signature for an empty compound type? > I need arrays and dictionaries of various types. Until now, the implementation allows only basic D-Bus types for properties. Nobody has asked for more so far :-) I could extend this for complex types. Since this will require internal changes of data structures, it might take some days. An empty array could be specified by the element's signature, like (:array :signature "{sv}"). See the D-Bus manual via (info "(dbus) Type Conversion") > For something like a byte array, I expect I=E2=80=99ll need to interleave= the > :byte type between each value in the array. Correct? Yes. > Thanks, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 12:12:25 2020 Received: (at 43252) by debbugs.gnu.org; 9 Sep 2020 16:12:25 +0000 Received: from localhost ([127.0.0.1]:33058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG2ht-0006f0-Ef for submit@debbugs.gnu.org; Wed, 09 Sep 2020 12:12:25 -0400 Received: from mail1.ccss.com ([159.203.255.73]:33996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG2hr-0006eo-H2 for 43252@debbugs.gnu.org; Wed, 09 Sep 2020 12:12:23 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id B92E0BF77F; Wed, 9 Sep 2020 09:12:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 25244BF5B3; Wed, 9 Sep 2020 09:12:17 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id E855E17605AB; Wed, 9 Sep 2020 09:12:16 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xQfJSXJ9tAP4; Wed, 9 Sep 2020 09:12:11 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 32CA91760546; Wed, 9 Sep 2020 09:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1599667931; bh=oh31eU/Efe1SmcNoxy2vsJpzZKXWNadpYexCEufySgA=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=vXlD1scLuWEX+1bPIrPxMT43pS3aUFNgSsRMSn1Hil/OW3p1/GfiLXsD/+oxw+FSE ACHkppXPvhlkcclMIpEmGIz5F6vfRTdM7+irsnQgaVJeRJ/oEzPLdoZrEYcbs2CA0v SqC2W+Moz01jr45ovyP/vwjFsrgdrJdoF09vpa0YM1VSovSraQTAKKZunUyTEWuo4Q xqPegpuD/cwJckRyaGHpaLbbUApf+m/V8+sfLzipXeFl603aAgvO4T5AGW0JFCydSY GgVL1MyelEum4KAX1sq7NbZPOwjOje+UIy70e/gZAdzIt5Bi+Im3vCkW+MNtxMWI4I 237Y3kzKuFRGg== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.fsf@ccss.com> <87363sl4hs.fsf@gmx.de> <877dt3bnfl.fsf@ccss.com> <878sdj84kn.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <878sdj84kn.fsf@gmx.de> Date: Wed, 09 Sep 2020 09:12:10 -0700 Message-ID: <871rjbaq05.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > That would be great! I'll happily add your tests to > dbus-tests.el. However, this would be a contribution to > Emacs. For > contributions exceeding ~15 lines, every contributor shall sign > the > legal papers from the FSF. Would you be willing to do? Yes, I'd be willing to assign copyright to FSF. Where do I get a copy of the paperwork? I'll keep submissions to under 15 lines until I can get the paperwork cleared. > Until now, the implementation allows only basic D-Bus types for > properties. Nobody has asked for more so far :-) > > I could extend this for complex types. Since this will require > internal > changes of data structures, it might take some days. > > An empty array could be specified by the element's signature, > like > (:array :signature "{sv}"). See the D-Bus manual via > (info "(dbus) Type Conversion") I have used that signature for method returns. I suppose I could save the signature as a property value instead of nil if I have an empty value for a compound type. Let me look at that. Thanks again. Hugh From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 13:43:51 2020 Received: (at 43252) by debbugs.gnu.org; 9 Sep 2020 17:43:51 +0000 Received: from localhost ([127.0.0.1]:34236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG48N-00011c-H1 for submit@debbugs.gnu.org; Wed, 09 Sep 2020 13:43:51 -0400 Received: from mout.gmx.net ([212.227.15.18]:45753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG48L-00011D-PX for 43252@debbugs.gnu.org; Wed, 09 Sep 2020 13:43:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599673423; bh=aAVRYLnbEEz3VBuuTuhSpgaxRNhdYGI21nDrQ0KaAh4=; h=X-UI-Sender-Class:From:To:Subject:References:Date:In-Reply-To; b=huLd1ikCOSZyZFTkfHDwicBXf2nFYJZubzLvuvcY+JA/1wF0H4+IfYhX0Ut+hEASB +6qVxiizeNcbU+NHN3eymTAzGSMlcKtsEhoGJD3XeYK/Z1JkH+qAHSFWSydUBSqrkc YGCVCyqKdyw9VUNU0+rBXIeirm3aXG4woSimUnVY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.125.194]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mlf0K-1kymsv2h8M-00ihxO for <43252@debbugs.gnu.org>; Wed, 09 Sep 2020 19:43:43 +0200 From: Michael Albinus To: 43252@debbugs.gnu.org Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.fsf@ccss.com> <87363sl4hs.fsf@gmx.de> <877dt3bnfl.fsf@ccss.com> <878sdj84kn.fsf@gmx.de> <871rjbaq05.fsf@ccss.com> Date: Wed, 09 Sep 2020 19:43:42 +0200 In-Reply-To: <871rjbaq05.fsf@ccss.com> (Hugh Daschbach's message of "Wed, 09 Sep 2020 09:12:10 -0700") Message-ID: <87zh5y7smp.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:tER2ha9vecWwhl1HrG37ugvgwrUuaBJwkwtCAbRdt2A4V9oDdbi iWL0OY1HpTwQRGvpzth0fG47KGwXSgbP2dFn8YIllutIzvMnMgyR0T6Cb2pHd72cGPTObAL tet8LWmNINypqkewzEtbAGFFpFi2Sad/FTHJV/1CFH45kVOZvjMQCwRr7hwKPts/5BFcvyf 5Zx1EO93ipzyeQ/uiEcIA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FoJk0RocckM=:0lMFY3rFfOXQ9AylK9DF4C pvlJEhKY6o7E6+TmGoWY3UmxHIo9MYohy2NuzWnhR6B+QW3PmXtpg9yf8FiT4x91xZy8P6kM2 fyqczXubcjcJhiAGAVHr9CvtlwIkKF9qPYKPHEsPzDXhRQlVxAyRulwLxM5BY5LzEEf3PrRQb 8iJflytt0WC83xC3Z2G5rwoGgnnM9JyL3di4npOI2wx7kuvMIO/qCM313s+zqcTG3Xh4EVvAR VpqxPihdGYg15Ocf1453fUIN8a7ktNzNt8CRzrEwLSYC4A+xIKqNG3BepHs4FJUY6GvuPHqwX 6aqUCjxvVnUO8nQpHHQMwsp0ELUkD9Ys1z/IwmhUyQA3PrJE2AghtbvKFOJSG4ncuF7Kff3iU GCk1fJsAcFDZkSlpi5VOOXFVfLZ3769DcJ0g1s3zUEShgx6f3LmK3kIgnM354JSq7liNqfoQ1 BdiRugZuvPUCKsdxlCbO7vdh2ymSnRvs5k6EL47BbQcohG2JB+PW2wbjxcZaCjX7FiwTULAuP z5oUE51dfyJ+LqFhaqH8Z2iV50aEl6Uw34jntZWDgzQDzu/r1HJwHz7wP3t5JrwCPdHdT1WmE FRREaPKFp1UrkU2UaJevL36NP0t2RD2rS161Xers1Gy90FEHC8iphyNUCnpNdRg9ok6IMBuqY U53sZDib64qUU21yb51TlGOJXAFH+vuzhkW/YBTQb1BVZ8YgBlbN0nHZx03BK0XagzVtsO7XB 2MVUiv3kUVRTgme5wsXP/mSfcdXtlFm9RHOvNPcOc5vPvED1HwisSqv6CME8ri8pyEkU/m0mR qQZQn67FK1JIqJ05Hyv+OVy95Ghff5Unab4oXcJ6ssNCJ8DuqSmBiTsvkLmp57pDr9eCeAIWT b6GpKIu/RvcLJRqUtRegcVvVFvVYoM5xQNRy+A4uImkYv4NwdRjh+iXmPksbsuRr7mw1SXdxT wfEJqJB5OlieAPD90fZ57PXTU6A/G4xLV35BC2mU45n+uhxGNQZyn07OAvkij6Fczlh54YQIS m0kDaYTcAkaOyqOU22wlRfxnRe2NbOrh/4h+ESAOzScZjXzqEldW68BeHSICgsyHIiIzdR6sf UblRUM3DxXNY3SsoNHLunePJtJQ+I90VgnQq5Vooj1ywssvcbet9iVRMSCDoeDNNKHZfbYIQl D683uHtYvLRInceWk8/fJCQmRVbWJjdTwPujTous0u8TZJvKGe8XFpoQ6sTpAT+D6mqvmtsfN 6U9JxEinDrQzI6GnWZUQ2pd2eJbKMhBvaV0qikQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >> >> That would be great! I'll happily add your tests to >> dbus-tests.el. However, this would be a contribution to Emacs. For >> contributions exceeding ~15 lines, every contributor shall sign the >> legal papers from the FSF. Would you be willing to do? > > Yes, I'd be willing to assign copyright to FSF. Where do I get a copy > of the paperwork? I'll keep submissions to under 15 lines until I can > get the paperwork cleared. FTR, template sent offlist. > Thanks again. > > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 04:00:10 2020 Received: (at 43252) by debbugs.gnu.org; 10 Sep 2020 08:00:10 +0000 Received: from localhost ([127.0.0.1]:35897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGHV4-0004Db-7E for submit@debbugs.gnu.org; Thu, 10 Sep 2020 04:00:10 -0400 Received: from mout.gmx.net ([212.227.15.18]:43825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGHV2-000443-Cs for 43252@debbugs.gnu.org; Thu, 10 Sep 2020 04:00:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599724802; bh=tlbKWixSNKjkTkcMG0uerCa/rOFgqdB7rXBCB3Y7DdU=; h=X-UI-Sender-Class:From:To:Subject:Date; b=NAzGuGcXBvufgSi5vn/kwe4bYwEHYDwKex0dw/uJlqpW3rgCEN1UAViqZc0jlUFFX gf81jwIEMedrff0dW06//q4toGU27RY1a83BwTNIvsh4Rdxy6Q8YeRFyQ6zzzw4QjQ lDiLdCwMZWpVHgZyyL/rG4seVdpvAlJTCuGlhQDk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.53.238]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MBDnI-1kOYRT3aFK-00CjVC for <43252@debbugs.gnu.org>; Thu, 10 Sep 2020 10:00:01 +0200 From: Michael Albinus To: 43252@debbugs.gnu.org Subject: Fwd: bug#43252: 27.1; DBus properties lack type hints or overrides Date: Thu, 10 Sep 2020 10:00:00 +0200 Message-ID: <87eenacb9b.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: message/rfc822 Content-Disposition: inline X-Provags-ID: V03:K1:RG0zcK5HQ4HPiAvupYRudr89WaYHsDZDgLBE2Ab7WfY/h4Cvpqk SjzDY/jh74k8C4R7kb/7Uxg9MREqDaBKAHneuk/tdBiYDQhezoHzrCRUUu+E2vHz6sVL4/T A5e44OIRtruP/WgXUbKFdY+cTjRikFr63YjLXODmuz8J7DKgovjqg5G3/ZxGZNnEvzFxiET E5R0GFsMozgByYLrIT5fg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:7yrJ75W/R2s=:MNPHgojTb6BFVAS1qW6n2v tGC/MnjjZuMnKeApi85Vb4Ro9FFwHbHeCO0nqoYdCkpsultB9s65bo0ltjin0obeCmhfD8M3p ULmNqkkHtTSU7zyheERVkzMAEGnZW9K56/KpWU3ti6bRzMbDOp9RGJuQW20ieqV15R44sLR5Z n4umfzsVduJMvLfs/gUGNtcwM9Lj4CoK//KAC16IJbnfsW5wg8hCItoenGgClssMjcUVHypjb uxauUvCKBvvwIQtRwnguWFBtS4XB0cHF2L73t8jojSuyuVJi8p4fEdS9g4vc4rkY4pM+C9uAO DYpTss7WQ/2x2+dyk14nC5H0mqTFnkL+f7rCunGi4Wn6SyDJ5G5boDli+u3yaK3O68t0+AZ5Z ZbJCBlaLKrtcfpuEPGNhfn8/u6fJnoewKqtiRelJbKXRPE0Q85HJd2wOZ8fM3K+M8y6xewHPk fa06uAAZTdDUg0tZDApp41Y6dgCLpx7ZeBjxtcSulNytMPGQI31zW9cn0Ipz2K4Jvl388xLaF XkWvert57UgMPOH8Yvcg1Vb+KdBsSTwNb3aRQHZiAqF+PMM4lOpmvB0UTY5HtYhRd3CZkwXvE tKZArb+eyN4N82xS7EwqU1/HIJUlXYdhWumrxBsq6Ofn0KGFH7GplCZrhuZdnvk23KLCdOybi EFKD3LlziyovCms2eYm2HtZlPwALpJYepplrlToJMzpiZsrNri4q1wV7zZzaK/vm6mvBYECld J/TruMBH1rctlvVfZB45Tbgoo+/OAZvtFovZ3JU0BZEJ4/jYiaqSkqhb5OolTuJFaPJkGHDyU UwfDEijqAMeCMiqS4DrmxA8cvkY4njCbk/h2ORs4GBp5Am1Sk6Fl1PL214UN8lbc3Unx1Pg47 EFiV3OUOmC7clg0ksrLdnR4ONBQ+Z0gAW4WjCNR6LgsfOQoDYI4jXHoqNM7KmBT/cw8gq7Y8+ WS9H8BW/SN49z22gwjdJJkv6mNgNksYa+MqGyhw3fW4cv74/lK8MXlbNlC41ZF7ate7foHl2e HGDaXIVghc5Rc+yFf473EP5x0MQEPx4+ap9bX5JrnOAditffEGwfnK4qZTUSFBFICj6ppxjyr 0PNOf2ABVLnXpLEU2k7cNueqVPv5qf8HLvtHHMNsaeaNGMHszPXCWjXP0VgRwqLfa14SE+yQU DPLIi+UNmh5Nb2kA1GX1rCSmWlbFGLMh+rRnfj0kLUGpFs1pz2MBKgPtY6Z4ydNwekpW5zzjh Gmica5MoClKuuI6wzYPO/JKVD/o86ENUQXBKgBw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides Date: Wed, 09 Sep 2020 19:32:57 -0700 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="==-=-=" --==-=-= Content-Type: text/plain; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > Appended. And thanks for your offer! Thanks, Michael. I've sent the email requesting the paperwork. Will let you know when it's submitted. In the meantime, just to check that I'm on the right track, I've attached a failing test. Sadly, it's more than 15 lines. Feel free to test with it. For the moment, I'll only forward failing tests. Once the paperwork is finalized I'll send you whatever suite of tests I've managed to come up with by then. Just for the record, I'm testing master currently at d08568e6e92. Cheers, Hugh --==-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=dbus-tests.diff Content-Description: Failing test, registering a property with compound value. Content-Transfer-Encoding: quoted-printable diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 8b456c3551f..8b79f5ac201 100644 =2D-- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -520,6 +520,31 @@ dbus-test05-register-property-several-paths ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(ert-deftest dbus-test06-register-property-types () + "Check property type preservation for an own service." + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-servic= e)) + + (unwind-protect + (let ((byte-array "ByteArray")) + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface byte-array :read byte-array '(:array :byt= e 1 :byte 2 : byte 3)) + `((:property :session dbus--test-path ,byte-array) + (,dbus--test-service ,dbus--test-path)))) + (should + (string-equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface byte-array) + '(1 2 3)))) + + ;; Cleanup. + (dbus-unregister-service :session dbus--test-service))) + + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 10:59:43 2020 Received: (at 43252) by debbugs.gnu.org; 10 Sep 2020 14:59:43 +0000 Received: from localhost ([127.0.0.1]:40912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGO35-0005pN-C4 for submit@debbugs.gnu.org; Thu, 10 Sep 2020 10:59:43 -0400 Received: from mout.gmx.net ([212.227.15.18]:49911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGO32-0005p8-Pt for 43252@debbugs.gnu.org; Thu, 10 Sep 2020 10:59:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599749973; bh=35NmugW9SPM9L0G+qMauZsPejkegs+w8dxc8b/E9QzM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date; b=TBrkYMhyUSJnQgs44ThfBhiLhQbi30Liy1ywKcOzoAioktJoMRcZtbzqeUcNGzHxS Q4I1/pG2YSKsWbOnOqgpc3USMWBS4YNP7JBfr/RMO3zIUVNYpp9vJvdKJMefp0kAzE Q4zkeSfKOuhnoBd8mVbCS+5aIUhd18F769T1lGEE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.53.238]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mnpns-1krJIl0X0s-00pICB; Thu, 10 Sep 2020 16:59:33 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Thu, 10 Sep 2020 16:59:32 +0200 Message-ID: <871rj9k78r.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:SCLuDTTsIW8MfyhFZKa5u4CaZy8kYz+QJCtZrsilkPe2c2gT6sA G90FXKHdC1xQF0oNHk+v6Rr18YPQB+CaSr+hrlhH8xB5F/NZEGuXJnI1XaelTxSu/xpwEQl V161nsNdNellL3wBMXVWUPxdfOZ/0Csu5eoC8m5ojV34UDrlI75194MKb04U1qXRF6tpfoX fOpUSDSM/WMs6kgoVI7uA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:xkxD18iZJIE=:lUFJajdEAbN9LtF786SR6s 9TtaA5w6B8TGYSwjHxddtdRBzQc5IJFQNd1YhMEvBT6LdTlERF9O9sVxpBL3xfxrN3HbANJwe Ewy2H8GsAjgOheOomyrJLA+tL25JEgcDO7+DgQbmXb0nMu42T8/mrlEj3OLLK/8gAOiNlLFa2 uuHJHK1cxWVp8QHzUhVEOVg2Pi3WyiTHReBwkKWpwXMJs4u7R1lzaSeW6rvr9T4VwZ2FYzoA5 v8VP9bi3i6iT+xSie/fqfgRD2dGGJuzaDSIFZX4QcawJm+k7mpzWpPSsUXAdGSlZ0Qg6D/MKZ 9MXOTdxNcFmv7qmY3yesA7kEfbrxJ0DxNwkkGDHmsv6KMzC0zFsogkoaTAOtpg3XIpN6lSqvI yDOix1bY6ZiM8dsD0OtqCqmVbIK/hyg5Oq6jFPBxZoMz5Ih3OrPwITivxOq8ogbJyWbZjph1z PG9D6uqhIce0Gf46NQ0CW95PPSrM+wpgnXssD4+odvBeukBOqefgWMQtCpoVC1BiMnFY+5vrc Y7Xzsv1CtHjanLjYJsLXpN/fJOy8djL349M69u1lnqovdmNwfVv4eDtZkSGZXSP4W/aq/+iYV SHsIbiYD1PH2p+mHqaqtavhC3ainMBrJEE+5IW/kN4f9G7ganVBdbgNoCIvSFsc3jkLxBu8KM GumFYCREPLU1/U6rA5ulSss7q6MdfFLcs/6bMoivSgijhkuGWRUoL9ApD42lTE7251tQwXRwR rfuRe1sk9Q3psVgMcRJHmBuXnO2PCnRgWveyxNd7fYk94v1BUuahoa5Hc7hJ5S0qlMSgerowi mmkbLcY15YK1GQxkN/oWGFzvURE8dft99fUfLJyuy1Ga4yO9TRk2iKcjskECU1ZRR/D3bLOwC LEp0mXspvDpSOGL2qxEU9iLQ5zyGCHsOdHe1NlwJ7Zg7O6qL7l61l5DVhBzSQGue8+QOSYMRk V+k7K2BywQyrtDLdG7QJ8llaXx1Cm7hew+74DaEdLqNB7BGhF90l/c+uBIa4AGMnYXNTIHO4r oiCtx8ZsKLViuBnEguf3JmXw9pU2ugUV/HF323/v3OlEKUPG6cMbf2/oo6IroWYCS5k5KUX5l C9t3johNJXFM8m0Q3Vz/HAnBrgXbsnhMcOLzuG/IdNX5mJ45IWCmRW7jMB+zPhztFOHQo1oXf /fxkca7fPVz0/ei+bxG5wZooM9RouaRIzBbdPKxFkPsKvlhyKlYiDUg6tMSMx3Mco8jyvb1SO uUihRhQfdkwz6wsSbmQwUAsgNitOPYOQMzVZbWA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, > In the meantime, just to check that I'm on the right track, I've > attached a failing test. Sadly, it's more than 15 lines. Feel free > to test with it. Thanks. Reading the BlueZ D-Bus GATT API description, you seem to need only basic types and arrays of basic types as properties. So I will start adding arrays of basic types. Other, more complex compound types will follow later. > For the moment, I'll only forward failing tests. Once the paperwork > is finalized I'll send you whatever suite of tests I've managed to > come up with by then. Yep, much appreciated! > Just for the record, I'm testing master currently at d08568e6e92. master HEAD is always good, since I'm committing there. I haven't the impression that we break anybody else; otherwise we would need an own branch. I would notify if needs arise. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 12:57:42 2020 Received: (at 43252) by debbugs.gnu.org; 10 Sep 2020 16:57:42 +0000 Received: from localhost ([127.0.0.1]:41068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGPtG-0002Sh-A5 for submit@debbugs.gnu.org; Thu, 10 Sep 2020 12:57:42 -0400 Received: from mout.gmx.net ([212.227.15.18]:52763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGPtD-0002SV-VZ for 43252@debbugs.gnu.org; Thu, 10 Sep 2020 12:57:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599757052; bh=B4zNc+Nv8QWLvTcPa5Ny6oRuserJjNys4P99O4Zqe2w=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=H5u1WZTh04sN3IRl5cKMCvpl6qZGzAuZeRYFqIT4LBVBArERQmhVl4pbBSP8yWEoX D6I5xnltawAHCubrUUx3s2FcKq9ny6j6Res8wibWI5u9oyjVDstjaFqGMl/dC3vYwx wC0cC3pSXgGce9fMsxPY16synWxo5h+BIOtXt47M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.53.238]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MrQIv-1kuzoy3t83-00oSzk; Thu, 10 Sep 2020 18:57:32 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Thu, 10 Sep 2020 18:57:30 +0200 In-Reply-To: <871rj9k78r.fsf@gmx.de> (Michael Albinus's message of "Thu, 10 Sep 2020 16:59:32 +0200") Message-ID: <87imclwow5.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:LLtN2VaV+2ilNHW9jSYTZqkykN89QCbFfePMoBwBMJKbpUVb7gx yJ2UYKiIsAMCKrZ8tZ3bnWeSev2e1M421VGxswm4DCjaxtPEFhH7NJeoWHhCXrRNm16/x4T NTP9neG2rqXaBAivHNPclu06pWMdG/2dM3Os4DZqTxVbmGOoEbMC3Vr62eNQdgC5swaathm hyCEZW2rKNbJVJkKpv82Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:92uDbM86Yn8=:07tV9E9N47CxwD1pZh8eOF 83G4nsLHu5lbO35FsqMdA98dZcs57IQWn9JRx/xp/EyQ3NsR4nxyDnCEouZSjy8UTwRxySq0X TmQKVmQr/EMO2S8Vf+9ptUu9Zx01meYho+m90lJvzh/3v/qMDanjwTLpMLR4ocseUjPPHqYnm NpJ39qC8ZIRQw8ebIzsUpo0tQgMApPKD9QuYtCp5DCEe1ksFtrDkQ4SqGkldGkX90P0VTOUIX Mf3TeB0khXDIZsdl7Hd7oMopHtKdVX/ZQ8y/GgecSKpJ4TU1HznMxpFusnqg4yz6UABubACup N9EdZT/xcE4QCNlGWzoHnPnj4vg9sviAMX7co/l1oIJlxceyql6Ffam4Ro7zQdmjC/olTC3dE HPagPueXn2ysw9GQ0XvXUHh2EPEzzTv3GbvPaNX+UKsNAkz934i+svqIIKqseBmb7utNpl4pt KT/cH1N1hnnoGz7f4Q20jTOTYXSjx5ptn/sxesrLpW7f7aEecLNP0RWGjWRqYIDR/4LWE0x3p Kgi07+Sr683gYwsfHUnCMkuaP+JE9Snd1gOJTuvdt8WV4Hc67PpMGp5ehIM2HaKUgN3m0xoXh oQF/+iNdS1l/WgOJAKz+uOW7LHMpKGzguPk+iCW2Sxo8VTcJhjhLCmalxi9NKJnKjFGLeH6cW +kEQveAYbMwDCTiHAkokoEsxlB4AnuKhcMk1d8dcslv/dUsHcs4wgJTCxEkRXiFU4tPNRJ8Og hhz1+zzd1T1G/+evQCu9A1pMDUGVeWIzGx0TTm6F8gRFlEai3lTh3G0x+Uo/1C6a0/KPQ3RdW NXXiz3NQwEMIur7e21hzRQ7qqWLQEb7+9UiCCHe/fXCIfZ+CL3sEp/3kZH8IUjMYgv4djIF7/ n+4ngxH/AqLdJATqO9qctjc7neRyZ3+OkRJfuJ1k16i5F//ogZqMi2hXt9IduxeMZVjsBLELy MFq+Caq4h/lL3FrOR9yYcanhRynF0iINB4xJuSY1fA2UM8WRQQpp5bEQ3V+PEYR4Ev042vGZS dyespiYw8FLRVz1MNB4FkcK1MIvzmDfBHgPyvrpr2BWHcdUFrCm3KC/+ZwWbc5Zn9Mzj7qovU 2EKV7ddM/JwFbBK6sHLJY0tr2DwVgdGAKwAt+c4WNOx2dhYZ3xNfZRkY9lQh/T60eaf+KlsZB /adgsIcFB1FRpmHQJy/9d+HOg3Fe34ZIkZEWBeddp1O4bUFbpq8K5R2dEdbHAQoukj7gR3Dn2 GwtBgoylZJq11OcUf8WLqECA6/CblMOIB24sxLw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Michael Albinus writes: Hi Hugh, > Reading the BlueZ D-Bus GATT API description, you seem to need only > basic types and arrays of basic types as properties. So I will start > adding arrays of basic types. Other, more complex compound types will > follow later. I have pushed my recent work to master. dbus-register-property, dbus-get-property, dbus-get-all-properties and dbus-get-all-managed-objects shall work now for your byte array. dbus-set-property will follow tomorrow, as well as other compound types but array. >> For the moment, I'll only forward failing tests. Once the paperwork >> is finalized I'll send you whatever suite of tests I've managed to >> come up with by then. > > Yep, much appreciated! I had to modify your test a little bit, see appended. It passes now for me. I have renamed it also to dbus-test05-register-property-types, so we have all property tests under test05, which makes it more easy to select these tests in batch. Does it work for you? >> Cheers, >> Hugh Best regards, Michael. --=-=-= Content-Type: text/plain Content-Disposition: attachment (ert-deftest dbus-test05-register-property-types () "Check property type preservation for an own service." (skip-unless dbus--test-enabled-session-bus) (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) (unwind-protect (let ((byte-array "ByteArray")) (should (equal (dbus-register-property :session dbus--test-service dbus--test-path dbus--test-interface byte-array :read '(:array :byte 1 :byte 2 :byte 3)) `((:property :session ,dbus--test-interface ,byte-array) (,dbus--test-service ,dbus--test-path)))) (should (equal (dbus-get-property :session dbus--test-service dbus--test-path dbus--test-interface byte-array) '(1 2 3))) ;; A test for `dbus-get-property' shall be added. (let ((result (dbus-get-all-properties :session dbus--test-service dbus--test-path dbus--test-interface))) (should (equal (cdr (assoc byte-array result)) '(1 2 3)))) (let ((result (dbus-get-all-managed-objects :session dbus--test-service "/")) result1) (should (setq result1 (cadr (assoc dbus--test-path result)))) (should (setq result1 (cadr (assoc dbus--test-interface result1)))) (should (equal (cdr (assoc byte-array result1)) '(1 2 3))))) ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 15:09:15 2020 Received: (at 43252) by debbugs.gnu.org; 10 Sep 2020 19:09:16 +0000 Received: from localhost ([127.0.0.1]:41225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGRwZ-0005eO-Nq for submit@debbugs.gnu.org; Thu, 10 Sep 2020 15:09:15 -0400 Received: from mail1.ccss.com ([159.203.255.73]:42898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGRwW-0005e1-Uw for 43252@debbugs.gnu.org; Thu, 10 Sep 2020 15:09:14 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 04D78BF89B; Thu, 10 Sep 2020 12:09:07 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id AE4B9BF820; Thu, 10 Sep 2020 12:09:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 82B9217606B7; Thu, 10 Sep 2020 12:09:06 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yCR7SeK3I4ha; Thu, 10 Sep 2020 12:09:05 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id DDCB61760583; Thu, 10 Sep 2020 12:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1599764944; bh=d3Cem+5w9HMJy7rczp4R3V5XvS2H7ePnrtCEMNTRkXE=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=RKu3c38XrHfHXye9XDFux7uCyCqjb1mf97tQyoAXXoAIpFaKdfkbY3JVUmmMiUR+F uLL91umhlCSnXjKROVG54TakA1iZYa+HfKe4P6ci02PBmKkX1oz20tTTbVjCN6S+Hn ay2pscbObunXvgqPvpI0F1zZ4Q23HYDYUAz2oyhfLjyE7k17DuzKKf/9BUueLto8Fr BqXmpKyPQCa3sthXu9vxX7sT5kmxSDyT1tm1f7Tbe3o4rkGXKXgJjg1OEiR5zxQNJF h4umIxbapDqE0EoJ/RkAYeIpGw+ytPngJNg/fks7382tSGF0DCxh2VMMxHGxyh69bk Y7xOLn8uVbnPA== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87imclwow5.fsf@gmx.de> Date: Thu, 10 Sep 2020 12:09:04 -0700 Message-ID: <87sgbpa1pr.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Michael Albinus writes: > > I had to modify your test a little bit, see appended. It passes > now for > me. I have renamed it also to > dbus-test05-register-property-types, so we > have all property tests under test05, which makes it more easy > to select > these tests in batch. Good. I've not yet developed a good TDD perspective. So I'm likely to trip over naming and test structure conventions. I'll learn as we go. Thanks for the feedback. > Does it work for you? It does. I've added a string array test without issue. I'll add a few more and let you know if/when I come across another failure. Many thanks. Hugh From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 18:53:45 2020 Received: (at 43252) by debbugs.gnu.org; 10 Sep 2020 22:53:45 +0000 Received: from localhost ([127.0.0.1]:41659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGVRp-0004yo-5t for submit@debbugs.gnu.org; Thu, 10 Sep 2020 18:53:45 -0400 Received: from mail1.ccss.com ([159.203.255.73]:44108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGVRm-0004yb-Tl for 43252@debbugs.gnu.org; Thu, 10 Sep 2020 18:53:43 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 27879BF89B; Thu, 10 Sep 2020 15:53:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id A637CBF820; Thu, 10 Sep 2020 15:53:36 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 815E517606B7; Thu, 10 Sep 2020 15:53:36 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q-2m-a0v9f2z; Thu, 10 Sep 2020 15:53:30 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 1F2161760583; Thu, 10 Sep 2020 15:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1599778410; bh=/rBCWqLNqnBLZWAHzy2ZuUIQCXfqfmpQvzJ/1cyhpWg=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=RN3Kb9QWo0hv8YR5YNCyGOHXGFyJVoXCP0Cv/s/Nhpau1fCMJRLgXQE6XpGPEdYXr LVAGZBc3FrEeeCedCVdSniPUJOZRxrk+raUTepizhK3ZFG7PTM6+4K88IXD81oQ5T8 iJYbkhKIO/bp/v1Yl1oQpI+pk+Xh2HdR/pdc+Fr8H8ayoPxMiYZIYj35ouI/bVmVcO wq9jknTkk+dep/o9eWu5k4TTWv7Og13NKikY+gE79+re6EVKcO6GGl69P67l64k5iU noJFWQvlTMfgS6hKGWMFDvE+aGZJXZr3pSLLw8m/qiI5VvtoP1pUQoikks21ugnagQ lwk70p2E8R+5A== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87imclwow5.fsf@gmx.de> Date: Thu, 10 Sep 2020 15:53:29 -0700 Message-ID: <87pn6t9rbq.fsf@ccss.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; format=flowed Michael Albinus writes: > Michael Albinus writes: > > Hi Hugh, > >> Reading the BlueZ D-Bus GATT API description, you seem to need >> only >> basic types and arrays of basic types as properties. So I will >> start >> adding arrays of basic types. Other, more complex compound >> types will >> follow later. That's mostly true. There is another BlueZ interface (advertising) that take a byte keyed dictionary. It isn't obvious from the documentation https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/advertising-api.txt. But the Manufacturer ID described mentioned in the ManufacturerData dictionary description is a byte value. The property table in the BlueZ source code looks like: { "ManufacturerData", "a{qv}", get_manufacturer_data, NULL, manufacturer_data_exists }, (https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/client/advertising.c#n465) It isn't clear that there's a commitment to support such a data structure. The DBus info page says "Every dictionary entry has a string as a key". > I have pushed my recent work to master. dbus-register-property, > dbus-get-property, dbus-get-all-properties and > dbus-get-all-managed-objects shall work now for your byte > array. dbus-set-property will follow tomorrow, as well as other > compound > types but array. > With your latest work, I have successful tests for byte arrays, string arrays, object arrays, boolean arrays, and string keyed dictionaries. I haven't been able to verify property signatures programatically. I have turned on dbus-debug and verified signatures reported by the message formatter. I assume introspection is in the queue. With introspection, we could extend the tests. I assume I shouldn't care about tests that fail with debug turned on. WRT byte keyed dictionaries, I've attached a failing test. I don't know if you want to look at it or not. Still waiting for a response from assign@gnu.org. I assume a delay of a few days is to be expected. Thanks again, Hugh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=dbus-tests-dictionary.patch Content-Transfer-Encoding: 8bit Content-Description: Test DBus byte keyed dictionary property. diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index a8e052efbef..c0e85449a37 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -521,6 +521,56 @@ dbus-test05-register-property-several-paths ;; Cleanup. (dbus-unregister-service :session dbus--test-service)))  +(ert-deftest dbus-test05-register-property-types () + "Check property type preservation for an own service." + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + + (unwind-protect + (let ((object-array "ByteDictionary") + (expected '((8 + ("byte eight")) + (16 + ("byte sixteen")) + (48 + ((8 9 10)))))) + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface object-array :read + '(:array + :dict-entry (:byte 8 (:variant :string "byte-eight")) + :dict-entry (:byte 16 (:variant :object-path "/byte sixteen")) + :dict-entry (:byte 48 (:variant (:array :byte 8 :byte 9 :byte 10))))) + `((:property :session ,dbus--test-interface ,object-array) + (,dbus--test-service ,dbus--test-path)))) + (should + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface object-array) + expected)) + + + ;; A test for `dbus-get-property' shall be added. + + (let ((result + (dbus-get-all-properties + :session dbus--test-service dbus--test-path + dbus--test-interface))) + (should (equal (cdr (assoc object-array result)) expected))) + + (let ((result + (dbus-get-all-managed-objects :session dbus--test-service "/")) + result) + (should (setq result1 (cadr (assoc dbus--test-path result)))) + (should (setq result1 (cadr (assoc dbus--test-interface result1)))) + (should (equal (cdr (assoc object-array result1)) expected)))) + + ;; Cleanup. + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 04:46:23 2020 Received: (at 43252) by debbugs.gnu.org; 11 Sep 2020 08:46:23 +0000 Received: from localhost ([127.0.0.1]:42273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGehL-0002W8-77 for submit@debbugs.gnu.org; Fri, 11 Sep 2020 04:46:23 -0400 Received: from mout.gmx.net ([212.227.15.18]:42009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGehJ-0002Vv-5y for 43252@debbugs.gnu.org; Fri, 11 Sep 2020 04:46:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599813973; bh=pNvvj9WLbAhs4mYCZSetoonbxbioEWxTa2BYkecx5Vw=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=QuMh1GVy5Ta1pMuMAaR7J3hfsTwj2RRfUpBM8hle4QH8m4Kv0rb3hKhHfWqj5Fi68 xspYZ15nCmSvurfvECVtrYVvCZBcr8V5LXS6o/PICyCgS76sDExfQ3C8tvH3duTEMe VBATFVejFy54pxS0EKrSvMZJxkNf/CtODKxQNiSs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.53.238]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MS3mz-1k4rFe1DDP-00TWNP; Fri, 11 Sep 2020 10:46:13 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> <87sgbpa1pr.fsf@ccss.com> Date: Fri, 11 Sep 2020 10:46:11 +0200 In-Reply-To: <87sgbpa1pr.fsf@ccss.com> (Hugh Daschbach's message of "Thu, 10 Sep 2020 12:09:04 -0700") Message-ID: <87blicitv0.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:rLPiSMFudVTAH0zGntqj0/ZbQToMJ/K42W6xedJUFdwoZll5wSR zn+nKsaYpsEtQqnRq5sFMGZfSNPyixgEpPHq9ymEcurhqYqbNDBBl/rquQhi17zGyOFGGJ0 suVNV2OrgGr3k8B9LRQvprEqflZSe3FRkyqMLuLWFJOsQ/4GfYEbxTKvt55PXl2xe8ukZa3 a/DIeFEqQs+fNOrfvoLTg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:hmIHwWpJ2VE=:0cdQhgjPudy7KeMnk5TaAz bEI6FnTR0ZwLnADJS/eOwt4AhFo30MVgH+gVoMiNjm12Fz1Td7tOzpjFvsiRvtJroHeipaCYg T7syMVp6T53gxNm0bVO9LPsz2ocJJsa1gQ50E69CPfx8z1lETj7gOnaAPXEMrtxIMspuBcdzw t7D36bYSKZkDmxoEhujad3jf6XFgZnP6vzKLkQGqMmX+N6QeQlvigGSOn5FP/TLSkCGNie11W Wr8wsURhsQcOfjWe7RQDm4EGweHhljM9nmAz8Of6SxoKnsLWtXxgOFU3y6d5xBehbiGRqFkjR wpwpxZnf/MLRg3UkKJpDa5AkmVqWlmKiKr0LECPKBYz3mi5j2V793EqGA/BDkrI41qqDT62Jo ZXLcFEps3ntM7p5BPCNy43D/FtCf+FKhSgp8aS6QH0aRtZAuAcw9E5nz3Idm8asKuzbxlwvs8 LGs5YQcpm7lZnjeYkImPp/crOVwfqmaLbOcqA1PD8YzeinqNgzR0I6o/milw1zBFz/9y4/39N H1nPKQlQS5/QuXETo6qBCxDnHMxu30hbBG4F4HYdT774I+C4RCtsuKSgXQDi0eocf3SAnAtCP xNinOaBHofM4JAOYwKgOCsBnozWwYb3LwuVpEetfRd3Z3QUPhaBj8K1/yM3TxrWVkk3X7G96x hTBzoa5OSVI4kfNmoOgueUJpYgLkKKmTE+aS0wtBoksdXJQzKJOL/90HKD4gowKnALIGzxazs gwWbeOeXK/25rWMZaJAJKKu5sK0S0MiCrMMNgms1pb1d9FK5vxPQqY4UcDSKfaH6IeR1E+MfB 0wHHNSIrPVsZyHh0fClRFQoGikaAlD9Bzjl+JyvOgraudtio5cWayClW6EyPn0le5T7PLcJf7 8wZzm3t1Tv4X1lMrrozivXhyf1eIDKRW4FtxSxep7jwZCu1EF39JLxtRsytRlSD7Nxj+amvpD 1J+gCtIhIJjBE54BHGCi3wn5xjhCefEAaqmFuOSU+IQFKJC/E+3HKH0s17KC0Ub2I95FklO+/ 6FA4XI/v5I3F3jhJKuayjALroTEUIPjrRC9Cnrdw+NAAQ4Zv3Tu7cScL/xoih9sOb0ZvmAAyJ je8NaLnAXymHEr0fHrVO4/WPTR2GOcLyQGj59gKCTJNjk4LtlyDtWOtlzay3HzmBVbl66H9k4 6od9EycDLpQNwE9ORF9H5/Ued/paGfDJ1/d03xtDBZMiMbXmHzm3GOYS2JjxnWyl59VsFRRkV 0+egOoyVr5NSfbkIPQtbDpYbRM74OQ6Br7WFfaQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >> I had to modify your test a little bit, see appended. It passes now >> for me. I have renamed it also to >> dbus-test05-register-property-types, so we have all property tests >> under test05, which makes it more easy to select these tests in >> batch. > > Good. I've not yet developed a good TDD perspective. So I'm likely > to trip over naming and test structure conventions. I'll learn as we > go. Thanks for the feedback. These conventions are rather mine, since I've written dbus-tests.el :-) General conventions are not so many, see test/README. > Many thanks. > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 05:57:57 2020 Received: (at 43252) by debbugs.gnu.org; 11 Sep 2020 09:57:57 +0000 Received: from localhost ([127.0.0.1]:42431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGfoa-0004HS-Tq for submit@debbugs.gnu.org; Fri, 11 Sep 2020 05:57:57 -0400 Received: from mout.gmx.net ([212.227.15.18]:55343) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGfoZ-0004HH-E8 for 43252@debbugs.gnu.org; Fri, 11 Sep 2020 05:57:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599818267; bh=L5csTEwctoqJpZooDpjhr1wUMw/bgxJ2ivQv3ThIPnA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Z3+MePmLNjg/OX+qbatnk/+3R8V4CUPAiaaUx7ywim59oUyqGBWxpWsltU+biX7m0 yk/3AAWc0iUGFUQa5GwPon5ckqk6RRPm53kY+7PeCP8h+J0ssXOwebQdEQvhGIXT9C YAyfTERzdYHZw5E7c+5P0NUaNVH8IyJd8J0bdoSA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.53.238]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N2V0H-1kfFHY1Sxz-013rv3; Fri, 11 Sep 2020 11:57:47 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Fri, 11 Sep 2020 11:57:46 +0200 In-Reply-To: <87pn6t9rbq.fsf@ccss.com> (Hugh Daschbach's message of "Thu, 10 Sep 2020 15:53:29 -0700") Message-ID: <87363oiqjp.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:AFEg1DfZm6qAqHmEF+u/z9aQ1MW079oT9nt+Y4oHi1IdzsCTUQW jwpIqi/7XQnQZmn/I0vSCQaiCsOYJKzh5xddDbzmG66TBGur+wl0Brg+QaXQzxZ2obMPq8s YRurA0weJvZWFYiuBP+E2nFhwzP48JoAMnz4ra0eZ7NfYH3K0eQEXg+8Iqemg6wmWruVbJZ Pg6zYC3rzfqm2QwWWtWCw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:y8SucdyHuDk=:MMz81H38eXgMVNKRbGdGc7 xocQSD8onT31FSizjaUWdCyb4BI1TP4NwL7eRVPV2T8AgTSpOeKrnaDnn0B9qZU8oNpbO+vSr pYRTxEMKo/L7hpTQEro1EdkTYDylqcqhJPWpSZx7s/f7R2EeUKGwffsHd3rH1jqNjmHAgDbDN oSKa4cWRC/9XHWwCG/1CJkOm4iRbv+rWG9x9IvMSJ3gxyck8R9EZvA11AGeblTnnNPvadC98F sgv8Cq3+O4RGZEgOIQ/pwUDo/lXTSDJ80bn4eAr47I+8rvXrqj6KFIiPZ7HZYjq9PP6F/Dwx1 /kOU8AjIS7AqJr80aYcnXImFz0y6SBmYEJg25VwP5gAzt98MlYlen6xUVvRlsETMrvo7lNKbD A1lnGL6riUQPjHXudFxozZt7/05S6GAP92dyPH1XNb2KDlavFAfvIx1UbP1LuXT8jeNQJNFRu 7AaRbQPXN+hBfuoYG0QUyGaFRSbMgicFv6ZubBslibAc/IN59C5EvIcKU5To7MmTffB6PBIaO iuF46jdy1hlnjx65g4fSdn7X4iLgMvfpUqaG3DLfbHcxHpRS+12DfPIv9aodfz/Lt0nAC01Uj M8etQsh4anr2Iq95Kg/1jPoDprdOeBRAzKvlwWIHxHr9jW+r99ttPJ0Yg5Bfz7bL3wG3/s/gg NSw4c5/NYU2kgcENUtRvNPu8TDoeT1ggTVFkStQS26v0dEcTEc3OKAkYQt2dUgSnMrpNZtBzf sEhvySTzZ8D94tkpCoOy15/dsWVJca8w3YsdxKVoYNKcCfqIH8pbnMqs17GhmlV8Lv3+Su6YY lbL1wddLsOkIeyVe4hYoEDSvDoTW5UqhpOEdgaO3PuQ5BQpQahraKA6kB2gUPn1M5hlLe99rW ibji3PuHtopX1GjY4hKUFSrpH/PtuPdsy816/ujZds7LKIWQqT0WbndkOM6RXMtIXYIB5Hzie qesKIgNHYE6U/HMX1owikt+X/svJk2hpnTQp/Ne78yvBtaUMQjXHmkOjYZ/XVraJUJ828oaZn Sud4sCWn6RsyWyhshCzIyu4KB4Gje8W6l0LkBbisj3JW8EfuiP+sBOo16YUOhHvbwWaEKBRvb RYnmuPc3QXAPwn7dvxKgpNAwUBMIqWH/zTFYKxrTKio4/yZE080gnpEqvmDG4D/fNiAClB/o+ Nj7sbAu+0VLn/qfCPkT8zpVam1lj0fpV2j0g7zF69wKUl1Bh12WQ6hcNQN81Uvc31Fyc8Kk5h uZ6K5DS+RzmVjPdemlfM339G0JubhmZHWV1Mn9A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Hugh Daschbach writes: Hi Hugh, > WRT byte keyed dictionaries, I've attached a failing test. I don't > know if you want to look at it or not. The failing test includes some failures itself. I've fixed them (see appended), now it passes w/o any change in dbus.el. > Still waiting for a response from assign@gnu.org. I assume a delay of > a few days is to be expected. Yes, it takes time. When I ran through the process decades ago, everything was done by snail mail to and from Europe, because you have to sign legal papers physically. Now it seems to be possible to sign electronically, but I don't know how it goes these days. > Thanks again, > Hugh Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment (ert-deftest dbus-test05-register-property-types () "Check property type preservation for an own service." (skip-unless dbus--test-enabled-session-bus) (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) (unwind-protect (let ((object-array "ByteDictionary") (expected '((8 ("byte-eight")) (16 ("/byte/sixteen")) (48 ((8 9 10)))))) (should (equal (dbus-register-property :session dbus--test-service dbus--test-path dbus--test-interface object-array :read '(:array (:dict-entry :byte 8 (:variant :string "byte-eight")) (:dict-entry :byte 16 (:variant :object-path "/byte/sixteen")) (:dict-entry :byte 48 (:variant (:array :byte 8 :byte 9 :byte 10))))) `((:property :session ,dbus--test-interface ,object-array) (,dbus--test-service ,dbus--test-path)))) (should (equal (dbus-get-property :session dbus--test-service dbus--test-path dbus--test-interface object-array) expected)) ;; A test for `dbus-get-property' shall be added. (let ((result (dbus-get-all-properties :session dbus--test-service dbus--test-path dbus--test-interface))) (should (equal (cdr (assoc object-array result)) expected))) (let ((result (dbus-get-all-managed-objects :session dbus--test-service "/")) result1) (should (setq result1 (cadr (assoc dbus--test-path result)))) (should (setq result1 (cadr (assoc dbus--test-interface result1)))) (should (equal (cdr (assoc object-array result1)) expected)))) ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 10:19:31 2020 Received: (at 43252) by debbugs.gnu.org; 11 Sep 2020 14:19:31 +0000 Received: from localhost ([127.0.0.1]:44911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGjti-0003Rw-S0 for submit@debbugs.gnu.org; Fri, 11 Sep 2020 10:19:31 -0400 Received: from mout.gmx.net ([212.227.17.20]:35367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGjtf-0003Ri-RC for 43252@debbugs.gnu.org; Fri, 11 Sep 2020 10:19:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599833960; bh=Gga/ybLI3nASBaYXCsGAEccLu76PZaEJRSyJ7GAVFz8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=I89IpQfIO65QQdLJebtFNv3J/fszAKn89EQ92nziHtxuoW7HqRNa/JfF5efSWByTQ L142TPpiY9hVporq/ApQaU/50gMq3ktmVM2TB/lyLodKiGVquO7o6uVo+3E7t+oy7r xpVspIuKTBizVBsMqWKGG7FRNtKFgBHa4ztl/vus= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.53.238]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MiJZO-1klxeD47lu-00fRCH; Fri, 11 Sep 2020 16:19:20 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Fri, 11 Sep 2020 16:19:18 +0200 In-Reply-To: <87pn6t9rbq.fsf@ccss.com> (Hugh Daschbach's message of "Thu, 10 Sep 2020 15:53:29 -0700") Message-ID: <87y2lggzvd.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:Mm6ro7IAYbyaJlrnNRxzFekCbORNMbMzt+916n2XinSlAmLzaCV xd+DLMP71G1lLOn58hIQguCEdzAd5bS8dloLRbL2Jwkj8vyUFQXS46if2Y9XsZKdaKsD51U R5sHGVzi7fxFD6kbSpX2Uhtd8pkLdU2xqpm7w8hckRIWnA0NEpIotU+HqMtRq6+n2JjXr6Z Rs6DP6m6+aGys8cIE42LA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:HPYWO/sDxJg=:4IriCcximsUE1hnSOajHH8 qttO2amPahvtLtTZdKJeTFuEJ8BhOQXaUkL8z4O85tSp0WdBEZIMcLJJUJJPUJsPEIeqhXkJl cl4sm4f1QaRnGLAnBgoOUmKLJhoBB30U2TtY5Y/NpqrBI5qln+KYISr1vtoKWVk4RPz9wsSoG eROThbdlu7WrgNZIF5XgmY+P/TN3G1kFA2dwaZtEgupVk9T+K20ASwhb8DdgPVPLTF6lyDsXz tZTMiKDvpcSfKix+LRFqYandR/n+JuCBx5ITfehhDKQQcNG92oixe/9PnHwT2rgYeZP2y9KcB Ks2gLg4r2kKLqgjmzcF7SHIpIYNJSExXfJeLuWsS9HFELTW33JORTwgUuX7tIVhVJpOrlZCO0 N00Bz6tuvbjwHK/vlndGkDWRaHKjr/pa1PQrcX4cDxHELOdDxI1TvP1ScNFlR5IfimjUv7hox lnnmNpYIf7roavla+20otA9VeFFEwOeJ6gXWswFD4hGXwMMUvdTgk/s8GtpQzIO/YXPLcbDC/ cQbSNvQ/shJ5AL8s75g0tbLhD16HVh7Hwqaazf2nB/0+2nL/cq7fVg7cuoYj+mjZZRCYNg6DA Hob/akEwa23DeRlmT06k2/uElq8xqee7awHjezB2v3NZrYFByTRaarktyUwrr1tanF4zNSN82 baDD4r2Zkf0sxfgy0EkpzvGokgGPibGbMEW4WIs40henl7U4BMaPLi3pa3xfJrr/TIsZpAznB 3JLmbBigxDo22dN1U1YkKzDFoS6kJ5cBQBDRLqxsYoZAKgZp9ocWnLmUiPnOfp+H1Vm17HgBH +P0E4/vgBhm33Cm7Q9LRCE3Kye48CTDV6E/La+d1H8FAcp/YHp1ml1gcf6jDC5Gx16qbbWcXC 9f9wRnNg8GUvfYsxlta6TURtBrlhL7HVSmhJB/c5iHC4OKhU+F0sO0SCe1RzYOvHGXj1IWtHx Ea9IYz6gtVnZvxWJq9yAWlEZomvyRd4GEr1j7e1GJc8ITpzGUELFiGrxRiCZ++PtWeVZXWYBn yncky2ytxDZrsI+fQJ6CLo+3FXH0fhv+hludp0bNIW3C8qcYKC6khpHyaOgFkDsyxFr6yUI+G RKoLv0T8sgZCikTtUtSzZTw+CgnLDZw1q9cH0w+AKy59Ut6EIVD6GpDzfBv3I4NZbAQP9bik0 7qqRVWt3wsLh1ebU9nA/g3rZQPrpudhBZE5eVJm2sL/QtcbPznW5pU4QLnNYu7IjCqL1knRo8 ssQueyNBGVJjoPrJoUA0MlHyg4nJEBkdWdzOzlg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >>> Reading the BlueZ D-Bus GATT API description, you seem to need only >>> basic types and arrays of basic types as properties. So I will start >>> adding arrays of basic types. Other, more complex compound types >>> will follow later. > > That's mostly true. There is another BlueZ interface (advertising) > that take a byte keyed dictionary. It isn't obvious from the > documentation > https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/advertising-api.txt. > But the Manufacturer ID described mentioned in the ManufacturerData > dictionary description is a byte value. > > The property table in the BlueZ source code looks like: > > { "ManufacturerData", "a{qv}", get_manufacturer_data, NULL, > manufacturer_data_exists > }, > > (https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/client/advertising.c#n465) > > It isn't clear that there's a commitment to support such a data > structure. The DBus info page says "Every dictionary entry has a > string as a key". Looks like this has been extended to "Every dictionary entry has a basic type as a key". Anyway, my today's commits shall support now all compound types for properties. > I haven't been able to verify property signatures programatically. I > have turned on dbus-debug and verified signatures reported by the > message formatter. I assume introspection is in the queue. With > introspection, we could extend the tests. I'm no more convinced that introspection is the way to go. What if there aren't introspection data? Maybe one could run two processes in parallel to the tests: --8<---------------cut here---------------start------------->8--- dbus-monitor --session "sender=org.gnu.Emacs.TestDBus" dbus-monitor --session "destination=org.gnu.Emacs.TestDBus" --8<---------------cut here---------------end--------------->8--- It shall be possible to analyze their structured output. > I assume I shouldn't care about tests that fail with debug turned on. Yes. However, dbus-debug on let's *all* dbus-error errors through, both internal errors, and the ones arriving from incoming D-Bus error messages. Sometimes, one wants to see the latter only. So I have added a defcustom dbus-show-dbus-errors which allows to pass only the incoming error messages. See the changed dbus-test05-register-property for examples. > Thanks again, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 15 00:06:12 2020 Received: (at 43252) by debbugs.gnu.org; 15 Sep 2020 04:06:12 +0000 Received: from localhost ([127.0.0.1]:56839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kI2EO-0003b5-37 for submit@debbugs.gnu.org; Tue, 15 Sep 2020 00:06:12 -0400 Received: from mail1.ccss.com ([159.203.255.73]:48258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kI2EJ-0003ao-OX for 43252@debbugs.gnu.org; Tue, 15 Sep 2020 00:06:10 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 15824BF8D1; Mon, 14 Sep 2020 21:06:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id A840CBF8CE; Mon, 14 Sep 2020 21:06:01 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 750EF1760648; Mon, 14 Sep 2020 21:06:01 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fd-8oZOPlIy3; Mon, 14 Sep 2020 21:05:55 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 4E5DE1760574; Mon, 14 Sep 2020 21:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600142755; bh=/9W2LvkcMaXizG2TcHOrIIIDDyjWA2ExMGhOKmhflNA=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=vkadrGW3SMPH9HirM/697hnS+DoKMeyHEhvTH08de0snpC2nbmPookOBr9ocVF3Gp N68VQoVldE1irkgwTSmKC2H1I9N9fSBgu/tnTZRuswGkQWt9fxVsmF7jhGStJPs1p1 8c3SgvIXccjmONuccbJpOleq3tVAp5uktbAU6go2e8bvsFQHDq1ZlNh4sl+RssIzG0 9P2YQFG0j69Phh0Be2rNa3Gh6smQToq1soERmbiH7xLQkmBO9P7wxl4vc6NC4SFj9S EiAnw80yuGAPbz5gZxtnHQvbcne7+b0yICX81zYFmyIhTsCTipY2oDZ+hgm1WaZs/L gKrctzlONMp7A== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87y2lggzvd.fsf@gmx.de> Date: Mon, 14 Sep 2020 21:05:55 -0700 Message-ID: <87h7rzadlo.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: >> It isn't clear that there's a commitment to support such a data >> structure. The DBus info page says "Every dictionary entry has >> a >> string as a key". > > Looks like this has been extended to "Every dictionary entry has > a > basic type as a key". > > Anyway, my today's commits shall support now all compound types > for properties. Excellent. Will try to submit tests for them. > Maybe one could run two processes in parallel to the tests: > > --8<---------------cut > here---------------start------------->8--- > dbus-monitor --session "sender=org.gnu.Emacs.TestDBus" > > dbus-monitor --session "destination=org.gnu.Emacs.TestDBus" > --8<---------------cut > here---------------end--------------->8--- > > It shall be possible to analyze their structured output. That idea has taken root. It'll take me a few days to put together reviewable code. But I've got a good start. Paperwork arrived today. Signed and submitted. I expect it'll take a bit longer before it's administratively complete. More when I have some signature analysis code for your review. It's complicated enough to deserve its own tests. Cheers, Hugh From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 16 08:47:25 2020 Received: (at 43252) by debbugs.gnu.org; 16 Sep 2020 12:47:25 +0000 Received: from localhost ([127.0.0.1]:33550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIWqK-0005mB-V1 for submit@debbugs.gnu.org; Wed, 16 Sep 2020 08:47:25 -0400 Received: from mout.gmx.net ([212.227.17.20]:53897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIWqI-0005ly-QQ for 43252@debbugs.gnu.org; Wed, 16 Sep 2020 08:47:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600260434; bh=u7RwaaMciv97Fk7adWHeR09zpey1ny4xH6SuByAyLd8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=R/r+Uw4iZlm2yV5xd9utMwEVV7UGKx0TNEfpDkMOgo9aIrG+srqjWh6HdwjOwlsqx BHoketnbt/2vd4haoSPtO3Yj0NfqNWWPlDSRAXcC80bG/N0tLp3EgLadw1rU4qMvZk +dl5phRKfgJ1VVEpdF6VOCnPdS3o3cC6iv5VyQ3w= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.151.195]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXGr8-1jzOjU2Cp4-00YeH1; Wed, 16 Sep 2020 14:47:14 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Wed, 16 Sep 2020 14:47:13 +0200 In-Reply-To: <87h7rzadlo.fsf@ccss.com> (Hugh Daschbach's message of "Mon, 14 Sep 2020 21:05:55 -0700") Message-ID: <87k0wtrir2.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:ePkPvfHvlbYCH26LNibtt4GLJ5kTHJE80DhFEQhwUGBsrOJeszx Ngd3wkb7kdvhB4xTKZrO6gMTgvBNQOqK7pwMlbd0As40GvuM6FnbFMLya9ap/s9jWM/1cb7 uqM6n5rCn/QG3VPPXsBlePxxZ5e8MF6zubIbT96wCBO55nDgR9MlLySKpS+PTkgNzquqC/H 9Il0y+TGmXz87SI63QANA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:oLGuvm7Ds9E=:dMwT5xOznfGreVE3AiKKu6 j45fjSrVgzbIOf5t4m8IJq3qmQTMjt2Ail+JlEX0EFo7Xmy5Nl/lcLZyxZUIbbIFhsOqLr3yH GDf3WhPWlF8I14kC0JKUotsKqYZ+ohhk38OKAyKb7DadOfsKY8VbrySVZy7I+cGwzP2MiZCDF DYwxoSJzWFaBzTATAm1FrQyZS9O/X5HBw+y/u+2vLCFog9iK0tFruI7w5sgXop6XCP5q+aX1B 1DI24FsKyd1/3OxkvzEHXnFLnKGIrW0SF3TVzP2SeteIzXVr1rdK8GIUvWaITKTCivcJZl2U7 7RWclCH0FmJ5NosWwvcvRwR8c5Gyz0eiuHcqVhJljrvL/T2eOMDV6Uzpf1DBe491xBW6kumIs OmPRm2QnTK3DLIHzAyl6MmrskN7GoOR1fDpYhlJhlv0D9MtzcsUSa7PkUM9s1NnOVmMFnDKiN AlJJl433WWgcKwfDSCvuqBXQkrlsuk7bYEYotzyTUdl5gJsAJiFEG0An7cojxuMG3+h8eOYWD W3EXTt1Dlhvl6CDKX3PjfePcyVMMtgwD1XO3F0S02q0HxAhpCZ5pqm+DSUgEpxBiBYRvQj5SX 9knipuWmIg8egipa3VZD05ylLl9FuGtfroJGfQCU8zU7lTGi0NkjW5tnEk1KWczxaT5ksCqQF sM3vkO0bniOFs7IPSd4Pku50sqgeD5RbsS8jgDuKKfzsmEx72YwoeaFWTWWkTzMU9lE7crXBb Xs5PLa9l468fKM4bEstIih45feHcPl0kuhwJ83o0RGXB6/EaafCQWzFixDoVxCStly7CKZfq1 xh2unuPj2MpaPJ6pi1KP8OdjMbZn3d/AeJI8NjN09zfr6TBSiv9Z/WsACbgBZj2UkPuR0hrX0 8u3MNmq3qZEsX0euFHQ9ABdPljhoi8htJVG/q83qeESu707Xm+OxU8ZLF1387+U3+6OxCfyyv GKkbl9nF6gfDxSTLGVDQXqnhP0ynzkLm9xR8DyyaJ+0cajaHf/z4SMcOMKNxcMyALTeviMY34 XCGlH+JU57pwobHkR1SNDD20d8vWtBExR/+uY+kbKfldS0kT8rCfFKS8hFKju5XmMKTQ9iQlE 0xvfh0A4WYQMFocd64OxiKDkuFmb6Cq8n+tH5cjnl6jPYNzF2553/RlpsIWcLiIIbM/hcFkva aAaR3vTqBfFsQ3ujwIn9n25EyASlGw99oYA7b1bCQJAPo6ebjJ9imCtokN4vsuY+A9Xc5oTXh 5t5jREV1NaXTYQL1/GbwQFZWfOgQpDySwEZ6O/A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >> Anyway, my today's commits shall support now all compound types for >> properties. > > Excellent. Will try to submit tests for them. I've just finished my work on dbus-set-property. It shall also keep the type information of the registered property. Because of this, I've changed the internal structure of dbus-event; for all arguments the corresponding type information is propagated now. You might test this. Given you confirm this functionality, I believe we can close this bug report now. >> Maybe one could run two processes in parallel to the tests: >> >> --8<---------------cut here---------------start------------->8--- >> dbus-monitor --session "sender=org.gnu.Emacs.TestDBus" >> >> dbus-monitor --session "destination=org.gnu.Emacs.TestDBus" >> --8<---------------cut here---------------end--------------->8--- >> >> It shall be possible to analyze their structured output. > > That idea has taken root. It'll take me a few days to put together > reviewable code. But I've got a good start. Now that we have type information in dbus-event, I'll start next days to implement org.freedesktop.DBus.Monitoring.BecomeMonitor . If this succeeds, we could implement a counterpart to the dbus-monitor program in Elisp. And you would be able to access this information programmatically, including all message and signal call / return arguments and their types. Let's see. > Paperwork arrived today. Signed and submitted. I expect it'll take a > bit longer before it's administratively complete. Good. I'll check the copyright.list file next days regularly, in order to see whether your name appears. That is the indication that the legal process has finished. > More when I have some signature analysis code for your review. It's > complicated enough to deserve its own tests. Yep. But you could also wait for some few days, whether the BecomeMonitor work leads to usable results. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 16 18:23:26 2020 Received: (at 43252) by debbugs.gnu.org; 16 Sep 2020 22:23:27 +0000 Received: from localhost ([127.0.0.1]:36748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIfpm-0005fd-Kc for submit@debbugs.gnu.org; Wed, 16 Sep 2020 18:23:26 -0400 Received: from mail1.ccss.com ([159.203.255.73]:51186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIfpk-0005fQ-FD for 43252@debbugs.gnu.org; Wed, 16 Sep 2020 18:23:25 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id E2266BF8B9; Wed, 16 Sep 2020 15:23:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 8850ABF854; Wed, 16 Sep 2020 15:23:18 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 6486117606D5; Wed, 16 Sep 2020 15:23:18 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YQIDwYYQOwEk; Wed, 16 Sep 2020 15:23:16 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 9CAF7176056C; Wed, 16 Sep 2020 15:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600294996; bh=KxOAiLb4i4I0Pn0+cBDTl6Bbt+0jvzncfWRZ+z1U0f0=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=KwxJ6mhtzOMTD4vatpkCc61ZLxA+ftj3Lt9lo1fMWHPofzomieXVlK+Rt8iKT38Z7 xoZgAd0jYzlRzfT99uI93mOc4Nqxb1SF38YM7RU/YMMDURraZ/ZUvrSR46Z/cMGPj6 EWM4D3F9EAxeCi9gJjnK6/I1JL31zRn96U1cI+D2P2v0jSHrTBBnDAJmw08AzRj9b5 gYN5h/tamPSsfRb+n5PsAhwdXsXY9OVV4xOx8ssF3fEf6d9LjsYRlljurr8IGptuxS 0sKzP7ftkoIZr4Yl1MuqZiPpDXcxq9PskeVBjKFigyjPv87ZHLtDfuy4TREIrxKC0j uZFeQq8xa8l0A== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87k0wtrir2.fsf@gmx.de> Date: Wed, 16 Sep 2020 15:23:16 -0700 Message-ID: <87een19x9n.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > I've just finished my work on dbus-set-property. It shall also > keep the > type information of the registered property. Because of this, > I've > changed the internal structure of dbus-event; for all arguments > the > corresponding type information is propagated now. > > You might test this. Given you confirm this functionality, I > believe we > can close this bug report now. Good. I'll test and report back. >> >> That idea has taken root. It'll take me a few days to put >> together >> reviewable code. But I've got a good start. > > Now that we have type information in dbus-event, I'll start next > days to > implement org.freedesktop.DBus.Monitoring.BecomeMonitor > . If > this succeeds, we could implement a counterpart to the > dbus-monitor > program in Elisp. And you would be able to access this > information > programmatically, including all message and signal call / return > arguments and their types. Let's see. Excellent. I can now parse the output of dbus-monitor. But capturing asynchronous output and feeding it through an ah-hoc parser seems fragile. Capturing type data directly as a monitor is much more robust. There's quite a bit of boiler plate in the property tests. Do you have an issue with rolling that up in a macro? Does it make test failure analysis more difficult? Here's a candidate: (defmacro dbus-test05-test-property (name value expected) `(let ((byte-array ,name)) (should (equal (dbus-register-property :session dbus--test-service dbus--test-path dbus--test-interface ,name :read ,value) `((:property :session ,,dbus--test-interface ,,name) (,dbus--test-service ,,dbus--test-path)))) (should (equal (dbus-get-property :session dbus--test-service dbus--test-path dbus--test-interface ,name) ,expected)) ;; a test for `dbus-get-property' shall be added. (let ((result (dbus-get-all-properties :session dbus--test-service dbus--test-path dbus--test-interface))) (should (equal (cdr (assoc ,name result)) ,expected))) (let ((result (dbus-get-all-managed-objects :session dbus--test-service "/")) result1) (should (setq result1 (cadr (assoc dbus--test-path result)))) (should (setq result1 (cadr (assoc dbus--test-interface result1)))) (should (equal (cdr (assoc ,name result1)) ,expected))))) With the calling sequence something like: (dbus-test05-test-property "bytearray" '(:array :byte 1 :byte 2 :byte 3) '(1 2 3)) Opinion? Thanks, Hugh From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 17 08:58:24 2020 Received: (at 43252) by debbugs.gnu.org; 17 Sep 2020 12:58:24 +0000 Received: from localhost ([127.0.0.1]:37519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kItUV-0004DT-HO for submit@debbugs.gnu.org; Thu, 17 Sep 2020 08:58:24 -0400 Received: from mout.gmx.net ([212.227.17.21]:59545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kItUR-0004DA-TU for 43252@debbugs.gnu.org; Thu, 17 Sep 2020 08:58:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600347491; bh=2O1nnkhQloZr40PJZq+gG3ncv1rN3BTxmdEeK7JkraU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=g2Gxll9aFdLQNBo5VUoceeLbXbSh2ilkaG+mNJeYwXQBHaaWIF9wZXnl593tBkNgH G9rkA+kTrw1ak+xf4RkIKsHw5XLnAdKpxh+5jbjd13LO39QCiznwpuVTLANGaYSiv3 S1iKlQXtJspMgP31g5kkMwzvX9/OdbwS56kN2v8E= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.37.67]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MEFzx-1kAwrM234n-00AGn7; Thu, 17 Sep 2020 14:58:09 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Thu, 17 Sep 2020 14:58:08 +0200 In-Reply-To: <87een19x9n.fsf@ccss.com> (Hugh Daschbach's message of "Wed, 16 Sep 2020 15:23:16 -0700") Message-ID: <87a6xor25b.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:6hdWg8UqVcbgA/5Lf1j/X74rsJSf/AzBo4EnfMSMrKqKvmsTIeX jDxzXDaIW89Vwkv5j4Q+blqriKQETauC0xpekh+5QEB43RAtzSbZwDmGbUpDgW+wZkVaIV3 q49DX7da5Xwno5HX1/r9uZCN9cv9uC/yi5PdCaob+wIaBirF12kmkdgD33moxWBHxbR/I/Q 6sQmOKyE74sg+s2+L2luw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:aL/o+HhJ5I4=:4eBa8oENNec27ihMrVa9DK ii2U4U0Ux2eow43ndCaFP6HTw7M/hwsqv4JgaT+QHEMfWTm2mNBEK1APWOL1OC9GT3FKxU/Bm 96O4TMZNHBvb5P5jtaSt7SndeiNUvVRggohYrQFEl32mTH2hpr+ssOEaq7CTOk+TyVsv6Bmx8 5DV8oVsUk9mm5nCBYZDWwVz775Bn8DcnhaXy7BMvOnrMXdVaLDBTcGZFp78YWQWv95j3Q9QGw dvc68wxEy87d6lHq0c9lZFGB9to+SDytKKgs9vSphPo4d9PAqQwcvd7Ordv0rdQd777a/MOf8 3pVwqftj5YTifRP4pw8ShoHmuz3KTM9SlQpgzo3a6PDzRzBuWUd8PdR4MVpv3abZC/VT13iCf sYY8aRlLn1/PKzbHmV6nw2mnnDLJM4nm1slCWamsscpikqa7ndX5e/JLT9ACh9cKu10UOj5Yz X11P1gISRwC6ut9/U10rBvQNBTJt4DrXABnV98kjUtZD2YZCFuoP2LFM8sbKcrSMlojPu+4qD BriOLR/9jqqpBaMIo5zTsF0pkOsqZjrE0o9OkNAbMum1T6Kbl3IMkEcZpclSbc7OoPPYr3pV9 Ip+T0JGVmMHv7+8JJKvZ0lHcIcTg26dmve7s0mpu02Eixp1kPfzUdhsgyUo00zFqxHZzrweME qBcyq/NqvekZKsjaX0hik/bqsjpEcL9kx5ID92fvjFgnz6yUNKOPhVDv+OGTUuO+mP99z3BdR Of0H7eiv3xgLoCQ6rOfBEOjclbeR91lGHjuR7g329lFk8i9fbZ4wD4jBXxJlaHpOomtoBRfsI A13OLUlbZhlCqoe0zFjTp+XzCy3QTTt7V7PiaStX/sUl1/dTGnIiVLVyLvUuPf/fIhwcDPwV0 yUjVLeacw5qgGDoE3N9Gf0LWyC9h9nsKeGXH9PDTaEWS1d7iCSrq80Wp0z+5jc8D/csBgR704 MQDsq8XIJfl2128ub0s9AbGYzI0oGjb3wES/aii4px5M74PlJQgOVveq4t7krJOfFg/f082ZV GcDQHZcPZmWeph3j1dPp1nFk1C/a/7ASMUkrVmmA8dvxrlX+EvHYdrrj29OjdI448SbzpwWrQ EGugtSFpcSM9KZYMyMut40KnvF98GKJnsNfPpx39JhlDfZ1ZHUyykFUPYmFQzAhvt6d8v8VeL +4EYNLqU+jvH77yIVscUArEs3QNgzcUJQaS6dPD24btqymtX64iKQZ33Ck2aNQRW5GEthImfJ t3abhaGjVE9+SNcZCQiHKowZuV2nTm8OkINXSJQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >> Now that we have type information in dbus-event, I'll start next >> days to >> implement org.freedesktop.DBus.Monitoring.BecomeMonitor >> . If >> this succeeds, we could implement a counterpart to the dbus-monitor >> program in Elisp. And you would be able to access this information >> programmatically, including all message and signal call / return >> arguments and their types. Let's see. > > Excellent. I can now parse the output of dbus-monitor. But capturing > asynchronous output and feeding it through an ah-hoc parser seems > fragile. Capturing type data directly as a monitor is much more > robust. Implementation is more complex than expected. Due to its nature, org.freedesktop.DBus.Monitoring.BecomeMonitor requires another (parallel) connection to the bus. This is not foreseen yet in dbusbind.c; will see how it could fly. What I could provide just now is an implementation which runs in *another* Emacs instance. This could be used for monitoring only, because it is another connection to the bus per definition. Are you interested to get such a partial implementation? > There's quite a bit of boiler plate in the property tests. Do you > have > an issue with rolling that up in a macro? Does it make test failure > analysis more difficult? No objection. But comments :-) > Here's a candidate: > > (defmacro dbus-test05-test-property (name value expected) > `(let ((byte-array ,name)) I wouldn't call the variable "byte-array"; it could be anything during test. Call it "property" or alike. > (should > (equal > (dbus-register-property > :session dbus--test-service dbus--test-path > dbus--test-interface ,name :read I would use access type :readwrite. We want also to test dbus-set-property. > ,value) > `((:property :session ,,dbus--test-interface ,,name) > (,dbus--test-service ,,dbus--test-path)))) What are the double commas good for? Typos? > (should > (equal > (dbus-get-property > :session dbus--test-service dbus--test-path > dbus--test-interface ,name) > ,expected)) > > ;; a test for `dbus-get-property' shall be added. That's my typo - dbus-set-property is meant. And yes, it shall also be here. So you might need macro arguments value1 expected1 value2 expected2. > (let ((result > (dbus-get-all-properties > :session dbus--test-service dbus--test-path > dbus--test-interface))) > (should (equal (cdr (assoc ,name result)) ,expected))) > > (let ((result > (dbus-get-all-managed-objects :session > dbus--test-service "/")) > result1) > (should (setq result1 (cadr (assoc dbus--test-path result)))) > (should (setq result1 (cadr (assoc dbus--test-interface > result1)))) > (should (equal (cdr (assoc ,name result1)) ,expected))))) > > With the calling sequence something like: > > (dbus-test05-test-property > "bytearray" > '(:array :byte 1 :byte 2 :byte 3) > '(1 2 3)) > > Opinion? See above. > Thanks, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 17 14:42:25 2020 Received: (at 43252) by debbugs.gnu.org; 17 Sep 2020 18:42:25 +0000 Received: from localhost ([127.0.0.1]:39024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyrR-0007In-EJ for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:42:25 -0400 Received: from mail1.ccss.com ([159.203.255.73]:52524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyrP-0007IZ-2I for 43252@debbugs.gnu.org; Thu, 17 Sep 2020 14:42:23 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 4E300BF8CE; Thu, 17 Sep 2020 11:42:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id A4FCEBF8C0; Thu, 17 Sep 2020 11:42:16 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 77AB217606CD; Thu, 17 Sep 2020 11:42:16 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OKoumSrEl-nv; Thu, 17 Sep 2020 11:42:10 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id DF36217605C0; Thu, 17 Sep 2020 11:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600368129; bh=ZVopn/SAaO27AQN9xl65DALZYpc2c6VGWeEfBiw7fB4=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=TV2WyDkU42ip/6hE7c267ZuR1B2dZMMlQvsrIUcZwsUKCtTUoehuiafPfRcjBRXpz WiOojb/RcHB8u1sgUUyO9mY/MKnOTMIzL2gwz4spWFCrHFmHGPZpKO3yYVBq0uKfZ4 3dFKoNUkjad9e4Fkw98uPd3tvleqfL+lkh4wochGcGH+GJXlTyY7X2fmzzB/MdGCZ/ X4VAE3lvcroOudFuP03edMnENsyfMZsnaD31GwpxHHw2blaTl3g+w3H/HsMYqC60N1 hLE7j1Z20GjNtqQCJTEki+lCiG1WtE6UJdPxYas8L15YBaUSZoJfPBQdVnRv/z7MvX eFv8DC2E6Meag== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87a6xor25b.fsf@gmx.de> Date: Thu, 17 Sep 2020 11:42:09 -0700 Message-ID: <87bli49rem.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > >>> this succeeds, we could implement a counterpart to the >>> dbus-monitor >>> program in Elisp. And you would be able to access this >>> information >> >> Excellent. I can now parse the output of dbus-monitor. But >> capturing > > Implementation is more complex than expected. Due to its nature, > org.freedesktop.DBus.Monitoring.BecomeMonitor requires another > (parallel) connection to the bus. This is not foreseen yet in > dbusbind.c; > will see how it could fly. > > What I could provide just now is an implementation which runs in > *another* Emacs instance. This could be used for monitoring > only, > because it is another connection to the bus per definition. Are > you > interested to get such a partial implementation? I'm interested in whatever you want to implement. I see signature verification useful for testing rather than an exposed feature. >From what I can see from looking at dbus-monitor output the correct property types are being exposed now. It seems to be working. So whatever we approach we take, the benefit is early warning of future regressions. You are a better judge of benefit of additional effort than I. A second Emacs instance seems to offer the same asynchronous output gathering issues that dbus-monitor poses. It does eliminates the ad-hoc parser. If you have a longer term goal, I'd suggest pursuing that rather than something partial that you'll want to replace later. But I have no objection to a parallel instance to gather request signatures. >> Do you have >> an issue with rolling that up in a macro? > > No objection. But comments :-) > >> (defmacro dbus-test05-test-property (name value expected) >> `(let ((byte-array ,name)) > > I wouldn't call the variable "byte-array"; it could be anything > during > test. Call it "property" or alike. Fixed >> (should >> (equal >> (dbus-register-property >> :session dbus--test-service dbus--test-path >> dbus--test-interface ,name :read > > I would use access type :readwrite. We want also to test > dbus-set-property. Yes, I've added a set property test. I'll move access to a parameter so I can do both positive and negative testing; confirm that :read prevents writes. Which raises the question, should dbus-set-property function call fail for a local property that isn't :readwrite, or should that only be prevented by incoming messages? Do we require that dbus-register-property be used to update a :read access property. >> ,value) >> `((:property :session ,,dbus--test-interface ,,name) >> (,dbus--test-service ,,dbus--test-path)))) > > What are the double commas good for? Typos? I had nested quasi-quoted expressions. I'm working to avoid that. So that was a bug. >> (should >> (equal >> (dbus-get-property >> :session dbus--test-service dbus--test-path >> dbus--test-interface ,name) >> ,expected)) >> >> ;; a test for `dbus-get-property' shall be added. > > That's my typo - dbus-set-property is meant. And yes, it shall > also be > here. So you might need macro arguments value1 expected1 value2 > expected2. I assumed as much. I just carried the comment around blindly. I've changed what I sent you to accept a list of pairs of values and expected return sexps. I use the first pair on the list for dbus-register-property, verify retrieval, then use dbus-set-property to update and verify the property from the remaining pairs. I need more testing and a cleanup pass. I'll pass along a better version when I think it's ready for review. I've started a few "should fail" tests. Cheers, Hugh From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 02:28:47 2020 Received: (at 43252) by debbugs.gnu.org; 18 Sep 2020 06:28:47 +0000 Received: from localhost ([127.0.0.1]:40449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJ9t0-0004CV-Oh for submit@debbugs.gnu.org; Fri, 18 Sep 2020 02:28:47 -0400 Received: from mail1.ccss.com ([159.203.255.73]:53326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJ9sy-0004CI-9n for 43252@debbugs.gnu.org; Fri, 18 Sep 2020 02:28:45 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 7F16DBF8CE; Thu, 17 Sep 2020 23:28:38 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 39432BF8C0; Thu, 17 Sep 2020 23:28:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 09A9A17605D8; Thu, 17 Sep 2020 23:28:37 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bFp1SySRN_nM; Thu, 17 Sep 2020 23:28:35 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id D8DA417605AB; Thu, 17 Sep 2020 23:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600410514; bh=Dk+dQxEsNTDsgTe/i89CMnEjQdi+Gzp5A4BETyxKYkc=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=VFR8/wVl8jEcSoNgkh9JzPKacfb09TrgC1976tolu9dyWF1fXtsn20bhJ41JbH3LG ZMjIjqHDVALxW++G7q5ot+1TERou9rUZC7ehPLv5oFzxWR18n+y49VLDf2oBLpZq2u kNzxq2zXvTHOD0Rl0dGPoDqkvgixCvxVLhsq6Q1L5v2HIazuuoewa9GCuGtlYXBXHS G2CEh/9kHTofcl5FJi2oa37WdtHpW4xk3TlvMZzey+6W17DQNRLahCXX49r3GLZK9t oC7lZSHQcInNGYfDOKTL7QrXp+iW+9Vi6gsYvv1jsnVI42trr2UjYV8MNG5DbIvmrd KlC1sbPaUqnkg== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87bli49rem.fsf@ccss.com> Date: Thu, 17 Sep 2020 23:28:34 -0700 Message-ID: <878sd7a99p.fsf@ccss.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; format=flowed Hugh Daschbach writes: > Michael Albinus writes: > >> Hugh Daschbach writes: >> >> Hi Hugh, >> > I need more testing and a cleanup pass. I'll pass along a > better > version when > I think it's ready for review. > > I've started a few "should fail" tests. I've made a bit of progress. I have a few tests that fail. There doesn't seem to be any type checking on property set. But have a look and see if you concur that these are real errors. I've attached a patch. In addition, I see a failure in dbus-test04-register-method: > F dbus-test04-register-method > Check method registration for an own service. > (ert-test-failed > ((should > (equal > (should-error > (dbus-call-method :session dbus--test-service > dbus--test-path dbus--test-interface method1 :timeout 10 "foo")) > `(dbus-error ... "The name is not activatable"))) > :form > (equal > (dbus-error "org.freedesktop.DBus.Error.ServiceUnknown" > "The name org.gnu.Emacs.TestDBus was not provided by any > .service files") > (dbus-error "org.freedesktop.DBus.Error.ServiceUnknown" > "The name is not activatable")) > :value nil :explanation > (list-elt 2 > (arrays-of-different-length 70 27 "The name > org.gnu.Emacs.TestDBus was not provided by any .service files" > "The name is not activatable" first-mismatch-at 9)))) > Your mileage may vary. I'm starting to run out of ideas for additional tests. Suggestions welcome. Cheers, Hugh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Property-tests-ERT.patch Content-Description: Additional property tests. >From 722852e9e1d402742508233051951d21b02bc3c9 Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Thu, 17 Sep 2020 23:19:32 -0700 Subject: [PATCH] Property tests (ERT). Add DBus tests to validate property handling. Includes cycling register, get, set, get, GetAll, and GetManagedObjects over several property types. Add tests that should fail, like setting a property with a type different from it's type at registration time. --- test/lisp/net/dbus-tests.el | 319 ++++++++++++++++++++++++++++++++++++ 1 file changed, 319 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 18c2a2ad6d2..682aaa8325a 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -755,6 +755,325 @@ dbus-test06-register-property-emits-signal ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(defun dbus-test06-make-property-test (selector name value expected) + "Generate a property test: register, set, get, getall sequence. +This is a helper function for the macro +`dbus-test06-test-property'. +The argument SELECTOR indicates whether the test should expand to +'dbus-register-property' (if SELECTOR is 'register) or +`dbus-set-property' (if SELECTOR is 'set). +The argument NAME is the property name. +The argument VALUE is the value to register or set. +The argument EXPECTED is a transformed VALUE representing the +form `dbus-get-property' should return." + +;; Since we don't expect this helper function and it's caller +;; `dbus-test06-make-property' to be used outside this file, we don't +;; bother with `eval-and-compile.' It would be appropriate to wrap +;; this with `eval-and-compile' if that expectation is misguided. + + `(progn + ,(cond + ((eq selector 'register) + `(should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface ,name :readwrite ,value) + '((:property :session ,dbus--test-interface ,name) + (,dbus--test-service ,dbus--test-path))))) + + ((eq selector 'set) + `(should + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface ,name ,value) + ,expected))) + + (t (signal 'wrong-type-argument "Selector should be 'register or 'set"))) + + (should + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface ,name) + ,expected)) + + (let ((result + (dbus-get-all-properties + :session dbus--test-service dbus--test-path + dbus--test-interface))) + (should (equal (cdr (assoc ,name result)) ,expected))) + + (let ((result + (dbus-get-all-managed-objects :session dbus--test-service "/")) + result1) + (should (setq result1 (cadr (assoc dbus--test-path result)))) + (should (setq result1 (cadr (assoc dbus--test-interface result1)))) + (should (equal (cdr (assoc ,name result1)) ,expected)))) ) + + +(defmacro dbus-test06-test-property (name value-list) + "Generate a DBus property test. +The argument NAME is a property name for the test. + +The argument VALUES is a list of pairs, where each pair +represents a value form and an expected returned value form. The +first pair in VALUES is used for `dbus-register-property'. +Subsequent pairs of the list are tested with +`dbus-set-property'." + (let ((values (gensym)) + (value (gensym)) + (expected (gensym)) + (pair (gensym)) + (first (gensym))) + (let ((values value-list)) + (append + `(progn) + (list + (dbus-test06-make-property-test + 'register + name + `',(caar values) + `',(cdar values))) + (mapcar (lambda (pair) + (dbus-test06-make-property-test + 'set + name + `',(car pair) + `',(cdr pair) + )) + (cdr values)))))) + +(defmacro with-dbus-monitor (buffer &rest body) + "Run BODY in an environment that captures `dbus-monitor' output in BUFFER." + (declare (indent defun)) + `(let ((process + (start-process "dbus-monitor" ,buffer + "dbus-monitor" + "--session" + (concat "sender=" dbus--test-service) + (concat "destination=" dbus--test-service)))) + (unwind-protect + (progn ,@body) + (sit-for 0.5) + (delete-process process)))) + +(ert-deftest dbus-test06-test-property-types () + "Check property type preservation for an own service." + (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 + (with-dbus-monitor "*dbus-monitor*" + (progn + (dbus-test06-test-property + "ByteArray" + (((:array :byte 1 :byte 2 :byte 3) . (1 2 3)) + ((:array :byte 4 :byte 5 :byte 6) . (4 5 6)))) + + (dbus-test06-test-property + "StringArray" + (((:array "one" "two" :string "three") . ("one" "two" "three")) + ((:array :string "four" :string "five" "six") . ("four" "five" "six")))) + + (dbus-test06-test-property + "ObjectArray" + (((:array + :object-path "/node00" + :object-path "/node01" + :object-path "/node0/node02") . + ("/node00" "/node01" "/node0/node02")) + ((:array + :object-path "/node10" + :object-path "/node11" + :object-path "/node0/node12") . + ("/node10" "/node11" "/node0/node12")))) + + (dbus-test06-test-property + "Dictionary" + (((:array + :dict-entry (:string "four" (:variant :string "value of four")) + :dict-entry ("five" (:variant :object-path "/nodex")) + :dict-entry ("six" (:variant (:array :byte 4 :byte 5 :byte 6)))) . + (("four" + ("value of four")) + ("five" + ("/nodex")) + ("six" + ((4 5 6))))) + ((:array + :dict-entry (:string "key0" (:variant (:array :byte 7 :byte 8 :byte 9))) + :dict-entry ("key1" (:variant :string "value")) + :dict-entry ("key2" (:variant :object-path "/node0/node1"))) . + (("key0" + ((7 8 9))) + ("key1" + ("value")) + ("key2" + ("/node0/node1")))))) + + (dbus-test06-test-property + "ByteDictionary" + (((:array + (:dict-entry :byte 8 (:variant :string "byte-eight")) + (:dict-entry :byte 16 (:variant :object-path "/byte/sixteen")) + (:dict-entry :byte 48 (:variant (:array :byte 8 :byte 9 :byte 10)))) . + ((8 ("byte-eight")) + (16 ("/byte/sixteen")) + (48 ((8 9 10))))))) + (dbus-test06-test-property + "Variant" + (((:variant "Variant string") . ("Variant string")) + ((:variant :byte 42) . (42)) + ((:variant :uint32 1000000) . (1000000)) + ((:variant :object-path "/variant/path") . ("/variant/path")) + ((:variant :signature "a{sa{sv}}") . ("a{sa{sv}}")) + ((:variant (:struct 42 "string" (:object-path "/structure/path") (:variant "last"))) . + ((42 "string" ("/structure/path") ("last")))))) + + ;; Test that :read prevents writes + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray" :read + '(:array "one" "two" :string "three")) + `((:property :session ,dbus--test-interface "StringArray") + (,dbus--test-service "/org/gnu/Emacs/TestDBus")))) + + (should ; Should this error instead? + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray" + '(:array "seven" "eight" :string "nine")) + nil)) + + (should-not ; Not update by dbus-set-property + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray") + '("seven" "eight" "nine"))) + + (should ; Verify property has registered value + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray") + '("one" "two" "three")))) + + ;; Test mismatched types in array + + (should ; Oddly enough, register works, but get fails + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "MixedArray" :readwrite + '(:array + :object-path "/node00" + :string "/node01" + :object-path "/node0/node02")) + `((:property :session ,dbus--test-interface "MixedArray") + (,dbus--test-service "/org/gnu/Emacs/TestDBus")))) + + (should-error + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "MixedArray") + '("/node00" "/node01" "/node0/node02"))) + + ;; Test integer overflow + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" :readwrite + :byte 128) + `((:property :session ,dbus--test-interface "ByteValue") + (,dbus--test-service "/org/gnu/Emacs/TestDBus")))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 128)) + + (should ; This should error or the next get should fail + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" 1024) + 1024)) + + + (should-not ; This should fail or the preceeding set should error + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 1024)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 128)) + + ;; Test set with invalid type + + (should ; No error, but the invalid type throws an error on get + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" :boolean t) nil)) + + (should-not + (eq + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + t)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 128)) + + ;; Test invalid type specification + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "InvalidType" :readwrite + :keyword 128) + `((:property :session ,dbus--test-interface "InvalidType") + (,dbus--test-service "/org/gnu/Emacs/TestDBus")))) + + (should-error + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "InvalidType") + 128))) + + + ;; Cleanup. + + (message "cleanup") + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 05:36:29 2020 Received: (at 43252) by debbugs.gnu.org; 18 Sep 2020 09:36:29 +0000 Received: from localhost ([127.0.0.1]:40886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJCoe-00030t-Sw for submit@debbugs.gnu.org; Fri, 18 Sep 2020 05:36:29 -0400 Received: from mout.gmx.net ([212.227.15.18]:53023) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJCoc-00030f-KW for 43252@debbugs.gnu.org; Fri, 18 Sep 2020 05:36:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600421779; bh=z/fYBX99G80FOfebMrJaRdGnyHDYdPKPW3+kQo6A+80=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=O8hsKAKhg2PoSG4G4m6zICZYnuIoDp96bfVsQuhbrH9WozypNMeu0SOYhaBMhNUmA 0tbFgP49ofziUpMMAtrF76Ykney30i2Dm30JVziY+JoLD0YCBzXl16dwW/aBC5Nq35 hy64dqEnpiKfcPr3j6+UxdpdYz4AcrB3PI72N//c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([178.20.93.248]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MJmGZ-1k40HT2xMP-00KAwe; Fri, 18 Sep 2020 11:36:18 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Fri, 18 Sep 2020 11:36:17 +0200 In-Reply-To: <87bli49rem.fsf@ccss.com> (Hugh Daschbach's message of "Thu, 17 Sep 2020 11:42:09 -0700") Message-ID: <87h7rva0ku.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:KlI4xa8mN0HeoYyouqZVkvKaBmXNDB1gVNhONIbdfkXiRV89p60 My5WdyuyZBDHuK+aJNEPPFYxKmFii5MPLDVV+3Kydcmh9a618M0/o2xGkAPl+hQH0uEP2I7 njpoOIhLFoBOXoJqgRGueiAv8Oo+FFEvaoydXrkwPxAchsM4FhJEXj63pn9sT38xe2V3606 f4R4PF/6NAgUeuoQYc/hA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sAWzt6FyeDI=:S0/2AKt7OkrpNAZrI0mcz2 aumJAHilb7UqSQnBdf6DZpjruNP3NGF2gn/SdomcmISQEcPwzraMkIfwCb9e7OqFO9qxJtP3p wya9lf4+UCJQ6uoDG//9XcWc+KebYQucM2GgUdpxDlGhZFGjOS9BaDYvYIS1UP7KbUf64/uVW 3bCKUMwWUgoSSrO407jHoUp3qaQaHkJjoBEYUnpbmMXYUk/3EwkwXEMEX2Nn8ULDpCaGYYeBq FNYDVvGqFuNmMgTAF1SWE8DYK57CShooxMBQYKnS8Q3n8/2LsEj1Ht9nftiryIVPdtVq894Dm FjT5nUrhFR5tA3cFzIZe1L/7geB748b0z6d7vWmb5nXvUfqUa7N8NtVxMPSXMIxgQ0+FopYau 3ZaKPpQzkgSr4Nm8F2xqyPcU6TSgNaegHYjW06oH3qsYPuUAP0vKnKFDHfQzSlP1f9OeP1Zdd lsOzF3oNHK8eT74gZQwa2kQ6llsi9+X8ddWBhV9ubixLBXdvy3EDD1GvCOdIrw9uBMaSKufAi oS8X6t8zuCPg8zspst8hXFwLWKIbyZU1TJY7eKQ8om3Ykch3POUDZDB7lmOyvXnDur2XOoRNZ v3cFFnoed0s0Yuwa8LZkdHxATgcR1onsXGZxe1rUvGmsVBqzMIjtLd/4vmSt3in6+meD5xLQf hm6FuDr9+sIwLIoBgz2iaq6qFJ2rYUbLaH7oetnMKNnTTsiWmqydNw+tUzPd4fEq/YW5UgSY7 W81w3GuPMROI4EDuyS6jlkkHDj4WZZivm8dCnnLn/r2Z6jwJ6XKjeMKsMddeUab8OAAS5+x3M 4sxmOSQmXhsRTW0XXnZbg3I/mCgKaOmbvLcMs9mFpEz60SbCywqf0m+NyUiK7XkL941wV4NOW aqvGVUQ0iW2epzN9IegO3GDDRO/vQKQ6R/buqIFvpv1TE1jU4dsMa64gs86ssIsi1WD1U06xR SLF60cqkAFtWDVNbvPxnI0176ztsJHTXC6bFm3HzENRdGsEWT1k4Ei3rGriIqRuieub6X+MbG pzF3ZeaKLbm09MVBiuD8B2sOLUFr0KElkXIIJiQFmpR7CIiQpHjDeW2G4dsZ80R3PLwAqFcQL MB+QwyTg42OcnCSzPpICkGYC7a8hOzJhe4MvllYCke1Bn3tf9FzOZUJIeUdo8im1xjhpcMlpr vc0jSku+q8WHPPVINN76WcdrjBPxk20ZBhVa/7kH4D0wgCV1tHTGjp8ewAOj/DZxe0blQ0M/2 fvYww0k3BCcgkKQQ5FfTSvtG5etHMGYxND655RA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >> Implementation is more complex than expected. Due to its nature, >> org.freedesktop.DBus.Monitoring.BecomeMonitor requires another >> (parallel) connection to the bus. This is not foreseen yet in >> dbusbind.c; >> will see how it could fly. >> >> What I could provide just now is an implementation which runs in >> *another* Emacs instance. This could be used for monitoring only, >> because it is another connection to the bus per definition. Are you >> interested to get such a partial implementation? > > I'm interested in whatever you want to implement. I see signature > verification useful for testing rather than an exposed feature. > > From what I can see from looking at dbus-monitor output the correct > property types are being exposed now. It seems to be working. > > So whatever we approach we take, the benefit is early warning of > future > regressions. You are a better judge of benefit of additional effort > than I. > > A second Emacs instance seems to offer the same asynchronous output > gathering issues that dbus-monitor poses. It does eliminates the > ad-hoc > parser. > > If you have a longer term goal, I'd suggest pursuing that rather than > something partial that you'll want to replace later. > > But I have no objection to a parallel instance to gather request > signatures. I don't know where we end up. I'm still poking around how to implement a second connection to the same bus. If it is not too expensive to implement I'd prefer this. > Which raises the question, should dbus-set-property function call fail > for a local property that isn't :readwrite, or should that only be > prevented by incoming messages? dbus-set-property doesn't know, whether a property is registered locally. I guess an error reply is reasonable, whether the property is registered locally, or not. > Do we require that dbus-register-property be used to update a :read > access property. dbus-set-property shall fail when the property has :read access. Yes, such a property can be changed only by dbus-register-property. But :read access is intended to tell the clients, that they shouldn't change the property; an error in dbus-set-property (returning nil, respectively) is appropriate. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 05:55:56 2020 Received: (at 43252) by debbugs.gnu.org; 18 Sep 2020 09:55:56 +0000 Received: from localhost ([127.0.0.1]:40942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJD7U-0003a1-8A for submit@debbugs.gnu.org; Fri, 18 Sep 2020 05:55:56 -0400 Received: from mout.gmx.net ([212.227.17.21]:49755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJD7S-0003Zm-Af for 43252@debbugs.gnu.org; Fri, 18 Sep 2020 05:55:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600422946; bh=/QDmRDJ/VaktAC/ra/oIuGj0h+DOyoC709tEsInpDaA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=l4CepywAhsJlS7LSAsGoZ2fxyJuf5ulfpy84XNP1jF4qlat0g952NJsFbDsmdwFnq PZ+LJe1jdMszMXjhQQ647wK7ayLDcVuHZhlIZV4gDGGN2wwiPsTvGKSEgNBhzcDtX0 DS1yMpoRA3tuz6+la+gsHllpyjgCxYKQPrAL27gM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([178.20.93.248]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpUUm-1kp1lG0xO0-00ptZI; Fri, 18 Sep 2020 11:55:46 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> <878sd7a99p.fsf@ccss.com> Date: Fri, 18 Sep 2020 11:55:45 +0200 In-Reply-To: <878sd7a99p.fsf@ccss.com> (Hugh Daschbach's message of "Thu, 17 Sep 2020 23:28:34 -0700") Message-ID: <87bli39zoe.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:HT4rtP1PU0LWqW40okU8qKG9n3U/0lrHMy6R6ev34IeC9mVUCPb cPSQgzTKFCFp7wFiJclHxLGueJDbpoM775XbtMHoIyUaBsOL2Nawe9EiyOhfR3S8A8e5Y7T NPSMh3qDjsP0eedhPLSdvN33kO691BBTo/OF35nhp/TXJmqUgxZC/hWprGFo4nN7fne35Rs GhVNa+9WC5Jt80L+qxlvw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Dp5PaCc/iuY=:AjdqXGinVyHiz9njkBF/ye lfYqNQAJM4tP4QGlhlca+f4GhwVwaItzxNW7+UVr2DZBuR/uo8PnTxEXydwMWBwzFvUg6eg7M L/NfV2TmEF9Kf/z/nYTz+vU2ojKYbzzQDDyApevBCU6gQ+fGAey0mcL7QUEKmDk//sF6g+Dud C0gApMn1foC5+0I7TwsabX21Lw2QmfmMR3gUtgreGlqUPnN+gl22NVNAS8OwbC5H0bzFWXEgJ tUkUj/7BPRkhWiF3NKd4Nd2ICuX2Gz08QKSIyV1nkFoji4xCKjGnp2FcfxSDvUS2oSgAFYmWG FfGJs3EFh2PC+OaMuZOtL1WfpSZ3uiQ3QLp7tfTijQEkGefwIIyCmSBP10CzI8zCHpBDmuQGA zvPjUR45Bk5W2+d4UzGgrd/KrTw8dBULoWoU/DSSHEnLNzYV3duRkBXrAVgHZOTnbLxRHe1/J Y2svWeDP/J+LJwhjSe4nZ8uvIqU9vZvAxh0DHrV3FUa2QRlfFWJFRVJHHootX+vfxLZaT0jA3 f9f6dRiX2YPPQNCQMjVp8G/vxSzRZ0f0AKMoEly+IVGVsi3h+R2Y4Eu61XwpXIWPP+8rzAZpH b6ojncQY5Z/m6kVuJotASGSoReDq065wyWUN6FnQORzMVSeYO8KdTIbqrBilSTm0wTaaXTprW wcPpSc1k9otX+HW6nl/yay5yqeIQdZLBdKJ5UL022WCkQ+ZSmoOsAy8TaYRMCSOuIQJ1v15FC dXBSqAKEPmM06hEAV6oJEAGLXM8x9fwu6WZVklcoCUNPTPGBDlLVFKoiIAJ+33J7QHJruv5OM Q0VM04X1qwWoQjWy0Y9sG5wF0olYSUJtXrSzVeUAmIPU8Qc7eAkrEEQBXwr3JivAvrJJrG+r+ 4bHAIVMhKM+qO3pPnvL+XJjWLWlwsLu83ODpcVlXq03dN0UOtZnccPuh5J/qNweIW8LFZ7x0J ZV4A0SO3358sfyEFwptD4sxExEsLIkoyqX3YMrHB47xSrriMC1OaElG6mS/d936EZPAgH1WhY 4/K8ABRtnsIz1G0FxWbwqmxdUY/MW7dLKdfswlobuP/5qnpvvN+k4kAUPxxAeB5QXgk1jrRdT 7qcB+pnl3rGzChHEfz9r1IPWBXJJLpYkIGwcIlx+YRvS2/3sIHyNv3G3Xs0K0nV+1NTdsNTT5 h079mKE6F1JVyZQi3gdDukjvP99Zr/KQkdRy3Dcu1TfZ1nAIfaSE9pHQ24jnG7DhM33UYdXlj 4B0N81l39LW3Yc+Ja5DrYXjAvgP5PvuAcygSUcw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >> I need more testing and a cleanup pass. I'll pass along a better >> version when >> I think it's ready for review. >> >> I've started a few "should fail" tests. > > I've made a bit of progress. I have a few tests that fail. There > doesn't seem to be any type checking on property set. But have a look > and see if you concur that these are real errors. I've attached a > patch. Well, before getting type information in dbus-event, it wasn't possible for dbus-property-handler to know the types of values provided by org.freedesktop.DBus.Properties.Set method calls. Therefore I've said, that the type used in dbus-register-property shall be inherited. This decision wasn't dictated by the D-Bus API, it was just an implementation restriction. Now, that the type information is preserved, I have abandoned this restriction. You can register a property with any type, and you can overwrite this property via an ofDP.Set call with a value of any other type. This is not forbidden by the D-Bus API (but highly discouraged, I guess). > In addition, I see a failure in dbus-test04-register-method: > >> (equal >> (dbus-error "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.gnu.Emacs.TestDBus was not provided by any .service files") >> (dbus-error "org.freedesktop.DBus.Error.ServiceUnknown" "The name is not activatable")) Oops, yes. The intention of this check is to see, whether org.freedesktop.DBus.Error.ServiceUnknown is reported (it is). The additional explanation doesn't matter, and it seems to be different depending on the D-Bus daemon implementation (I'm using Fedora 32). So I've pushed a fix, which checks just for the D-Bus error name, w/o the additional text. > I'm starting to run out of ideas for additional tests. Suggestions > welcome. The major black hole seems to be dbus-introspect* tests. If you are interested? I fear writing them will be boring, so I haven't done them yet ... OTOH, they are not the most important part of Emacs' D-Bus implementation. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 09:42:57 2020 Received: (at 43252) by debbugs.gnu.org; 18 Sep 2020 13:42:57 +0000 Received: from localhost ([127.0.0.1]:41407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGfA-0003NE-LA for submit@debbugs.gnu.org; Fri, 18 Sep 2020 09:42:56 -0400 Received: from mout.gmx.net ([212.227.17.21]:60811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGf8-0003Mv-US for 43252@debbugs.gnu.org; Fri, 18 Sep 2020 09:42:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600436566; bh=rxmrp30gZqNwq0FjnbgqpaL/D3KhFMpR9T8AWvrfGuM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date; b=jyiSGIEMc8ESggnw8xgYGK4CZz0LahOtMyFGCgDkJOrCmK8xkWn8QkQsq3EnuggoU utdUUUixOA1KcRWvuAsW2XRnpPddNR39ZO2PnLkcieLQIhTGgHgJDOAX3hplzyg/7z rXtP7ZA/ROuPdkF9kO/cpzw3GO/GxtumSIBM2Bbg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([178.20.93.248]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Msq6C-1kczPC1f0i-00tDMV; Fri, 18 Sep 2020 15:42:46 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> <878sd7a99p.fsf@ccss.com> Date: Fri, 18 Sep 2020 15:42:45 +0200 Message-ID: <87tuvv8alm.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:XeuCJxeTxrb9CSUWbTGomjRvz677PVnQ/ortM3NExpKS488M32l L+SPx1Q9fsth4Cl0vU6SkcDVO8wtRNHOo01ibGmbYTL21iMnncGmTt1trsm/A9nez6jsesb whoJdhCdfO86uQi5VActia3bMsfwr05AVkQc+IX5LXcdVupW5Y37vSwEyqXTXrF9qNkQMJ5 qtfc5Iu3myWY0aN9OuYbw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:wEBbd3009TA=:yqH8dAi1equM9ZesUvfS63 mRRuvAEHLU95ExLOad3/NnXHJ9d5+T1sCr51bAqIUTCvT1MknXV765GxVJaTmW20zbO944+yK LLawELO/R7sA3yCWjCSlP1aZ7s2dqohCJVY/Ff+KidN/8Mhg4ZsEbxcfgzbsuD4D2N6GTu8j2 EBOTL9k5FyFjiBAuj/uwkt+UhTEAzOUoPzfPGOvxfn8h7YLHmDxl2BB+xQHwyPChvd4ZXC2to yDnI/yM0dVShI2Eg3B3/FK8ZniFOJ13EeSBM0mAifvkzP5VPElY6fjDhfiP+USSau57SaXbxL egiEeKgsnkVzbSUXuZEhUjb4o2F/R0Q1VfWTNaz9hl5JM43QZEwSUqMwusZWa4q9BUVstqs3h tB17IoCf051FTzg5DRcU6E9nYUfShIvCuc28HJH2Pjp3IlKrHGxi0ZuAN11SuTEVJbTLwq1oF FI8pfOd7T8JehRcFlJvG9ePuRDWBpyYxOprz5qWvUTVrvEyddlLnaQkBC5kaxlqOcJalRvCI2 aC6Pt0TiVofeLvqczd7FfnxxKZ2IYzltjgwPcLZyn61BBq1uooiFgDMPsvAf0dj7H7b4fKZLh Z4DeGWanmqf5FbRuoQrPqPzrrsCsTX0gZDJceVq3OYTLCCpK16vqtYZjPz41fQyVykKV41woH gD/r7xRXRCdWgyGJTssMUwiQ3+JpNvMSWvqbfbJvlILm2nQ21zl3K/erSqNVpTDq/L42u5xMJ CDd4N1m7ZPyoaghsOlB/hkVuigx7jfD6zQdGB68RYgMeCrS1x/VRa71oc3Fd6I9JmPZIZfJPX PPvRuLUwzC/RCRKyb5XFT3fvjrtj5KIqYAfIFzZ7MY9dEMICVXHWxpauxX9CZo3OMnQZlESBp kxFYVZoUrpbNQK152fMuGCMdZGjDvQ8H1LKF+NizNfJ5q4er/vb+FHgz2XPSyUIPsoqOtMy94 IAZwg/wMFHADN9LQSqX8+6bDwm5SKl6KELYEtMLplBmYdCCr67gSnfs52yAYnR2UODZAKiF/J +lIbmlyb8asxSixoIInYk+oZuh6Nq8gk/pg4DBRU10SriTGLCjQhLErO1L3tHNKsGjDVmzKsU m0yYDxIb8UXXSDC6SarqF4zBKOFEXExHnlCgBHLK3OqUGrmSadxqhk2B+ckuKOGpsRapa8NP0 bzl84diE5983OHkdNCGMzOJSLapRyeISsdItWlibZd89EDWusmtZP6xM4D4ZxnyXNuoG1wsdV 5ZKeQtgcS6Ivdl0UZ1RG/cwyUekk/TehTZm8NNg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, In general, your tests are very useful. Thanks! Just some comments on your patch. > Add tests that should fail, like setting a property with a type > different from it's type at registration time. As said the other message, this constraint doesn't exist any longer. Registered services might want to control, which properties are set. This could be the type of a property, or a restriction of the value (for example, just a predefined set of strings could be allowed). Maybe, we give these services such a mean? That is, they could add an own handler function in dbus-register-property, which is applied when a org.freedesktop.DBus.Properties.Set method call is handled. WDYT? > +(defun dbus-test06-make-property-test (selector name value expected) I would call it dbus--test-make-property-test. test06 isn't important, and the double slash "--" is an indication that this is an internal function, which shouldn't leave the dbus-tests.el scope. See the other helper functions in the file. > +;; Since we don't expect this helper function and it's caller > +;; `dbus-test06-make-property' to be used outside this file, we don't > +;; bother with `eval-and-compile.' It would be appropriate to wrap > +;; this with `eval-and-compile' if that expectation is misguided. Well, it is uncommon that a function returns a code snippet. I haven't checked, but couldn't you achieve your goal by changing this defun into a defsubst? > +(defmacro dbus-test06-test-property (name value-list) Same comment on name here. I would call it dbus--test-property. > +The argument VALUES is a list of pairs, where each pair > +represents a value form and an expected returned value form. The > +first pair in VALUES is used for `dbus-register-property'. > +Subsequent pairs of the list are tested with > +`dbus-set-property'." The second argument is VALUE-LIST, not VALUES. However, Elisp encourages an argument list like (defmacro dbus-test-test-property (name &rest value-list) This simplifies call conventions, you can call then with several key-value arguments like (dbus--test-property "ByteArray" '((:array :byte 1 :byte 2 :byte 3) . (1 2 3)) '((:array :byte 4 :byte 5 :byte 6) . (4 5 6))) > +(defmacro with-dbus-monitor (buffer &rest body) Such a macro name would poison your Elisp name space. Keep the dbus--test prefix, and name the macro like dbus--test-with-dbus-monitor. > + (unwind-protect > + (progn ,@body) > + (sit-for 0.5) sit-for is problematic, because it would delay the test run by 0.5 seconds, unconditionally. People regard this negative, because the (whole) Emacs test suite shall run fast. A better check might be (with-timeout (1 (dbus--test-timeout-handler)) (while (accept-process-output process 0 nil t))) > + (should > + (equal > + (dbus-register-property > + :session dbus--test-service dbus--test-path > + dbus--test-interface "StringArray" :read > + '(:array "one" "two" :string "three")) > + `((:property :session ,dbus--test-interface "StringArray") > + (,dbus--test-service "/org/gnu/Emacs/TestDBus")))) You might use ,dbus--test-path instead. Here and everywhere else. > + > + (should ; Should this error instead? > + (equal > + (dbus-set-property > + :session dbus--test-service dbus--test-path > + dbus--test-interface "StringArray" > + '(:array "seven" "eight" :string "nine")) > + nil)) Good question. dbus-set-property and dbus-get-property do not propagate D-Bus errors. Maybe we shall change the functions to do so? I've asked this already myself. > + ;; Test mismatched types in array > + > + (should ; Oddly enough, register works, but get fails > + (equal > + (dbus-register-property > + :session dbus--test-service dbus--test-path > + dbus--test-interface "MixedArray" :readwrite > + '(:array > + :object-path "/node00" > + :string "/node01" > + :object-path "/node0/node02")) > + `((:property :session ,dbus--test-interface "MixedArray") > + (,dbus--test-service "/org/gnu/Emacs/TestDBus")))) Hmm, yes. dbus-register-property does not perform a local type check. And honestly, I don't want to do it; I let the D-Bus daemon do the job. > + (should-error > + (equal > + (dbus-get-property > + :session dbus--test-service dbus--test-path > + dbus--test-interface "MixedArray") > + '("/node00" "/node01" "/node0/node02"))) Yes, dbus-get-property is hit by the mismatched types in the :array. Isn't this sufficient? > + (should ; This should error or the next get should fail > + (equal > + (dbus-set-property > + :session dbus--test-service dbus--test-path > + dbus--test-interface "ByteValue" 1024) > + 1024)) No error expected. You haven't given 1024 a type (like :byte), so it is handled as :uint32. > + ;; Test invalid type specification > + > + (should > + (equal > + (dbus-register-property > + :session dbus--test-service dbus--test-path > + dbus--test-interface "InvalidType" :readwrite > + :keyword 128) > + `((:property :session ,dbus--test-interface "InvalidType") > + (,dbus--test-service "/org/gnu/Emacs/TestDBus")))) Oops. This shall be detected in dbus-register-property. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 11:50:56 2020 Received: (at 43252) by debbugs.gnu.org; 18 Sep 2020 15:50:57 +0000 Received: from localhost ([127.0.0.1]:44225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIf2-0005Z2-Jb for submit@debbugs.gnu.org; Fri, 18 Sep 2020 11:50:56 -0400 Received: from mout.gmx.net ([212.227.17.21]:40091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIf1-0005Yn-13 for 43252@debbugs.gnu.org; Fri, 18 Sep 2020 11:50:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600444247; bh=L1yWCXOfajpUaFDOmfrfP9PKbfBXDygT+p9ku0ZMRnE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=FHwqRJfN6XJEWCvrUpsmKU7kp8nFY76kfwZ+5TJrtOsZSQjLWtuM1qQ7WFEeYM7vk 2b4KwEKC8SqIGKt+pVx+TjKYcm2twP5nUJm7vY0+8u5urN6Iza4LRW5BM59P3U8gZd 8Q4WHPkLA95nYfRzopwdblBIM+Z4kMV3F7J/yYDc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([178.20.93.248]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N1wll-1kUPV80xSr-012EP2; Fri, 18 Sep 2020 17:50:47 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> <878sd7a99p.fsf@ccss.com> <87tuvv8alm.fsf@gmx.de> Date: Fri, 18 Sep 2020 17:50:45 +0200 In-Reply-To: <87tuvv8alm.fsf@gmx.de> (Michael Albinus's message of "Fri, 18 Sep 2020 15:42:45 +0200") Message-ID: <87pn6j84oa.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:X5QhQFbRBf8og1ZIZcSd4jexuxZjRX7Tx8/SpQTeDdWxXbwML6v p+nBh9FW9xy9blOFJ400yLk0Au0NeMcCAozDlKa/4jvbJgLQXwnbYigyM1ipexwvszErxfR VOCNe8IhKVf1PHJ9VnjLXW/gQ1gT4hkSIm1wCWoC6Dz58KhH96D08NhX67fl0oqPwfaZBtr mrerVbdO8G+s7QOiO4J4Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:I8A+S3oFIRA=:vJz82XeNmiJZpmDEE1z4Yd 7UXqmL9mz+vzH+Ii4xAq9Sdg0/kp5NKeiw45omWvviCOtdvbaclqvzuFmfE213Gi7KQxwHqfd oGqFZAkFozVpQVd8VpvLsKmw1t6sZbYlVzFJL3UVRNH2IWEF6bQhy8AyZ9KJwozwvrZ/yfz1B eT1oa9JkfffHVd9MkLLxRHzP4XVxPuRbcGAuBEnQHgj6kJCJa2xNyoW1GuyPOjQN9jCR1a5QH akmwRyncdF0kkIm/AtE2Rwf3WNzvkVielvIiof9VT8g+mk7n0+9v6wtEhyAq4zx/gaY+pE+kk WirfUTD3waXKESJrAdrUByps4c9UG3iSS1kIcHc9Ad1nz+Yzl2VJyVN3hIrA4z+yR/kjXl/25 7hfcfl7+qpLFvNSxMIgwlWIHZ1SQsUqKaJnbWmlFO2yIyVZrw/IPLPoXZPvuG25EwH3MxsR2t UOmwEMDBlDqRoPxnUpk/V8b7WSqiKAMfDEJojw2K8B5+Sf1TKjwUoQBFrcWZbRoRHXwllGgZB H3389G4iO1p9rZ5RLLJMnjZHf2AOwwO5prqkQRt7oV9zCegDvIZ8T2vEDkPvl7MLHISoIf0/A y85yX1rkuLNjK4M+Yb+gAuE9Ra9cdKVrCNiV/vzwh2a/Hrb8uxv45UTAVZO0DEzIkzeqk4GZu AEVFn3NGFWnpvZHcfZXSVgFlaM1z4YENWi6tbcB94xwQ3Y02kS1ypyH1Le06lPBXwTkdOTFfG inPVQvpuQ1zqQ7udPHbNdn0B+1Gz0WA4aKDXIvwODCGl2Sl4uRi/Y5ZybKTs9jLhQqEMDTLke oDOV1qo9UjPvJBPCWFqM88drs+th+EsqkvFnGmp2smTiKqYgy1n50Kof+uljojWezO6168WpB JWkTaxjSjzVz8yxuHrKbUS441iXtoAcyTcSktu6TNWd4aIZNco6wdY1zsJPdhxPNbB9B0OyTl 0ZQbDoHVeZmAf3a+9hFGpDhLTbUta5E00OtgPuOZk3Rtyxg0sT/mpeDLPFYvoCA6mmcs0YxU5 qHxOqf98DQkXu5BZyONbppSIWIDpJamUK/Ys//sKIriYEbPkzjhKZWby/qPHRTrC6WPw/2ioj /v0utDzNZa4ayK6NGqdQ893acXmRStENZurfCiADZpoRLOAYFnAkFnKlBQv0EHpr75tKJv9y0 v6dYnyKoCD1JkWQ0dZzc4aIClyFDVvy1uF1iJXYwVRZydnDNhenIlFElm87fjrtvBDarggFiS tNd3uMzpk4N6SqLqHlrkgbhJecE9LYHnQl5Dgjg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Michael Albinus writes: Hi Hugh, >> + (should ; This should error or the next get should fail >> + (equal >> + (dbus-set-property >> + :session dbus--test-service dbus--test-path >> + dbus--test-interface "ByteValue" 1024) >> + 1024)) > > No error expected. You haven't given 1024 a type (like :byte), so it is > handled as :uint32. And even if you would have prefixed the value with :byte, there won't be an error. In dbusbind.c, byte values are simply computed by taking the modulo 255: unsigned char val = XFIXNAT (object) & 0xFF; ":byte 1024" is equal to ":byte 4". Similar conversions happen for the other basic types, based on numbers. Maybe we could add some tests for these conversions? Since they are not restricted to property handling, (a) new test(s) dbus-test01-* would help. >> Cheers, >> Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 23:32:45 2020 Received: (at 43252) by debbugs.gnu.org; 19 Sep 2020 03:32:45 +0000 Received: from localhost ([127.0.0.1]:45451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJTcD-0007wA-Ai for submit@debbugs.gnu.org; Fri, 18 Sep 2020 23:32:45 -0400 Received: from mail1.ccss.com ([159.203.255.73]:54738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJTcB-0007vv-Jm for 43252@debbugs.gnu.org; Fri, 18 Sep 2020 23:32:44 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id F24BABF8D8; Fri, 18 Sep 2020 20:32:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 01FFFBF5CC; Fri, 18 Sep 2020 20:32:36 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id C835F17606CD; Fri, 18 Sep 2020 20:32:36 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FRJJp5hBaioW; Fri, 18 Sep 2020 20:32:30 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 989FD1760428; Fri, 18 Sep 2020 20:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600486350; bh=yYwWBkfsrLxX1OXdluCMA3sDkIgjJejNYNJ18+ehAo4=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=myv8dVLpaqXm5J0MRkYRic/o5ZOYJ3CaS8Y20kSr7oa2S/oJDI0WuVz7j1T0a3gUj 7t2/A9aEvgLnvcZFPYajf+PBC+C6xGFjoE5F/xxJvrxdTaIHpm5nztA6JhNc/S7y/C tsGywl92x4qQAeTwYJuqqbyTb9URxqVqjGwzD5eMF/ew7SUjNwky2ey+kilCokuvKy i9wYRNM2HrA7OE2+OGFv3WgJx7sYfmik4OC7xRJ1M6N8Fy6nngd/K+I6cTpePZSKG6 zrOB7GRbwhEaKkcstj4qYmfrxSMVyKEBlMclSKBHNeNQHeY6lASkK/HaGwrd6GVHy0 hl8bn7s3SxhfA== References: <87v9gqquct.fsf@ccss.com> <87imcqdo38.fsf@gmx.de> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87h7rva0ku.fsf@gmx.de> Date: Fri, 18 Sep 2020 20:32:29 -0700 Message-ID: <875z8aa1bm.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, >> There doesn't seem to be any type checking on property set. > > Well, before getting type information in dbus-event, it wasn't > possible > for dbus-property-handler to know the types of values provided > by > org.freedesktop.DBus.Properties.Set method calls. Therefore I've > said, > that the type used in dbus-register-property shall be > inherited. This > decision wasn't dictated by the D-Bus API, it was just an > implementation > restriction. > > Now, that the type information is preserved, I have abandoned > this > restriction. You can register a property with any type, and you > can > overwrite this property via an ofDP.Set call with a value of any > other > type. This is not forbidden by the D-Bus API (but highly > discouraged, I > guess). Makes sense. I'll adjust tests accordingly. >> I'm starting to run out of ideas for additional >> tests. Suggestions >> welcome. > > The major black hole seems to be dbus-introspect* tests. If you > are > interested? I fear writing them will be boring, so I haven't > done them > yet ... > > OTOH, they are not the most important part of Emacs' D-Bus > implementation. I'm willing. Will have a look. >> +(defun dbus-test06-make-property-test (selector name value >> expected) > > I would call it dbus--test-make-property-test. test06 isn't > important, > and the double slash "--" is an indication that this is an > internal > function, which shouldn't leave the dbus-tests.el scope. See the > other > helper functions in the file. Good by me. I'll rename accordingly. >> +;; Since we don't expect this helper function and it's caller >> +;; `dbus-test06-make-property' to be used outside this file, >> we don't >> +;; bother with `eval-and-compile.' It would be appropriate to >> wrap >> +;; this with `eval-and-compile' if that expectation is >> misguided. > > Well, it is uncommon that a function returns a code snippet. I > haven't > checked, but couldn't you achieve your goal by changing this > defun into > a defsubst? Seems like a better approach. I'm new enough at this that I wasn't aware of defsubst. I'll give it a go, thanks. >> +(defmacro dbus-test06-test-property (name value-list) > > Same comment on name here. I would call it dbus--test-property. > >> +The argument VALUES is a list of pairs, where each pair >> +represents a value form and an expected returned value form. >> The >> +first pair in VALUES is used for `dbus-register-property'. >> +Subsequent pairs of the list are tested with >> +`dbus-set-property'." > > The second argument is VALUE-LIST, not VALUES. However, Elisp > encourages > an argument list like > > (defmacro dbus-test-test-property (name &rest value-list) > > This simplifies call conventions, you can call then with several > key-value arguments like > > (dbus--test-property > "ByteArray" > '((:array :byte 1 :byte 2 :byte 3) . (1 2 3)) > '((:array :byte 4 :byte 5 :byte 6) . (4 5 6))) > >> +(defmacro with-dbus-monitor (buffer &rest body) Excellent feedback. Changes incorporated. > Such a macro name would poison your Elisp name space. Keep the > dbus--test prefix, and name the macro like > dbus--test-with-dbus-monitor. > >> + (unwind-protect >> + (progn ,@body) >> + (sit-for 0.5) > > sit-for is problematic, because it would delay the test run by > 0.5 > seconds, unconditionally. People regard this negative, because > the > (whole) Emacs test suite shall run fast. A better check might be > > (with-timeout (1 (dbus--test-timeout-handler)) > (while (accept-process-output process 0 nil t))) Thanks. I knew the sit-for was a hack, worse an unpredictable hack. I should have mentioned that I planned to remove the dbus-monitor wrapper when before final submission. It's useful for debugging the tests. But the tests themselves don't need this. I've folded in your suggestion, but it's scheduled for the chopping block, anyway. I'm still learning. Your feedback is most helpful. Thanks. >> + (should >> + (equal >> + (dbus-register-property >> + :session dbus--test-service dbus--test-path >> + dbus--test-interface "StringArray" :read >> + '(:array "one" "two" :string "three")) >> + `((:property :session ,dbus--test-interface >> "StringArray") >> + (,dbus--test-service "/org/gnu/Emacs/TestDBus")))) > > You might use ,dbus--test-path instead. Here and everywhere > else. Good catch. Thanks. >> + >> + (should ; Should this >> error instead? >> + (equal >> + (dbus-set-property >> ... >> + '(:array "seven" "eight" :string "nine")) > > Good question. dbus-set-property and dbus-get-property do not > propagate > D-Bus errors. Maybe we shall change the functions to do so? I've > asked > this already myself. I don't have a strong opinion either way. I'm just trying to note corner cases. >> + ;; Test mismatched types in array >> + >> + (should ; Oddly enough, >> register works, but get fails >> + (equal > > Hmm, yes. dbus-register-property does not perform a local type > check. And honestly, I don't want to do it; I let the D-Bus > daemon do > the job. Great. >> + dbus--test-interface "MixedArray") >> + '("/node00" "/node01" "/node0/node02"))) > > Yes, dbus-get-property is hit by the mismatched types in the > :array. Isn't > this sufficient? It is. As long as we can predict where errors will be reported. I'll update comments to indicate intended behavior. >> + (should ; This should >> error or the next get should fail >> + (equal >> + (dbus-set-property >> + :session dbus--test-service dbus--test-path >> + dbus--test-interface "ByteValue" 1024) >> + 1024)) > > No error expected. You haven't given 1024 a type (like :byte), > so it is > handled as :uint32. Cool. With the explanation regarding dbus-set-property changing types, this makes perfect sense. > And even if you would have prefixed the value with :byte, there > won't be > an error. In dbusbind.c, byte values are simply computed by > taking the > modulo 255: > > unsigned char val = XFIXNAT (object) & 0xFF; > > ":byte 1024" is equal to ":byte 4". Similar conversions happen > for the > other basic types, based on numbers. Good. I haven't thought deeply enough about DBus to anticipate truncation. I've added a test for this, an extract of which is below. The get returns nil instead of 4. I can change the expected value, but wanted to run this by you first. > Maybe we could add some tests for these conversions? Since they > are not > restricted to property handling, (a) new test(s) dbus-test01-* > would help. I'll have a look. >>> Implementation is more complex than expected. Due to its >>> nature, >> But I have no objection to a parallel instance to gather >> request >> signatures. > > I don't know where we end up. I'm still poking around how to > implement a > second connection to the same bus. If it is not too expensive to > implement I'd prefer this. Fair enough. Your call. >> Which raises the question, should dbus-set-property function >> call fail >> for a local property that isn't :readwrite, or should that only >> be >> prevented by incoming messages? > > dbus-set-property doesn't know, whether a property is registered > locally. I guess an error reply is reasonable, whether the > property is > registered locally, or not. Would be nice. Unless it adds overhead, like an introspection. >> Do we require that dbus-register-property be used to update a >> :read >> access property. > > dbus-set-property shall fail when the property has :read > access. Yes, > such a property can be changed only by > dbus-register-property. But :read > access is intended to tell the clients, that they shouldn't > change the > property; an error in dbus-set-property (returning nil, > respectively) is > appropriate. Cool. I mentioned an additional test above. The get below, extracted from the larger test, returns nil instead of 4: (ert-deftest dbus-test-ad-hoc () (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) (dbus-register-service :session dbus--test-service) (should ; Test value truncation (equal (dbus-register-property :session dbus--test-service dbus--test-path dbus--test-interface "ByteValue" :read :byte 1024) `((:property :session ,dbus--test-interface "ByteValue") (,dbus--test-service ,dbus--test-path)))) (should ; Returns 0 instead of 4. (equal (dbus-get-property :session dbus--test-service dbus--test-path dbus--test-interface "ByteValue") 4)) (dbus-unregister-service :session dbus--test-service)) Should I update the expectation to zero? > Best regards, Michael. Cheers, Hugh From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 20 11:06:15 2020 Received: (at 43252) by debbugs.gnu.org; 20 Sep 2020 15:06:15 +0000 Received: from localhost ([127.0.0.1]:52413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK0uf-0003XU-1X for submit@debbugs.gnu.org; Sun, 20 Sep 2020 11:06:15 -0400 Received: from mout.gmx.net ([212.227.17.20]:37995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK0ub-0003XC-9F for 43252@debbugs.gnu.org; Sun, 20 Sep 2020 11:05:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600614349; bh=t8l1/Q20wXywlgWS4MLLxR63k7eu39rSvA/pZYImsfI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=QbAoFzkD/LR7B79S1KQrl6UT56VcFxwVWWj64QXYLxg98963o1+89zABqxtenyaV/ JG6p07SOmxMLomMp3MjjmAx697wsXscbCfUufmODS/+hNRAWUpu3qciofc1uPwESAL zwwZJRHXUSzY++GLRt1o3Q/A7FzkRNuHlm5Dvdfo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.57.201]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MIx3C-1k3z7v0HjW-00KP9u; Sun, 20 Sep 2020 17:05:49 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87sgbtqylc.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Sun, 20 Sep 2020 17:05:47 +0200 In-Reply-To: <875z8aa1bm.fsf@ccss.com> (Hugh Daschbach's message of "Fri, 18 Sep 2020 20:32:29 -0700") Message-ID: <87ft7c8p4k.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:iPDvAn12uKyupFK//+iJBr2Tdcgt8+sXIyOuCHSXT8Vku38Xnq3 mp2Dd11/NoA4jpxQ0GnacVAAAe1UGyBQf10XZY9UA06PbELRBWpMVJOFbw1+IDoKunXNeMh 07wl11ncFw1/dx7qvUY3Aix0ZtsTt9XSPaTk0YuKLY7YTEohAZ+P3X1wgTDVx48HD/qikYb K0IgOIE3b84SLMLm0zgyw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:j/h2xNHwwPQ=:u4qhEa4Ezg0zwvre40sntJ NiUCmlKBlKJMoi42ThwBLLzeM+W3gzj0ehmd/jBJAl4hVEDGgVWv6MmBRQD/eVH5z+izlPNYD JG+HOJfbESC3A+gCGQ0ymzKAMXJ4ZDLqDGETS3ipcyUJKCgGqyu+XQhPAt3JDZLkTlgLw/sps CG8PZENGYbuz6qXp1xP9sp/7YMWoIaA7T5/v/3QKTt2lOD9x51ILX1QBoh1yxC+c3bte1P/IM T2519OKn4zu2iDP1IT4eK0DTCmAPUQzl3VpLQ6u4xhH7Co5xALVyBNnq4FZYsbpIuq4IObqK7 DTIyoz1JFphgxj6E1dXPBOFs6OLm+2mDaP8pc4uiosilHRd/uDY2v29PJCNoHgTaov7M4B8rk AR/W7rRuMKG9uo14LV6O6P0oDBJ4p7CF5jtJVNYZo5Q6VByx/79XY99nQTEpsh1u5yxUdFRvT QiKQrAsANuO4CfXJVBfNx0Axn+gJwjdJEtnsEyG4n3fOF6pjC+58kzV8B9IhIOi3htvbMUqW8 etvkp9zhgGN0l2hcziV04d7K9KWdyQM9cA1OOu/s0KLuI5nP+6m+Taqqpz45cS3DaieP686iZ 3rsKpR59Tdz68i+SRB64kAl6qBeaIVWGVOb2jb5KmtY+/6sgJ2CemBcYn/Iq3VQIxL1V/6bcl tbqWKqzuaRbUC61Sud64Xg5RF3Kl6wmgvEWkrBOO7UKmDFxmb66KTzxJAHtJ0Ed2KeBvI5vFi QCj64miisaei7rBNRG3WnT3iYCDfyCoQlT1Hb6MqEBWqSen3kdoTnXZyU/jNTOiXqcad35x5f VozNiG855CxQEv9vUaJiMZ2zmnfK6z3lhOX6CGVzaT/zg1dAlFTT6ZI1ZvwI7EZl2J96mSz+K MX4hqFBYxvbGiZPGDsFgKnp4beyOynNFikVO8CGPWVrA9yeQJ6LsySyMFjMVXqkbBvbb+jItQ M7QcYYAheWlajlXfpvHLY8i5QL2I4COwuufxckuHxwyZJL//fujYIAWHtVSkN9c9SMEycugIG t4S6f5kZc5NgjqC7mVHiDIBTq6KCbHifqfT7ZZjHCrIAIf2jw6LAQHoUPNrHusK+oV2Mx805A 8pOgsQyewwwYlF524Ealnv+9nsGVEjxSEmsZe1kmQL05M8rSIDk6z2NbI2+FvMhUKylbNCJwf 5epQVhWL4jNqFs3q5ynHCSmxwdfDyLqPamow4WYqS74McZowpGX+JsAWUYGziot16Hx4ZP5vQ aXbbQ+G0/1su+ir6CIQ2tVB+ekaBN/otnxYRyiA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hugh Daschbach writes: Hi Hugh, >>> + >>> + (should ; Should this error >>> instead? >>> + (equal >>> + (dbus-set-property >>> ... >>> + '(:array "seven" "eight" :string "nine")) >> >> Good question. dbus-set-property and dbus-get-property do not >> propagate >> D-Bus errors. Maybe we shall change the functions to do so? I've >> asked >> this already myself. > > I don't have a strong opinion either way. I'm just trying to note > corner cases. Well, I have adapted dbus-set-property and dbus-get-property to propagate the errors. >>> + ;; Test mismatched types in array >>> + >>> + (should ; Oddly enough, register >>> works, but get fails >>> + (equal >> >> Hmm, yes. dbus-register-property does not perform a local type >> check. And honestly, I don't want to do it; I let the D-Bus daemon >> do >> the job. > > Great. Should be checked now. When dbus-register-property is called, it applies internally a dbus-set-property or dbus-get-property now. As side effect, the value is checked by the D-Bus daemon, and you shall see errors. >> And even if you would have prefixed the value with :byte, there >> won't be >> an error. In dbusbind.c, byte values are simply computed by taking >> the >> modulo 255: >> >> unsigned char val = XFIXNAT (object) & 0xFF; >> >> ":byte 1024" is equal to ":byte 4". Similar conversions happen for >> the >> other basic types, based on numbers. > > Good. I haven't thought deeply enough about DBus to anticipate > truncation. I've added a test for this, an extract of which is below. > The get returns nil instead of 4. I can change the expected value, > but > wanted to run this by you first. Of course I'm wrong, ":byte 1024" shall be the same as "byte 0". > (ert-deftest dbus-test-ad-hoc () > (dbus-ignore-errors (dbus-unregister-service :session > dbus--test-service)) > (dbus-register-service :session dbus--test-service) > (should ; Test value truncation > (equal > (dbus-register-property > :session dbus--test-service dbus--test-path > dbus--test-interface "ByteValue" :read :byte 1024) > `((:property :session ,dbus--test-interface "ByteValue") > (,dbus--test-service ,dbus--test-path)))) > > (should ; Returns 0 instead of 4. > (equal > (dbus-get-property > :session dbus--test-service dbus--test-path > dbus--test-interface "ByteValue") > 4)) Of course 0. As said, I was wrong. > (dbus-unregister-service :session dbus--test-service)) > > Should I update the expectation to zero? Yes, please. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 07:50:16 2020 Received: (at 43252) by debbugs.gnu.org; 21 Sep 2020 11:50:16 +0000 Received: from localhost ([127.0.0.1]:53576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKKKm-00005b-Eq for submit@debbugs.gnu.org; Mon, 21 Sep 2020 07:50:16 -0400 Received: from mout.gmx.net ([212.227.15.15]:48465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKKKj-00005J-3W for 43252@debbugs.gnu.org; Mon, 21 Sep 2020 07:50:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600689005; bh=upJGNGijGZf7HH9rBsxE4PqAS5ILl6WVa4O+mpEvKb4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=QXCue5Ub4YesiwhLeTAsmgud9201KKTp/D0Fwa8y2hzB/oMCTgIAKhiuCUheulPus m1aEtaAaK1ReC6Cf7AaSmIsIkEatOXpsJQQc62X2vxetDtUUR1YqZd2grgNlxZEwTW 4EF6Lb0Zkqq3R+ooaKJo9ELFSiQpz9iicksjU6YI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.51.194]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MgNcz-1kxVMw09tf-00hrp2; Mon, 21 Sep 2020 13:50:05 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <87sgbtcvqs.fsf@gmx.de> <87pn6xqtsz.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> Date: Mon, 21 Sep 2020 13:50:03 +0200 In-Reply-To: <87ft7c8p4k.fsf@gmx.de> (Michael Albinus's message of "Sun, 20 Sep 2020 17:05:47 +0200") Message-ID: <87imc7jqms.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:6K48LPfJi0sg/kZMaAZVvYZgoP2BdtArGPWzvjrcryzWoI9dr5Q tvL2tMrm0veggnJWDJXZVYH8r/aNLigVq9+75TFU5jUyqpN/ngZp5rAbySw7sjIKzxLKqW+ sElXacaKzDkpkpr/zlcMeGKZ3inabRAsE85jEn0BsPFIQdBkC/Jnftm3POaRlZxqXFg7e2J n+VvnYEZHqHCVjNVkd16g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ioj8lJgR+AQ=:OX2MkZVqPzc9TL6NJ648ey 8Ov+MdZyfwgYacTqy7FxNi9T0U5wIw87KwwiTeDrsd2BGylHXTA6opzsg6OZ7njtzwJQ9EmCd 8YREi8bXf8aJcuJU5HyTLj9ghAjhfBjEpWrTsHhTHDTPfLnyDQuZBHVO1wVzGbi3rLqzVbBWy 7vZTPTPsEhO1lpebyCdFDGin58JAmHHc0AmGT+NHdlydUlgp2cGsiwawoYns2Gc+qwfeGKj/Z kQzzqe9+e8gRnxSSKegSYo8h7uPoZI2tpvejNpdpa96bF/dcL3drrwuF8AEK2nNvryXEybOGv yot5zz3FgCXEp4ggI4VVxjXrA6QQpuhmBWtTTNhVqUiUKV2DDpxMkmnzitwxWC/bqLBQ1Ajv5 XppEsk2bN2fYB6OeWFisAKdqQWVRUQp7KPMlj8h9pE4V1OY+VDYxm4OMbdWgpYVdg9HGaldP2 MRKVpWZOtX8rj2/0HK4dniitoLYJJxKLTY+kP2YC3rqAd6nDCrermtcW2gk8s9FJf0Jmon7WY xhc7VGWHux2baf5+ZYLLKl7/AwfzZIO1aywDA6sfFp16AcOctz2T672yLI4POx2tZ2XrQ5JTw Xn6+ZfhXmdIYVgiBF1hhxlruiy80ixr/DvKSN9aiH4atV0aV23+npNEPkjy8oauUteqe2G4vp lt9fPbf+L0AumuGJjW6musIjnO9gIc6o0k4t4ZtzocFIlOwhbgKJkcYGx1Pj/ObbzF4hQA2vS 3ej5p04h4eXLQ+qQuqAVeZfKxCpPpxNQ5HrggRFxB1c0gF0l9Pe4PWJbhRe6n5T3a75K3U0aI JytoFJ1d2DR30/wPD0/OE+vMs5NmClnalyXMNfdW0lCBU3TCO3v+VDqll79LPESQte00sHO6X 4/2K4QZp7/unpyb1THg65GyICzkOw766oR94gIAp48VZd748FZO6X5AXjUj9N9tvthk06KJRF qtsuHoPXjN/nuXTZHA+Cjh/eBP9pAEF9Id+fqP/10jFiQLb07fXF8ebbo0UDBZ9fRI4QjXbOL ZELkrkCYqmJl//si7DPyP5dovfqstM3ytr3w+AGasf1yEjC/WwtrCJB3sPXpDQXPnCt/KaR3z IA/PIvbYfwMxkTVH1BX74Qazi8ri6/yUMi69IwwkEGTIfa8C0IDV2N2Q1788v69qnPwToaw/m odSAAZCIkYxvsJ4KlBxnDM18n7Se9nmz5NlzuPVsAGmjBL+ZI1IosN3u70OfhJT3LnTrif04+ /+2ZrBUx1Js3Ci/mA5R1vR9+on+hRTxmCZWWyWg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Hugh, just FTR, I have added test cases dbus-test01-basic-types and dbus-test01-compound-types. They use the recently added function dbus-check-arguments, which generates a new D-Bus message, but without sending it. As side effect, we get errors from dbusbind.c in case of. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 23:49:15 2020 Received: (at 43252) by debbugs.gnu.org; 22 Sep 2020 03:49:15 +0000 Received: from localhost ([127.0.0.1]:56856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKZIo-0003Zj-8c for submit@debbugs.gnu.org; Mon, 21 Sep 2020 23:49:15 -0400 Received: from mail1.ccss.com ([159.203.255.73]:59216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKZIk-0003ZS-3H for 43252@debbugs.gnu.org; Mon, 21 Sep 2020 23:49:13 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 213E8BF881; Mon, 21 Sep 2020 20:49:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 8C2AABF87C; Mon, 21 Sep 2020 20:49:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 6501D1761272; Mon, 21 Sep 2020 20:49:02 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YFEkyGwiScPx; Mon, 21 Sep 2020 20:48:59 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 45E0A176064A; Mon, 21 Sep 2020 20:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600746539; bh=E20j0byldW9USvFrGOSrvpwfLgLkouds1byvhsR3UBc=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=eV3TNdSQCBSUfWjpJdpMTDEDF4BRoiL9P41MQt5KvYsaTQHGJO1etoroPXalu9k5+ aAmvTGRTa9xEZfcC+N/kZIokao6sWDZpn3kvhgvQ4NbdPmeqUIDM0AFSROG8M+YG2v u9i+k84vKH7PQlPWBuvQeywdxmgNTlq7NJF8HAp02ic5CN6BRJGmj1Yszd5oapz8Oo Au4KeIJQFzwGIVvqnKHfKNQjqmbTB+vqW/y3810XPFfBhFRCOjGb3U7rsPInqpmdbg ZtT34qSESTgdIEPCtEDIPdARLPr4UxgXL6p9tIVbzaYMG2JS4CFd8DOykcgn5j/Gi4 a+FUWos300gLw== References: <87v9gqquct.fsf@ccss.com> <87pn6xqtsz.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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87imc7jqms.fsf@gmx.de> Date: Mon, 21 Sep 2020 20:48:58 -0700 Message-ID: <87zh5i8o9h.fsf@ccss.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; format=flowed Michael Albinus writes: > Hi Hugh, > > just FTR, I have added test cases dbus-test01-basic-types and > dbus-test01-compound-types. They use the recently added function > dbus-check-arguments, which generates a new D-Bus message, but > without > sending it. As side effect, we get errors from dbusbind.c in > case of. > > Best regards, Michael. Thanks for the heads up. I noticed the error messages. Happy to ignore them. I have attached two patches for your review. I think the property tests are complete; I've adjusted the tests to expect errors on register or set rather than get. The other patch is my first draft for testing introspection. 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. And, of course, let me know what you think should be reworked. Thanks, Hugh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Property-tests-ERT.patch Content-Description: Candidate patch for additional property tests. >From f3f1f07d94676a22842b04a050231639edf2ec29 Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Thu, 17 Sep 2020 23:19:32 -0700 Subject: [PATCH 1/2] Property tests (ERT). Add DBus tests to validate property handling. Includes cycling register, get, set, get, GetAll, and GetManagedObjects over several property types. Add tests that should fail, like setting a property with a type different from it's type at registration time. --- test/lisp/net/dbus-tests.el | 271 ++++++++++++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 62ed3f2bfb4..993a2e3848a 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -1004,6 +1004,277 @@ dbus-test06-register-property-emits-signal ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(defsubst dbus--test-run-property-test (selector name value expected) + "Generate a property test: register, set, get, getall sequence. +This is a helper function for the macro `dbus--test-property'. +The argument SELECTOR indicates whether the test should expand to +'dbus-register-property' (if SELECTOR is 'register) or +`dbus-set-property' (if SELECTOR is 'set). +The argument NAME is the property name. +The argument VALUE is the value to register or set. +The argument EXPECTED is a transformed VALUE representing the +form `dbus-get-property' should return." + (cond + ((eq selector 'register) + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface name :readwrite value) + `((:property :session ,dbus--test-interface ,name) + (,dbus--test-service ,dbus--test-path))))) + + ((eq selector 'set) + (should + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface name value) + expected))) + + (t (signal 'wrong-type-argument "Selector should be 'register or 'set."))) + + (should + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface name) + expected)) + + (let ((result + (dbus-get-all-properties + :session dbus--test-service dbus--test-path + dbus--test-interface))) + (should (equal (cdr (assoc name result)) expected))) + + (let ((result + (dbus-get-all-managed-objects :session dbus--test-service "/")) + result1) + (should (setq result1 (cadr (assoc dbus--test-path result)))) + (should (setq result1 (cadr (assoc dbus--test-interface result1)))) + (should (equal (cdr (assoc name result1)) expected)))) + + +(defsubst dbus--test-property (name &rest value-list) + "Test a DBus property named by string argument NAME. + +The argument VALUE-LIST is a sequence of pairs, where each pair +represents a value form and an expected returned value form. The +first pair in VALUES is used for `dbus-register-property'. +Subsequent pairs of the list are tested with +`dbus-set-property'." + (let ((values (car value-list))) + (dbus--test-run-property-test + 'register + name + (car values) + (cdr values))) + (dolist (values (cdr value-list)) + (dbus--test-run-property-test + 'set + name + (car values) + (cdr values)))) + +(ert-deftest dbus-test06-test-property-types () + "Check property access and mutation for an own service." + (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 + (progn + (dbus--test-property + "ByteArray" + '((:array :byte 1 :byte 2 :byte 3) . (1 2 3)) + '((:array :byte 4 :byte 5 :byte 6) . (4 5 6))) + + (dbus--test-property + "StringArray" + '((:array "one" "two" :string "three") . ("one" "two" "three")) + '((:array :string "four" :string "five" "six") . ("four" "five" "six"))) + + (dbus--test-property + "ObjectArray" + '((:array + :object-path "/node00" + :object-path "/node01" + :object-path "/node0/node02") . + ("/node00" "/node01" "/node0/node02")) + '((:array + :object-path "/node10" + :object-path "/node11" + :object-path "/node0/node12") . + ("/node10" "/node11" "/node0/node12"))) + + (dbus--test-property + "Dictionary" + '((:array + :dict-entry (:string "four" (:variant :string "value of four")) + :dict-entry ("five" (:variant :object-path "/nodex")) + :dict-entry ("six" (:variant (:array :byte 4 :byte 5 :byte 6)))) . + (("four" + ("value of four")) + ("five" + ("/nodex")) + ("six" + ((4 5 6))))) + '((:array + :dict-entry (:string "key0" (:variant (:array :byte 7 :byte 8 :byte 9))) + :dict-entry ("key1" (:variant :string "value")) + :dict-entry ("key2" (:variant :object-path "/node0/node1"))) . + (("key0" + ((7 8 9))) + ("key1" + ("value")) + ("key2" + ("/node0/node1"))))) + + (dbus--test-property + "ByteDictionary" + '((:array + (:dict-entry :byte 8 (:variant :string "byte-eight")) + (:dict-entry :byte 16 (:variant :object-path "/byte/sixteen")) + (:dict-entry :byte 48 (:variant (:array :byte 8 :byte 9 :byte 10)))) . + ((8 ("byte-eight")) + (16 ("/byte/sixteen")) + (48 ((8 9 10)))))) + + (dbus--test-property + "Variant" + '((:variant "Variant string") . ("Variant string")) + '((:variant :byte 42) . (42)) + '((:variant :uint32 1000000) . (1000000)) + '((:variant :object-path "/variant/path") . ("/variant/path")) + '((:variant :signature "a{sa{sv}}") . ("a{sa{sv}}")) + '((:variant (:struct 42 "string" (:object-path "/structure/path") (:variant "last"))) . + ((42 "string" ("/structure/path") ("last"))))) + + ;; Test that :read prevents writes + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray" :read + '(:array "one" "two" :string "three")) + `((:property :session ,dbus--test-interface "StringArray") + (,dbus--test-service ,dbus--test-path)))) + + (should-error ; Cannot set property with :read access + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray" + '(:array "seven" "eight" :string "nine")) + nil)) + + (should-not + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray") + '("seven" "eight" "nine"))) + + (should ; Verify property has registered value + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray") + '("one" "two" "three"))) + + ;; Test mismatched types in array + + (should-error + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "MixedArray" :readwrite + '(:array + :object-path "/node00" + :string "/node01" + :object-path "/node0/node02")) + `((:property :session ,dbus--test-interface "MixedArray") + (,dbus--test-service ,dbus--test-path)))) + + ;; Test integer overflow + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" :readwrite + :byte 128) + `((:property :session ,dbus--test-interface "ByteValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 128)) + + (should ; dbus-set-property may change property type + (= + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" 1024) + 1024)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 1024)) + + (should + (= + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" :byte 520) + 8)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 8)) + + (should ; Another change property type + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" :boolean t) + t)) + + (should + (eq + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + t)) + + ;; Test invalid type specification + + (should-error + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "InvalidType" :readwrite + :keyword 128) + `((:property :session ,dbus--test-interface "InvalidType") + (,dbus--test-service ,dbus--test-path))))) + + + ;; Cleanup. + + + (message "cleanup") + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Draft-introspection-tests.patch Content-Description: First cut approximation of Introspection tests. >From 41ad18f0094740220d5df62c656dc09cf4c18c97 Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Mon, 21 Sep 2020 17:12:49 -0700 Subject: [PATCH 2/2] Draft introspection tests. Define an Introspection interface. Then use dbus-introspect-* methods to examine and verify the elements of the interface. --- test/lisp/net/dbus-tests.el | 362 ++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 993a2e3848a..e047dcc5fae 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -1275,6 +1275,368 @@ dbus-test06-test-property-types (message "cleanup") (dbus-unregister-service :session dbus--test-service))) +(defun dbus--test-introspect () + "Return test introspection string." + " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +") + +(defsubst dbus--test-examine-interface (iface-name + expected-properties + expected-methods + expected-signals + expected-annotations) + "Validate an interface definition for `dbus-test-07-test-introspection'. +The argument IFACE-NAME is a string naming the interface to validate. +The arguments EXPECTED-PROPERTIES, EXPECTED-METHODS, EXPECTED-SIGNALS, and +EXPECTED-ANNOTATIONS represent the names of the interface's properties, +methods, signals, and annotations, respecively." + + (let ((interface (dbus-introspect-get-interface + :session + dbus--test-service + dbus--test-path + iface-name))) + (pcase-let ((`(interface ((name . ,name)) . ,rest) interface)) + (should + (string-equal name iface-name)) + (should + (string-equal name (dbus-introspect-get-attribute interface "name"))) + + (let (properties methods signals annotations) + (mapc (lambda (x) + (let ((name (dbus-introspect-get-attribute x "name"))) + (cond + ((eq 'property (car x)) (push name properties)) + ((eq 'method (car x)) (push name methods)) + ((eq 'signal (car x)) (push name signals)) + ((eq 'annotation (car x)) (push name annotations))))) + rest) + + (should + (equal + (nreverse properties) + expected-properties)) + (should + (equal + (nreverse methods) + expected-methods)) + (should + (equal + (nreverse signals) + expected-signals)) + (should + (equal + (nreverse annotations) + expected-annotations))))) + ;; should we examine method and signal arguments here as well? + ;; or is it sufficient to test arguments from dbus-introspect-get-(method|signal)? + ) + +(defsubst dbus--test-validate-annotations (annotations expected-annotations) + "Validate a list of DBus ANNOTATIONS. +Ensure each string in EXPECTED-ANNOTATIONS names an element of ANNOTATIONS. +And ensure each ANNOTATIONS has a value attribute marked \"true\"." + (mapc + (lambda (annotation) + (let ((name (dbus-introspect-get-attribute annotation "name")) + (value (dbus-introspect-get-attribute annotation "value"))) + (should + (member name expected-annotations)) + (should + (equal value "true")))) + annotations)) + +(defsubst dbus--test-examine-property (interface + property-name + expected-annotations + &rest expected-args) + "Validate a property definition for `dbus-test-07-test-introspection'. + +The argument INTERFACE is a string naming the interface owning PROPERTY-NAME. +The argument PROPERTY-NAME is a string naming the property to validate. +The arguments EXPECTED-ANNOTATIONS represent the names of the property's properties. +The argument EXPECTED-ARGS is a list of expected arguments for the property." + (let* ((property (dbus-introspect-get-property + :session + dbus--test-service + dbus--test-path + interface + property-name)) + (name (dbus-introspect-get-attribute property "name")) + (type (dbus-introspect-get-attribute property "type")) + (access (dbus-introspect-get-attribute property "access")) + (expected (assoc-string name expected-args))) + (should-not (equal expected nil)) + + (should + (string-equal name property-name)) + + (should + (string-equal + (nth 0 expected) + name)) + + (should + (string-equal + (nth 1 expected) + type)) + + (should + (string-equal + (nth 2 expected) + access)))) + +(defsubst dbus--test-validate-m-or-s (tree expected-annotations expected-args) + "Validate a method or signal definition for `dbus-test-07-test-introspection'. +The argument TREE is an sexp returned from either `dbus-introspect-get-method' +or `dbus-introspect-get-signal' +The arguments EXPECTED-ANNOTATIONS is an sexp matching the annotations defined +for the method or signal. +The argument EXPECTED-ARGS is a list of expected arguments for +the method or signal." + (let (args annotations) + (mapc (lambda (elem) + (let ((name (dbus-introspect-get-attribute elem "name"))) + (cond + ((eq 'arg (car elem)) (push elem args)) + ((eq 'annotation (car elem)) (push elem annotations))))) + tree) + (should + (equal + (nreverse args) + expected-args)) + (dbus--test-validate-annotations annotations expected-annotations))) + +(defsubst dbus--test-examine-signal (interface + signal-name + expected-annotations + &rest expected-args) + "Validate a signal definition for `dbus-test-07-test-introspection'. + +The argument INTERFACE is a string naming the interface owning SIGNAL-NAME. +The argument SIGNAL-NAME is a string naming the signal to validate. +The arguments EXPECTED-ANNOTATIONS represent the names of the signal's properties. +The argument EXPECTED-ARGS is a list of expected arguments for the signal." + (let ((signal (dbus-introspect-get-signal + :session + dbus--test-service + dbus--test-path + interface + signal-name))) + (pcase-let ((`(signal ((name . ,name)) . ,rest) signal)) + (should + (string-equal name signal-name)) + (should + (string-equal name (dbus-introspect-get-attribute signal "name"))) + (dbus--test-validate-m-or-s rest expected-annotations expected-args)))) + + +(defsubst dbus--test-examine-method (interface + method-name + expected-annotations + &rest expected-args) + "Validate a method definition for `dbus-test-07-test-introspection'. + +The argument INTERFACE is a string naming the interface owning METHOD-NAME. +The argument METHOD-NAME is a string naming the method to validate. +The arguments EXPECTED-ANNOTATIONS represent the names of the method's properties. +The argument EXPECTED-ARGS is a list of expected arguments for the method." + (let ((method (dbus-introspect-get-method + :session + dbus--test-service + dbus--test-path + interface + method-name))) + (pcase-let ((`(method ((name . ,name)) . ,rest) method)) + (should + (string-equal name method-name)) + (should + (string-equal name (dbus-introspect-get-attribute method "name"))) + (dbus--test-validate-m-or-s rest expected-annotations expected-args)))) + +(ert-deftest dbus-test07-test-introspection () + "Register an Introspection interface then query it." + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + (dbus-register-service :session dbus--test-service) + + ;; Prepare introspections response + (dbus-register-method :session dbus--test-service + dbus--test-path + dbus-interface-introspectable + "Introspect" + 'dbus--test-introspect) + + (unwind-protect + ;; dbus-introspect-get-node-names + (should + (equal + (dbus-introspect-get-node-names :session dbus--test-service dbus--test-path) + '("node0" "node1"))) + + ;; dbus-introspect-get-all-nodes + + (should + (equal + (dbus-introspect-get-all-nodes :session dbus--test-service dbus--test-path) + (list dbus--test-path (concat dbus--test-path "/node0") (concat dbus--test-path "/node1")))) + + ;; dbus-introspect-get-interface-names + + (let ((interfaces (dbus-introspect-get-interface-names + :session + dbus--test-service + dbus--test-path))) + + (should + (equal + interfaces + `(,dbus-interface-introspectable + ,dbus-interface-properties + ,dbus--test-interface))) + + (dbus--test-examine-interface + dbus-interface-introspectable + nil + '("Introspect") + nil + nil) + + ;; dbus-introspect-get-interface via `dbus--test-examine-interface' + (dbus--test-examine-interface + dbus-interface-properties + nil '("Get" "Set" "GetAll") '("PropertiesChanged") nil) + + (dbus--test-examine-interface + dbus--test-interface + '("Connected" "Player") + '("Connect" "DeprecatedMethod0" "DeprecatedMethod1") + nil + '("org.freedesktop.DBus.Deprecated"))) + + ;; dbus-introspect-get-method-names + + (let ((methods (dbus-introspect-get-method-names + :session + dbus--test-service + dbus--test-path + dbus--test-interface))) + (should + (equal + methods + '("Connect" "DeprecatedMethod0" "DeprecatedMethod1"))) + + ;; dbus-introspect-get-method via 'dbus--test-examine-method + (dbus--test-examine-method + dbus--test-interface + "Connect" + nil + '(arg ((name . "uuid") (type . "s") (direction . "in"))) + '(arg ((name . "mode") (type . "y") (direction . "in"))) + '(arg ((name . "options") (type . "a{sv}") (direction . "in"))) + '(arg ((name . "interface") (type . "s") (direction . "out")))) + + (dbus--test-examine-method + dbus--test-interface + "DeprecatedMethod0" + '("org.freedesktop.DBus.Deprecated")) + + (dbus--test-examine-method + dbus--test-interface + "DeprecatedMethod1" + '("org.freedesktop.DBus.Deprecated"))) + + ;; dbus-introspect-get-signal-names + + (let ((signals (dbus-introspect-get-signal-names + :session + dbus--test-service + dbus--test-path + dbus-interface-properties))) + (should + (equal + signals + '("PropertiesChanged"))) + + ;; dbus-introspect-get-signal via 'dbus--test-examine-signal + (dbus--test-examine-signal + dbus-interface-properties + "PropertiesChanged" + nil + '(arg ((name . "interface") (type . "s"))) + '(arg ((name . "changed_properties") (type . "a{sv}"))) + '(arg ((name . "invalidated_properties") (type . "as"))))) + + ;; dbus-intropct-get-property-names + + (let ((properties (dbus-introspect-get-property-names + :session + dbus--test-service + dbus--test-path + dbus--test-interface))) + (should + (equal + properties + '("Connected" "Player"))) + + ;; dbus-introspect-get-property via 'dbus--test-examine-property + (dbus--test-examine-property + dbus--test-interface + "Connected" + nil + '("Connected" "b" "read") + '("Player" "o" "read")))) + + (dbus-unregister-service :session dbus--test-service)) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 22 12:09:29 2020 Received: (at 43252) by debbugs.gnu.org; 22 Sep 2020 16:09:29 +0000 Received: from localhost ([127.0.0.1]:33073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKkrA-0004rU-MS for submit@debbugs.gnu.org; Tue, 22 Sep 2020 12:09:28 -0400 Received: from mout.gmx.net ([212.227.15.15]:52763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKkr8-0004rF-L2 for 43252@debbugs.gnu.org; Tue, 22 Sep 2020 12:09:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600790958; bh=1EFcLgIRmT4xjOXduUaeizCwImgBvN4u/5FrYyAc3Jg=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date; b=H/aizERAtNpFbsTjgqKqmlyJmn1G7IDJ4ahXmbAGjU8XG7j53GmZbIVMBNSFNiAhs CcU4tgk3ThunkQTLEVTqyJM4Jm2MbZpZ08sAvvQMFP8TQJMq4rBlabThLA6kjWyrOl PgrBkYiv59+6p3rMJgngEpB+rKgK5JkMDAo+J9vc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.46.195]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MrQEn-1kqVEP2UDf-00oVH1; Tue, 22 Sep 2020 18:09:18 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides 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> Date: Tue, 22 Sep 2020 18:09:17 +0200 Message-ID: <87k0wl6bf6.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:YG9D1+l9n+juahjpl9NC4VhhPToh3W9QxEvlaaRq9qnprpV6ZCm 8o+6jGPCPYpuI2s+a7JB7DxPWyTTmc6UFOtGAuIal8HK7AO/kTjnr6n5GS+nqIA9Ci6De2m GsOhej7r8OOQ65Dzr0mw3V73ywcgFihpAuDH06Nb1U7zLcylJNbqsKg6IF7MzMlqXd71tcg j12SCDIcqz4XKfHZioB1A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:99zFPcAdCS4=:vb0FyVbYn8QtaAvTD78d3M xb0Wn80LvP03MT349bt/CmTFbFLowrqWKDgTv3w9joke8UqPcx3Ri0u/GvU68Va0TudX73Fmq 2x3R+OQd5NybksqG4z6VB+qfi5cK03IjpI2q/wV/FkexHKAG2y/IfszkwVUg1Lbe3B1EXzgM4 bUUSRHgbb9ktoKiZJW4zy5Ah+Niwep7nNYphWL9fmPWxJNCDOdsZstBcCv1RHpa4Pmpe95DBl YvtrvjAiFkNSVRXdDXwzzgW2Q5bpiLyVIzoaQfqd1VuwbxUXkyJx+2MtsR3WRczSZ+OP75E/N aOmRxm3FE765MGIPHHQBvIVF8pWG6KcTYebUqLb6NcHc8+NkEtrFE0y//SL0kbs1c9huWO9YR eGy3WXMYVmD4ijE5iXbqUMOq0yzvtA2CCAenkrx5f17uaoIljSJUQoa0Qvw4yRQxLeH1BETY0 BS6CX6GTHirO/DONB+lVJIYuCEoIKONLkuLSm82j93ikD3a4U9u5+0SUGtvyQ+ugyDKRnv/J4 aRCsTCidGggnJg4PwXYLJ9ztjrOSDUbDMVZ9OqUBO4eW1ZP6unLRmW22BFHMbjfZzEWwqhmF7 oaaph9sLb3Li7xcj9s/+8Ht2HxjcqnChRRLFmeRxtbMI7hndH2/w7KFnSgGLcrNXMbulMamk0 eynG7lbjkL8c7xqAeAlq/y8n9F07hXNJbTra8nhjVuOHLaZQNHpPXywOe8FtOqdULY+tkkc7h uiGTQeIiNP4VkpTNwh34lNJHsKsXAzlJj01kMKVvkkmXfYhYAMqkzdTNRzqoPLEMOM/HcVi+t olRPXvsuaJXOntil/hrERZk6k/woh2vJm5HNG4dwCACdPaVnAAcAMXWvvQVCKG0240sFGUBtM 6/0iag3n8VJOfIZbpW2V0vxuGkgw+mudJ5rPOfMYrssRnamQ4ryZhFeWqKhXTfRv5OgLmpeFV ljiYqWCFAOm2mdPeOBKX0Yr3bbihN76ZXHOqEInqBzCyzbIcDkp1lE26+bI9fT/2wvtxLphyl PY0nR8SWJgSxjIkSik/d/BiCjaenDNxTiuK+JmdtDbnXp2s8dbH+q/6pQnK4eWTsAODZUeOlg acyJl/FXzXazBGRO2iOyracsb6QZs1Tn2XW6esa7Rn3FNaWHm5NcXNm1PhKFv+2KxVYEQ5M3p 1fnI5P3yIyUJ03bbs5omKsTRsbj35SUu1CFwM5VgLzFRnTBJp6bgHgmNhY/vWiFD+FlMZWFWt D01yZuOjQuzwCDYilMB9s43dhPf1xu6Hub9QdKQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, > I have attached two patches for your review. I think the property > tests are complete; I've adjusted the tests to expect errors on > register or set rather than get. Thanks for this. AFAICS, there's nothing left open for bug#43252; I'd like to close it. Is this OK for you? > And, of course, let me know what you think should be reworked. There are only some nits left to comment. > Add DBus tests to validate property handling. Includes cycling We call this beast D-Bus, with a hyphen. Here and everywhere in the docstrings and comments. > register, get, set, get, GetAll, and GetManagedObjects over > several property types. > > Add tests that should fail, like setting a property with a type > different from it's type at registration time. We add also a ChangeLog style entry to the commit message, see the git log of dbus-tests.el. > +The argument SELECTOR indicates whether the test should expand to > +'dbus-register-property' (if SELECTOR is 'register) or `dbus-register' (if SELECTOR is `register') or > +(ert-deftest dbus-test06-test-property-types () The "-test" part of the name seems to be superfluous; I'd call it dbus-test06-property-types. (You see, just nitpicks :-) > + (dbus--test-property > + "Dictionary" > + '((:array > + :dict-entry (:string "four" (:variant :string "value of four")) > + :dict-entry ("five" (:variant :object-path "/nodex")) > + :dict-entry ("six" (:variant (:array :byte 4 :byte 5 :byte 6)))) This is one possibility to declare a :dict-entry. The other possibility, with the same result, is '((:array (:dict-entry :string "four" (:variant :string "value of four")) (:dict-entry "five" (:variant :object-path "/nodex")) (:dict-entry "six" (:variant (:array :byte 4 :byte 5 :byte 6)))) ... Do you mind to test both? > + (should-error ; Cannot set property with :read access > + (equal > + (dbus-set-property > + :session dbus--test-service dbus--test-path > + dbus--test-interface "StringArray" > + '(:array "seven" "eight" :string "nine")) > + nil)) The error happens in dbus-set-property. No need to test further for equal. So you could do (should-error ; Cannot set property with :read access (dbus-set-property :session dbus--test-service dbus--test-path dbus--test-interface "StringArray" '(:array "seven" "eight" :string "nine"))) Furthermore, you could test which error is raised (should-error allows this). Something like (should-error ; Cannot set property with :read access (dbus-set-property :session dbus--test-service dbus--test-path dbus--test-interface "StringArray" '(:array "seven" "eight" :string "nine")) :type 'dbus-error) Similar approach for your other should-error forms. > + ;; Test integer overflow I don't see any integer *overflow* in the following tests. > Thanks, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 22 13:36:17 2020 Received: (at 43252) by debbugs.gnu.org; 22 Sep 2020 17:36:17 +0000 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 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 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 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides 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> Date: Tue, 22 Sep 2020 19:36:07 +0200 In-Reply-To: <87zh5i8o9h.fsf@ccss.com> (Hugh Daschbach's message of "Mon, 21 Sep 2020 20:48:58 -0700") Message-ID: <87eemt67eg.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:ctnenNac+9SX3diH5FzLrARBVLjfIrOPbvuf4D9bMBr71ZyERVv JSb0HE9bfV6Cs2zPTqYLaabUPLz61/iL2a15fCO7GEsCNojEGAp7CLv+e987KAkMwE1jMaD IcVlA4g7129sgoln8lEvlhpFf09odMPQwRu3Vah+F4DGuh5EtelL3rgOfVEud+W5Po4zfpn eRuExDiKaQqjVU5vf1FuA== X-Spam-Flag: NO 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+cYnjxTZJhEvICMEyaqxeB26uHZ0JzFr4TIoJeqD9FYR7CWinIEI6X6 HF4LAVFP5yI/Hr98qinGOEOhk4WkSFAG31B9ADyysHCxKLWdq3zb1JhhCTrX5LkKVPZG+N0Nq WFRCrrB+DcHKhQW63VOnqNm/2xjpYyTlFg0pBvRPzIAtdXKaLwX65eG7ol4iKGDhVYIuzBF/C KmRgs7vH+3tA+YPUYH7av1ixSjHoeN0+AeG+sEVkbPiBdfBfYvxxEUxfe4OlIJq/0lwbnoWhz 7nO1+knGrkioR4RXvKTRPN9vGCS8Yo+RhA6s0zg7InFj44yicaAgR+Ic4/kLVkoFZ/frQ6xRg 17hX/YfNevqEzhTkIHUhtsP+FufoVIXT5MlL25zrva7AgqkS5DmlCCS+j3jO1yKRz6euKq6E/ GnH7OxLnW0db5HC4nYvZEd2ltC82OY0aPNfzMTa4veWrkdg8EksvbZAuoHLS3oZh8ZwjV+7zb fdA6yL2kXvoNeDq65HZhKV3hpjHu8OsjOxE4MaA== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 22 23:31:08 2020 Received: (at 43252) by debbugs.gnu.org; 23 Sep 2020 03:31:08 +0000 Received: from localhost ([127.0.0.1]:34116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKvUo-0005MY-NS for submit@debbugs.gnu.org; Tue, 22 Sep 2020 23:31:08 -0400 Received: from mail1.ccss.com ([159.203.255.73]:60796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKvUj-0005Lo-Gk for 43252@debbugs.gnu.org; Tue, 22 Sep 2020 23:31:05 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 8C571BF889; Tue, 22 Sep 2020 20:30:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id A4039BF475; Tue, 22 Sep 2020 20:30:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 7C90B176063A; Tue, 22 Sep 2020 20:30:54 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kC3FHLHNiyPx; Tue, 22 Sep 2020 20:30:48 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id ED5E7176042D; Tue, 22 Sep 2020 20:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600831848; bh=gttxXWDtvQYatGndhFuAHUVlfo942nvy+nH8PbnvYVU=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=hnraslPrQGVQFxvOduTuhuKLboK1wsgN3n/giKJdtopL9q8+mJ2IF6eG42p7cD6Id oNPN8lZE7jtfX04sr2DwwjfY47utDxOmacAYrMlVncEoKpQwehlaPCb/ayPB8j03FH G1bkMRPhbncvQgl7tlyT4lKRp5QFAt8YfwZ5KlVrjZqFEijjqxpDFlRG+kGHaLgDJZ m/YA5A/W6wwNlyqfREudR2Vrqu3ztbNlF++HyAtzB7zmXmU0myJO8ufWU7QzAGevnW 2JYLl5qjE+GIVnuDYWnD6G6A0S9tbDmtkslNquaRnCbguViORsm3w7gAQg3SzQigva HEKlUlcqDuqFA== References: <87v9gqquct.fsf@ccss.com> <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> <87eemt67eg.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87eemt67eg.fsf@gmx.de> Date: Tue, 22 Sep 2020 20:30:47 -0700 Message-ID: <87wo0l8908.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > Thanks for this. AFAICS, there's nothing left open for=20 > bug#43252; I'd > like to close it. Is this OK for you? Yes. I was about to suggest this. The issue is resoled. >> And, of course, let me know what you think should be reworked. > > There are only some nits left to comment. Good. Nits promote quality and consistency. >> Add DBus tests to validate property handling. Includes cycling > > We call this beast D-Bus, with a hyphen. Here and everywhere in=20 > the > docstrings and comments. Good. Fixed. > > We add also a ChangeLog style entry to the commit message, see=20 > the git > log of dbus-tests.el. I've taken a shot at this. I'm not sure I got the ChangeLog style correct. Let me know if I'm still off the beaten path. > `dbus-register' (if SELECTOR is `register') or Fixed. >> +(ert-deftest dbus-test06-test-property-types () > > The "-test" part of the name seems to be superfluous; I'd call=20 > it > dbus-test06-property-types. (You see, just nitpicks :-) You say that as if were a bad thing :-). Fixed. >> + (dbus--test-property >> + "Dictionary" >> + '((:array >> + :dict-entry (:string "four" (:variant :string=20 >> "value of four")) >> + :dict-entry ("five" (:variant :object-path=20 >> "/nodex")) >> + :dict-entry ("six" (:variant (:array :byte 4=20 >> :byte 5 :byte 6)))) > > This is one possibility to declare a :dict-entry. The other=20 > possibility, > with the same result, is > > '((:array > (:dict-entry :string "four" (:variant :string "value of=20 > four")) > (:dict-entry "five" (:variant :object-path "/nodex")) > (:dict-entry "six" (:variant (:array :byte 4 :byte 5 :byte=20 > 6)))) > ... > > Do you mind to test both? I seem to consistently stumble over compound type syntax. Thanks=20 for point this out. Both forms are now tested. >> + (should-error ; Cannot set property=20 >> with :read access >> + (equal ...)) > > The error happens in dbus-set-property. No need to test further=20 > for > equal. So you could do > > (should-error ; Cannot set property with :read=20 > access > (dbus-set-property > :session dbus--test-service dbus--test-path > dbus--test-interface "StringArray" > '(:array "seven" "eight" :string "nine"))) > > Furthermore, you could test which error is raised (should-error=20 > allows > this). Something like > > (should-error ; Cannot set property with :read=20 > access > (dbus-set-property > :session dbus--test-service dbus--test-path > dbus--test-interface "StringArray" > '(:array "seven" "eight" :string "nine")) > :type 'dbus-error) > > Similar approach for your other should-error forms. Got it. I think I've fixed each should-error test. >> + ;; Test integer overflow > > I don't see any integer *overflow* in the following tests. Yes, really botched that. I had a byte truncation test that I=20 only now realize isn't treated as an integer. And that wasn't near the=20 comment. Sigh. I've added conforming and overflow tests. The overflow test, appropriately, error on register. > OTOH, I don't mind to give this test the :expensive-test=20 > tag. Then it > doesn't matter how long it runs. Done. > Given the time it consumes, there might be a need to cache=20 > introspection > data. Either the result of dbus-introspect or=20 > dbus--parse-xml-buffer, I > guess rather the latter. Do you want to investigate it in=20 > dbus.el? Sure. I'll have a look. If I find something useful, I'll open=20 another bug. >> 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=20 > 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=20 > called > .../test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml. This=20 > function > (the handler for the Introspect method) would read the file, and=20 > return > its contents. Makes sense. Done. >> +(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 Guilty as charged. I'm still working on developing idiomatic=20 elisp. > (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. Is: (let* ((property (dbus-introspect-get-property :session dbus--test-service dbus--test-path interface property-name))) ...) preferred over: (let* ((property (dbus-introspect-get-property :session=20 dbus--test-service dbus--test-path interface property-name))) ...) If not, I'll take another bite at the apple. >> + (should-not (equal expected nil)) > > This is (should expected) Yes, I should read what I write. Fixed. Thanks. >> + (unwind-protect >> + ;; dbus-introspect-get-node-names >> + (should >> + (equal >> + (dbus-introspect-get-node-names :session=20 >> dbus--test-service dbus--test-path) >> + '("node0" "node1"))) > A (progn ... is missing after unwind-protect. I really should be more careful when I rip out instrumentation.=20 Thanks for catching this. >> + '("org.freedesktop.DBus.Deprecated"))) > > Hmm. Maybe we shall give "org.freedesktop.DBus.Deprecated" a=20 > defconst in > dbus.el? Done. =E2=80=99dbus-annotation-deprecated=E2=80=99. Let me know if you th= ink=20 this should be =E2=80=98dbus--annotation-deprecated=E2=80=99 instead. >> Thanks, >> Hugh > > Best regards, Michael. In other news, this test: (should-error (dbus-check-arguments :session dbus--test-service :unix-fd 10) :type 'dbus-error) works for me in batch mode, but not interactive mode. On GNU/Linux, (dired (format "/proc/%s/fd" (emacs-pid))) indicates=20 I have 14 open file descriptors on a test instance (emacs -q -Q).=20 On my development instance, I've got 27 open file descriptors. Cheers, Hugh From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 22 23:34:58 2020 Received: (at 43252) by debbugs.gnu.org; 23 Sep 2020 03:34:59 +0000 Received: from localhost ([127.0.0.1]:34157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKvYX-0005We-M3 for submit@debbugs.gnu.org; Tue, 22 Sep 2020 23:34:58 -0400 Received: from mail1.ccss.com ([159.203.255.73]:60828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKvYV-0005WM-Er for 43252@debbugs.gnu.org; Tue, 22 Sep 2020 23:34:56 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 1B437BF8A6; Tue, 22 Sep 2020 20:34:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 2A1CFBF4A3; Tue, 22 Sep 2020 20:34:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id F41B2176063A; Tue, 22 Sep 2020 20:34:47 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hj6Nk5aW-e_q; Tue, 22 Sep 2020 20:34:44 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id ADB0317605C0; Tue, 22 Sep 2020 20:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600832084; bh=G046B8eNtcvqIT002HqNKJz/VksxfNUsMrqUVuM4KQ4=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=NHYK9iqa4aR4fFLkE4HcIwqhQO53VJlb7jvMsMcQacOm1LcT+9K/1ux+ZHT1ealHD +pfC+L3EsH1Bd+PgOW+uctZDF1W4YnIBD42HBe6ehj76o2Gwa6wEHUdiv7mx9uSFq6 nv83DVnOi9DW1V4lkSAH1GVZ0BCkIYu9NKHvKPUqevMlLBul7q/pAgG5DIMu2biKuP m3gc22ZjRBsY7oBamrnHeBW7cJpRWpYfFVCFQsJM0JNK0u+Mes3XljIC4LxbOVtixz cX+ix3NfUPwSg0DhjAtf5Oqgdm56GCvxk+HBtDCDX8GbcG2AG7V3hiTNFH1WaxbpAT kaKHk5hje55dA== References: <87v9gqquct.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> <87eemt67eg.fsf@gmx.de> <87wo0l8908.fsf@ccss.com> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87wo0l8908.fsf@ccss.com> Date: Tue, 22 Sep 2020 20:34:44 -0700 Message-ID: <87tuvp88tn.fsf@ccss.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; format=flowed Hugh Daschbach writes: > Michael Albinus writes: > >> Hugh Daschbach writes: >> >> Hi Hugh, >> >> Thanks for this. AFAICS, there's nothing left open for >> bug#43252; I'd >> like to close it. Is this OK for you? > > Yes. I was about to suggest this. The issue is resoled. Sigh. Forgot to attach new patches. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-D-Bus-property-tests.patch Content-Description: Property tests. >From be45a75b315e56649fa9e39d199fe5e2b50bf69d Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Tue, 22 Sep 2020 19:36:20 -0700 Subject: [PATCH 1/2] Add D-Bus property tests. * test/lisp/net/dbus-tests.el: Add property tests. (dbus--test-run-property-test) (dbus--test-property) (dbus-test06-property-types): Test property registration, set, get. --- test/lisp/net/dbus-tests.el | 431 ++++++++++++++++++++++++++++++++++++ 1 file changed, 431 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 62ed3f2bfb4..543b7c8a95b 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -1004,6 +1004,437 @@ dbus-test06-register-property-emits-signal ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(defsubst dbus--test-run-property-test (selector name value expected) + "Generate a property test: register, set, get, getall sequence. +This is a helper function for the macro `dbus--test-property'. +The argument SELECTOR indicates whether the test should expand to +'dbus-register-property' (if SELECTOR is `register') or +`dbus-set-property' (if SELECTOR is `set'). +The argument NAME is the property name. +The argument VALUE is the value to register or set. +The argument EXPECTED is a transformed VALUE representing the +form `dbus-get-property' should return." + (cond + ((eq selector 'register) + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface name :readwrite value) + `((:property :session ,dbus--test-interface ,name) + (,dbus--test-service ,dbus--test-path))))) + + ((eq selector 'set) + (should + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface name value) + expected))) + + (t (signal 'wrong-type-argument "Selector should be 'register or 'set."))) + + (should + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface name) + expected)) + + (let ((result + (dbus-get-all-properties + :session dbus--test-service dbus--test-path + dbus--test-interface))) + (should (equal (cdr (assoc name result)) expected))) + + (let ((result + (dbus-get-all-managed-objects :session dbus--test-service "/")) + result1) + (should (setq result1 (cadr (assoc dbus--test-path result)))) + (should (setq result1 (cadr (assoc dbus--test-interface result1)))) + (should (equal (cdr (assoc name result1)) expected)))) + + +(defsubst dbus--test-property (name &rest value-list) + "Test a D-Bus property named by string argument NAME. + +The argument VALUE-LIST is a sequence of pairs, where each pair +represents a value form and an expected returned value form. The +first pair in VALUES is used for `dbus-register-property'. +Subsequent pairs of the list are tested with +`dbus-set-property'." + (let ((values (car value-list))) + (dbus--test-run-property-test + 'register + name + (car values) + (cdr values))) + (dolist (values (cdr value-list)) + (dbus--test-run-property-test + 'set + name + (car values) + (cdr values)))) + +(ert-deftest dbus-test06-property-types () + "Check property access and mutation for an own service." + (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 + (progn + (dbus--test-property + "ByteArray" + '((:array :byte 1 :byte 2 :byte 3) . (1 2 3)) + '((:array :byte 4 :byte 5 :byte 6) . (4 5 6))) + + (dbus--test-property + "StringArray" + '((:array "one" "two" :string "three") . ("one" "two" "three")) + '((:array :string "four" :string "five" "six") . ("four" "five" "six"))) + + (dbus--test-property + "ObjectArray" + '((:array + :object-path "/node00" + :object-path "/node01" + :object-path "/node0/node02") . + ("/node00" "/node01" "/node0/node02")) + '((:array + :object-path "/node10" + :object-path "/node11" + :object-path "/node0/node12") . + ("/node10" "/node11" "/node0/node12"))) + + (dbus--test-property + "Dictionary" + '((:array + :dict-entry (:string "four" (:variant :string "value of four")) + :dict-entry ("five" (:variant :object-path "/node0")) + :dict-entry ("six" (:variant (:array :byte 4 :byte 5 :byte 6)))) . + (("four" + ("value of four")) + ("five" + ("/node0")) + ("six" + ((4 5 6))))) + '((:array + :dict-entry (:string "key0" (:variant (:array :byte 7 :byte 8 :byte 9))) + :dict-entry ("key1" (:variant :string "value")) + :dict-entry ("key2" (:variant :object-path "/node0/node1"))) . + (("key0" + ((7 8 9))) + ("key1" + ("value")) + ("key2" + ("/node0/node1"))))) + + (dbus--test-property ; Syntax emphasizing :dict compound type + "Dictionary" + '((:array + (:dict-entry :string "seven" (:variant :string "value of seven")) + (:dict-entry "eight" (:variant :object-path "/node8")) + (:dict-entry "nine" (:variant (:array :byte 9 :byte 27 :byte 81)))) . + (("seven" + ("value of seven")) + ("eight" + ("/node8")) + ("nine" + ((9 27 81))))) + '((:array + (:dict-entry :string "key4" (:variant (:array :byte 7 :byte 49 :byte 125))) + (:dict-entry "key5" (:variant :string "obsolete")) + (:dict-entry "key6" (:variant :object-path "/node6/node7"))) . + (("key4" + ((7 49 125))) + ("key5" + ("obsolete")) + ("key6" + ("/node6/node7"))))) + + (dbus--test-property + "ByteDictionary" + '((:array + (:dict-entry :byte 8 (:variant :string "byte-eight")) + (:dict-entry :byte 16 (:variant :object-path "/byte/sixteen")) + (:dict-entry :byte 48 (:variant (:array :byte 8 :byte 9 :byte 10)))) . + ((8 ("byte-eight")) + (16 ("/byte/sixteen")) + (48 ((8 9 10)))))) + + (dbus--test-property + "Variant" + '((:variant "Variant string") . ("Variant string")) + '((:variant :byte 42) . (42)) + '((:variant :uint32 1000000) . (1000000)) + '((:variant :object-path "/variant/path") . ("/variant/path")) + '((:variant :signature "a{sa{sv}}") . ("a{sa{sv}}")) + '((:variant (:struct 42 "string" (:object-path "/structure/path") (:variant "last"))) . + ((42 "string" ("/structure/path") ("last"))))) + + ;; Test that :read prevents writes + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray" :read + '(:array "one" "two" :string "three")) + `((:property :session ,dbus--test-interface "StringArray") + (,dbus--test-service ,dbus--test-path)))) + + (should-error ; Cannot set property with :read access + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray" + '(:array "seven" "eight" :string "nine")) + :type 'dbus-error) + + (should-not + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray") + '("seven" "eight" "nine"))) + + (should ; Verify property has registered value + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "StringArray") + '("one" "two" "three"))) + + ;; Test mismatched types in array + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "MixedArray" :readwrite + '(:array + :object-path "/node00" + :string "/node01" + :object-path "/node0/node02")) + :type 'wrong-type-argument) + + ;; Test in-range integer values + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" :readwrite + :byte 255) + `((:property :session ,dbus--test-interface "ByteValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 255)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ShortValue" :readwrite + :int16 32767) + `((:property :session ,dbus--test-interface "ShortValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ShortValue") + 32767)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "UShortValue" :readwrite + :uint16 65535) + `((:property :session ,dbus--test-interface "UShortValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "UShortValue") + 65535)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "IntValue" :readwrite + :int32 2147483647) + `((:property :session ,dbus--test-interface "IntValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "IntValue") + 2147483647)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "UIntValue" :readwrite + :uint32 4294967295) + `((:property :session ,dbus--test-interface "UIntValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "UIntValue") + 4294967295)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "LongValue" :readwrite + :int64 9223372036854775807) + `((:property :session ,dbus--test-interface "LongValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "LongValue") + 9223372036854775807)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ULongValue" :readwrite + :uint64 18446744073709551615) + `((:property :session ,dbus--test-interface "ULongValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ULongValue") + 18446744073709551615)) + + ;; Test integer overflow + + (should + (= + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" :byte 520) + 8)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 8)) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ShortValue" :readwrite + :int16 32800) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "UShortValue" :readwrite + :uint16 65600) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "IntValue" :readwrite + :int32 2147483700) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "UIntValue" :readwrite + :uint32 4294967300) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "LongValue" :readwrite + :int64 9223372036854775900) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ULongValue" :readwrite + :uint64 18446744073709551700) + :type 'args-out-of-range) + + ;; dbus-set-property may change property type + + (should + (= + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" 1024) + 1024)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + 1024)) + + + (should ; Another change property type + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue" :boolean t) + t)) + + (should + (eq + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "ByteValue") + t)) + + ;; Test invalid type specification + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path + dbus--test-interface "InvalidType" :readwrite + :keyword 128) + :type 'wrong-type-argument)) + + ;; Cleanup. + + + (message "cleanup") + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Add-D-Bus-Introspection-tests.patch Content-Description: Introspection tests. >From 3efb1b38d75572b14ac0526dbd79769d6fa89d10 Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Mon, 21 Sep 2020 17:12:49 -0700 Subject: [PATCH 2/2] Add D-Bus Introspection tests. * lisp/net/dbus.el (new defconst): D-Bus deprecation name. * test/lisp/net/dbus-tests.el (dbus--tests-dir) (dbus--test-introspect) (dbus--test-examine-interface) (dbus--test-validate-annotations) (dbus--test-validate-property) (dbus--test-validate-m-or-s) (dbus--test-validate-signal) (dbus--test-validate-method) (dbus-test07-introspection): new tests. * test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml: new test data. --- lisp/net/dbus.el | 4 + test/lisp/net/dbus-tests.el | 324 ++++++++++++++++++ .../net/dbus-tests/org.gnu.Emacs.TestDBus.xml | 49 +++ 3 files changed, 377 insertions(+) create mode 100644 test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 86db7cbf18a..8da3245800b 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -153,6 +153,10 @@ dbus-interface-local ;; ;; +(defconst dbus-annotation-deprecated (concat dbus-interface-dbus ".Deprecated") + "An annotation value indicating a deprecated interface, method, signal, or property.") + + ;;; Default D-Bus errors. diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 543b7c8a95b..15d80f79a22 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -44,6 +44,13 @@ dbus--test-path (defconst dbus--test-interface "org.gnu.Emacs.TestDBus.Interface" "Test interface.") +(defvar dbus--tests-dir + (file-truename + (expand-file-name "dbus-tests" + (file-name-directory (or load-file-name + buffer-file-name)))) + "Directory containing test data files.") + (defun dbus--test-availability (bus) "Test availability of D-Bus BUS." (should (dbus-list-names bus)) @@ -1435,6 +1442,323 @@ dbus-test06-property-types (message "cleanup") (dbus-unregister-service :session dbus--test-service))) +(defun dbus--test-introspect () + "Return test introspection string." + (with-temp-buffer + (insert-file (expand-file-name "org.gnu.Emacs.TestDBus.xml" dbus--tests-dir)) + (buffer-string))) + +(defsubst dbus--test-validate-interface + (iface-name expected-properties expected-methods expected-signals + expected-annotations) + "Validate an interface definition for `dbus-test-07-test-introspection'. +The argument IFACE-NAME is a string naming the interface to validate. +The arguments EXPECTED-PROPERTIES, EXPECTED-METHODS, EXPECTED-SIGNALS, and +EXPECTED-ANNOTATIONS represent the names of the interface's properties, +methods, signals, and annotations, respecively." + + (let ((interface + (dbus-introspect-get-interface + :session + dbus--test-service + dbus--test-path + iface-name))) + (pcase-let ((`(interface ((name . ,name)) . ,rest) interface)) + (should + (string-equal name iface-name)) + (should + (string-equal name (dbus-introspect-get-attribute interface "name"))) + + (let (properties methods signals annotations) + (mapc (lambda (x) + (let ((name (dbus-introspect-get-attribute x "name"))) + (cond + ((eq 'property (car x)) (push name properties)) + ((eq 'method (car x)) (push name methods)) + ((eq 'signal (car x)) (push name signals)) + ((eq 'annotation (car x)) (push name annotations))))) + rest) + + (should + (equal + (nreverse properties) + expected-properties)) + (should + (equal + (nreverse methods) + expected-methods)) + (should + (equal + (nreverse signals) + expected-signals)) + (should + (equal + (nreverse annotations) + expected-annotations)))))) + +(defsubst dbus--test-validate-annotations (annotations expected-annotations) + "Validate a list of D-Bus ANNOTATIONS. +Ensure each string in EXPECTED-ANNOTATIONS names an element of ANNOTATIONS. +And ensure each ANNOTATIONS has a value attribute marked \"true\"." + (mapc + (lambda (annotation) + (let ((name (dbus-introspect-get-attribute annotation "name")) + (value (dbus-introspect-get-attribute annotation "value"))) + (should + (member name expected-annotations)) + (should + (equal value "true")))) + annotations)) + +(defsubst dbus--test-validate-property + (interface property-name expected-annotations &rest expected-args) + "Validate a property definition for `dbus-test-07-test-introspection'. + +The argument INTERFACE is a string naming the interface owning PROPERTY-NAME. +The argument PROPERTY-NAME is a string naming the property to validate. +The arguments EXPECTED-ANNOTATIONS represent the names of the property's properties. +The argument EXPECTED-ARGS is a list of expected arguments for the property." + (let* ((property + (dbus-introspect-get-property + :session + dbus--test-service + dbus--test-path interface + property-name)) + (name (dbus-introspect-get-attribute property "name")) + (type (dbus-introspect-get-attribute property "type")) + (access (dbus-introspect-get-attribute property "access")) + (expected (assoc-string name expected-args))) + (should expected) + + (should + (string-equal name property-name)) + + (should + (string-equal + (nth 0 expected) + name)) + + (should + (string-equal + (nth 1 expected) + type)) + + (should + (string-equal + (nth 2 expected) + access)))) + +(defsubst dbus--test-validate-m-or-s (tree expected-annotations expected-args) + "Validate a method or signal definition for `dbus-test-07-test-introspection'. +The argument TREE is an sexp returned from either `dbus-introspect-get-method' +or `dbus-introspect-get-signal' +The arguments EXPECTED-ANNOTATIONS is an sexp matching the annotations defined +for the method or signal. +The argument EXPECTED-ARGS is a list of expected arguments for +the method or signal." + (let (args annotations) + (mapc (lambda (elem) + (let ((name (dbus-introspect-get-attribute elem "name"))) + (cond + ((eq 'arg (car elem)) (push elem args)) + ((eq 'annotation (car elem)) (push elem annotations))))) + tree) + (should + (equal + (nreverse args) + expected-args)) + (dbus--test-validate-annotations annotations expected-annotations))) + +(defsubst dbus--test-validate-signal + (interface signal-name expected-annotations &rest expected-args) + "Validate a signal definition for `dbus-test-07-test-introspection'. + +The argument INTERFACE is a string naming the interface owning SIGNAL-NAME. +The argument SIGNAL-NAME is a string naming the signal to validate. +The arguments EXPECTED-ANNOTATIONS represent the names of the signal's properties. +The argument EXPECTED-ARGS is a list of expected arguments for the signal." + (let ((signal + (dbus-introspect-get-signal + :session + dbus--test-service + dbus--test-path + interface + signal-name))) + (pcase-let ((`(signal ((name . ,name)) . ,rest) signal)) + (should + (string-equal name signal-name)) + (should + (string-equal name (dbus-introspect-get-attribute signal "name"))) + (dbus--test-validate-m-or-s rest expected-annotations expected-args)))) + + +(defsubst dbus--test-validate-method + (interface method-name expected-annotations &rest expected-args) + "Validate a method definition for `dbus-test-07-test-introspection'. + +The argument INTERFACE is a string naming the interface owning METHOD-NAME. +The argument METHOD-NAME is a string naming the method to validate. +The arguments EXPECTED-ANNOTATIONS represent the names of the method's properties. +The argument EXPECTED-ARGS is a list of expected arguments for the method." + (let ((method + (dbus-introspect-get-method + :session + dbus--test-service + dbus--test-path + interface + method-name))) + (pcase-let ((`(method ((name . ,name)) . ,rest) method)) + (should + (string-equal name method-name)) + (should + (string-equal name (dbus-introspect-get-attribute method "name"))) + (dbus--test-validate-m-or-s rest expected-annotations expected-args)))) + +(ert-deftest dbus-test07-introspection () + :tags '(:expensive-test) + "Register an Introspection interface then query it." + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + (dbus-register-service :session dbus--test-service) + + ;; Prepare introspections response + (dbus-register-method + :session dbus--test-service + dbus--test-path + dbus-interface-introspectable + "Introspect" + 'dbus--test-introspect) + + (unwind-protect + (progn + ;; dbus-introspect-get-node-names + (should + (equal + (dbus-introspect-get-node-names :session dbus--test-service dbus--test-path) + '("node0" "node1"))) + + ;; dbus-introspect-get-all-nodes + + (should + (equal + (dbus-introspect-get-all-nodes :session dbus--test-service dbus--test-path) + (list dbus--test-path + (concat dbus--test-path "/node0") + (concat dbus--test-path "/node1")))) + + ;; dbus-introspect-get-interface-names + + (let ((interfaces + (dbus-introspect-get-interface-names + :session + dbus--test-service + dbus--test-path))) + + (should + (equal + interfaces + `(,dbus-interface-introspectable + ,dbus-interface-properties + ,dbus--test-interface))) + + (dbus--test-validate-interface + dbus-interface-introspectable + nil + '("Introspect") + nil + nil) + + ;; dbus-introspect-get-interface via `dbus--test-validate-interface' + (dbus--test-validate-interface + dbus-interface-properties + nil '("Get" "Set" "GetAll") '("PropertiesChanged") nil) + + (dbus--test-validate-interface + dbus--test-interface + '("Connected" "Player") + '("Connect" "DeprecatedMethod0" "DeprecatedMethod1") + nil + `(,dbus-annotation-deprecated))) + + ;; dbus-introspect-get-method-names + + (let ((methods + (dbus-introspect-get-method-names + :session + dbus--test-service + dbus--test-path + dbus--test-interface))) + (should + (equal + methods + '("Connect" "DeprecatedMethod0" "DeprecatedMethod1"))) + + ;; dbus-introspect-get-method via 'dbus--test-validate-method + + (dbus--test-validate-method + dbus--test-interface + "Connect" + nil + '(arg ((name . "uuid") (type . "s") (direction . "in"))) + '(arg ((name . "mode") (type . "y") (direction . "in"))) + '(arg ((name . "options") (type . "a{sv}") (direction . "in"))) + '(arg ((name . "interface") (type . "s") (direction . "out")))) + + (dbus--test-validate-method + dbus--test-interface + "DeprecatedMethod0" + `(,dbus-annotation-deprecated)) + + (dbus--test-validate-method + dbus--test-interface + "DeprecatedMethod1" + `(,dbus-annotation-deprecated))) + + ;; dbus-introspect-get-signal-names + + (let ((signals + (dbus-introspect-get-signal-names + :session + dbus--test-service + dbus--test-path + dbus-interface-properties))) + (should + (equal + signals + '("PropertiesChanged"))) + + ;; dbus-introspect-get-signal via 'dbus--test-validate-signal + (dbus--test-validate-signal + dbus-interface-properties + "PropertiesChanged" + nil + '(arg ((name . "interface") (type . "s"))) + '(arg ((name . "changed_properties") (type . "a{sv}"))) + '(arg ((name . "invalidated_properties") (type . "as"))))) + + ;; dbus-intropct-get-property-names + + (let ((properties + (dbus-introspect-get-property-names + :session + dbus--test-service + dbus--test-path + dbus--test-interface))) + (should + (equal + properties + '("Connected" "Player"))) + + ;; dbus-introspect-get-property via 'dbus--test-validate-property + (dbus--test-validate-property + dbus--test-interface + "Connected" + nil + '("Connected" "b" "read") + '("Player" "o" "read")))) + + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") diff --git a/test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml b/test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml new file mode 100644 index 00000000000..620f10510f2 --- /dev/null +++ b/test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.28.0 --=-=-= Content-Type: text/plain; format=flowed Cheers, Hugh --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 03:44:17 2020 Received: (at 43252-done) by debbugs.gnu.org; 23 Sep 2020 07:44:17 +0000 Received: from localhost ([127.0.0.1]:34382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKzRp-0005mX-DL for submit@debbugs.gnu.org; Wed, 23 Sep 2020 03:44:17 -0400 Received: from mout.gmx.net ([212.227.17.21]:58933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKzRl-0005mC-5D for 43252-done@debbugs.gnu.org; Wed, 23 Sep 2020 03:44:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600847045; bh=dQu6xjWXMT+6Yj3yZTjAf9b+7YDp9olcNhvLWR15sv0=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=lzOC+boRwBKgEhkhBd+IDYqLudDON9kJISmfpfYw20/pFgfAQovi4quFr8NJ0qa/C aSolozSpeDUUQXd2v9+1HWMt5N0VSbGwmyGwYS16rxXIBDy5JWPZGVq8Nm71PyAyYP cO5NqGvxT6J0tL19R/7INIxtmEpcFHP09gROENwc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.124.10]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MJVHU-1k17763Xr6-00JsVY; Wed, 23 Sep 2020 09:44:04 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.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> <87eemt67eg.fsf@gmx.de> <87wo0l8908.fsf@ccss.com> Date: Wed, 23 Sep 2020 09:44:03 +0200 In-Reply-To: <87wo0l8908.fsf@ccss.com> (Hugh Daschbach's message of "Tue, 22 Sep 2020 20:30:47 -0700") Message-ID: <877dslj5to.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:8+fxmA7mccJsEttwAWJHZHzg+g+6VqGrID8iv741zHzsYoLy4rm EX7QKWKVw94SxYPRI864CUFRAe8k1i3uqjl6l96cp8J8C+Z+1ZwLwUUHCmj5FUwMailn0TJ ccYbXbLAXauPPMK/ZVe4qXpmDG2TCrMQL8F+6wKr1Zpn6flEIJirlXO8ndv0gHjCiatxj8y bq8fSf+HK7JFR/ucy2fWw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:y3K/7VUi0nc=:4xy32JqAPkWf3jP7v0t5JU 4iQsc38E3Mi15/I0pJdOHdU/6acLRKUgckpzpqsRN+7r8gqbdDC1vcPi9UyM3XPJpJSzqZS9Z YvUwPwXcPGSqiqe92WrqmONsKh4KooI1SXorY5OjstHLkbGhbKY2BNm0nmooxFUC9lx2r74mD 2Tp1qrXMgsSpvdLEEzUq/kiEN4cny2LuA1EB2WqlO5TtiHLUrIPoAPMVxleAAV4gAvcdtUErU c2z+4QeKVsdkCJuEGRFSx1WKpT1ESItk7KQC5dleEX8FXXDFi+wOWrthZaRGo64PQfq47lmlL LCKQ4bDrOP9S0R8qv5PbKnhoeU22UuLlkkJpQ3VZKXHjZ3oiEitY1Vn5R1ltHfj5u5/KPDqmu OtedHQP2qfOmVOns3TIba/RsIC4ZSAoPE9C/rEyB+QPh7V3VvTQyTmH3Hn2sJd8O8Ew+C7gKA hMgngfQBxkTBkmMdkyAnw132ryulWMn2Bjw1AaPMtyvP9ObwauM4MNv0VAscnzdi3ZSm6bVf9 psc8GtgtulCGzlxLRq5EnZ4ZXgS4n+6EK6dUPnqDG0bW3cWXXt2zcaGawgeYGUdM+VOlHOqbf O7r5uGrhFo9VB5TMWoWWxPoxidvN1VoruMPt24W8Z6gCUYWNX+YKXUbwul5gnHd4SWGp4hF/f zeOvRxLEdbgPw2xVEZwTp3TjChahJNFqoGqkqkDSUi5bsXovc8H2xxHK3BsOl3SLwZhjGKXNV QRMeyxR78zHbvWr3TEvHErGt2GFSJsCKHewltccE9cbS0oj9pdIuPsNGx29VlW8iV6PGPtzok J13G5rtfVW41IwhUUMitsVxqMB3+FbM/ntp6wJqdQbL86Ona74fRl4nW+JTnU6yBxHwilGlLq NTwyaNw4DB1zxwUDQzhaC6kTw/noN8PmfvQhz0TIm3tpj18VpIDphFDNd8sxaDhbajX8NsfRz XwP8MUOAi45CJ8IMh9b4N1Vwzr3PoNquIcQKk+F5Rj1NItMdt5Kv9vR4e2u7Znz7Phip2OL1t LM7f0PlpqweowQ3+ea9edKAt3CqBQ7VQnmFgtfGezYrhIBKrRFbGu2DmrmwH3kNdydzBujMh9 mhyj63sziex6agdFo4S9+6qBTGl7TtvqT17RoNC4d7SHjFWB2o7OTRd68dLMghUppPcDnGdkZ 61uNzxnJ8brm82p11PQexZYKavIWHht+JN2XuuHPEcU1k146SS5wCbYth2Hr+5h8oJPp4LF2a bcB42Mqmmm4bAtKrNIGBlqe6vtUNSiv8sU3SqKw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252-done Cc: 43252-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, >> Thanks for this. AFAICS, there's nothing left open for bug#43252; I'd >> like to close it. Is this OK for you? > > Yes. I was about to suggest this. The issue is resoled. Closed. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 13:32:23 2020 Received: (at 43252) by debbugs.gnu.org; 23 Sep 2020 17:32:23 +0000 Received: from localhost ([127.0.0.1]:37743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL8cw-0003zf-LG for submit@debbugs.gnu.org; Wed, 23 Sep 2020 13:32:23 -0400 Received: from mout.gmx.net ([212.227.15.19]:43129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL8cr-0003zH-O1 for 43252@debbugs.gnu.org; Wed, 23 Sep 2020 13:32:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600882329; bh=H6RLGfdk4dWCOyIjTzALMngWWfukz4Puj9CiQ90iNoM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=bZce/+AR58v0G4E/YoZ6zaopzPGG4nXxU6ANczNK0GAf7+CfAx8Hg+1bC9HLmUy3r smUT6COHypGOkrVar5qTCxTJBsSPBTjjqNZT65QLLQFrd1rtvsSw5jUtCJRNydC+iw ChtqAEEXQ2Uob67aR9TItqaYKzQ0SXxCwnO1LyyI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.124.10]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M6Db0-1kNMbh2Ydk-006bMg; Wed, 23 Sep 2020 19:32:09 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.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> <87eemt67eg.fsf@gmx.de> <87wo0l8908.fsf@ccss.com> Date: Wed, 23 Sep 2020 19:32:08 +0200 In-Reply-To: <87wo0l8908.fsf@ccss.com> (Hugh Daschbach's message of "Tue, 22 Sep 2020 20:30:47 -0700") Message-ID: <87wo0kielj.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:jbqYsIkVqbyE/H9mamVbZ0hWzLuzVmF+GAKnv23AnZp2BQNM1aA Uu7fbq31QBX6kwOmqCDzNkvGhnxaqCH6Kqh9CUA8L/oUsAzBGBWLIGE2/Gp/uHlebccK0uI oWSvVG1PSzWpU71UoWdchjsUOvstx+4cOQsV5Md3ebexr9SsdtCkm7Prx++vIKlgUWP4a6b ArKIcPLCieb3/DM61C1og== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:9aym11tN4YU=:QNRvmp8bvDnZd6AvPP0bTK KyHM0yMksDJg272dMHJKdiEiHwcoew8ZPtxy9UupLVTo7jG8T6kxfEwg68S0s24+b71N/9gA5 r9AhI2M2NPlkwrS28G20n9VpcFH1zi6mtrMwQstlJmB2uZTSU5r/DgD4fx/Iw+PVLYJybWADH C945AiZhVxxm1k9FyPoMjqlifmWYIou9NNggKvPfIKmz9CojxU9Uk2HBNVP8zO4CUOwbijH23 rGIhlSO0eJequu3PF0mxpqyCAfQ9rhoDBCJq0tdjX+NJmDOYVxYiiwMf/urgGu2rs2auxYONc y6TahZ8gnVyQmFOWtvD/uUc9KOsTIHZn4nmDh5nFKe0A0in7DI+CHOttE3OM+XS783Y7/gG3j YxSUt7mvBIcgWVbmB/Z1nuWety8D+ayqbyYDNZfJ4/SnA8vnFlcXMBHcxMd/s/mc0q9PfM9bB 4rUIS1gE4f3c64oY3TWk5gOSapI3lF9FobyOY2JwESDjqUCIxgO5Jx+ZRIQl1QDLFAbi6k3YL dBqrzxWMWV8vpFL15wuncFszd5vVnlh8gyR+Cu9DlY2eudw9Ze8rGcVgSS2DPz18E9Zr+zywS 8XZ16/uTmeAqezmutsaSenj25Sz/AOlSb8ptTJcVoxo1O9Ym3//mjM5/PqUYyAld9GcuIXppy SG6RBO2EaxsNuhP/TRU5aG/P8q5rWg39G3JQ4OBmoY690D0gOgUN0QMFH1nQMv/riwIcWY7K9 vi5/e/R6Te/cskuCgw0T5tY7DVZhiBJX3reZkERFCMUgjcc7o5MmSR4pFKyZ3egFdpbc8f4YZ PpUFePyz1DM2loUTPvgwBVgPAGA4g8sIDcOpacFsaQ4g1DMc67K1UNzHRls5F7E/IN2JIVjpD StUtkmCjtMFi9O9+Ijdo72O4tZi5s0cwxgOcwuv+zaLcnREQN6FFye3FrDFqMl2rJsl/lOHtU xwBHKXwoPgB6A/c8A3hGVw8iJhZyYuPHKbhlUwKZp3PmLqWbN9tKqrNLIWGXtX1ERhyTa0ITR u7DkTx4cyCZ8GHTFerO4qfDbTb21ECPO8478/3V5EeQUljTgm2P9HJieeItFQz8DkojZR3x/E 6/y1qMb96reW5H9MFlKqhzefQi+R4yWbASO3Z3pVeEOJ57ITwb+kIwyh4FBjnjIFGc0/bTHxT JAnVAWG+7NijoqQg3u6FgQRWvxXSg3cwQLo1kWc6cR0fHUpb43FTlS6a7/R9d8+Qa00EEcQ5u HL/rtmAvab1Quivh3O37bewGGmsuTMxo2aBhjSw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, > I've taken a shot at this. I'm not sure I got the ChangeLog style > correct. Let me know if I'm still off the beaten path. Almost. See comment below. >> `dbus-register' (if SELECTOR is `register') or > > Fixed. Almost. See comment below. >> 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. Oops, I'm mistaken here. The directory shall be called dbus-resources, see .../test/file-organization.org. Sorry. > Is: > > (let* ((property > (dbus-introspect-get-property > :session > dbus--test-service > dbus--test-path interface > property-name))) ...) > > preferred over: > > (let* ((property > (dbus-introspect-get-property :session > dbus--test-service > dbus--test-path interface property-name))) > ...) > > If not, I'll take another bite at the apple. I'd vote for the latter, with the first argument :session preceding the other arguments in the same line. Like (let* ((property (dbus-introspect-get-property :session dbus--test-service dbus--test-path interface property-name))) ...) If all arguments fit into 80 columns, do it. The "canonical" formatting is offered by the `pp' command (pretty printer). I must confess, that I do not follow all its recommendations. > Done. =E2=80=99dbus-annotation-deprecated=E2=80=99. Let me know if you = think this > should be > =E2=80=98dbus--annotation-deprecated=E2=80=99 instead. No, the former is OK. People might want to use it in their packages. > In other news, this test: > > (should-error > (dbus-check-arguments :session dbus--test-service :unix-fd 10) > :type 'dbus-error) > > works for me in batch mode, but not interactive mode. > > On GNU/Linux, (dired (format "/proc/%s/fd" (emacs-pid))) indicates I > have 14 open file descriptors on a test instance (emacs -q -Q). On my > development instance, I've got 27 open file descriptors. I see. Will investigate. And now my review for the latest patch versions. > From be45a75b315e56649fa9e39d199fe5e2b50bf69d Mon Sep 17 00:00:00 2001 > From: Hugh Daschbach > Date: Tue, 22 Sep 2020 19:36:20 -0700 > Subject: [PATCH 1/2] Add D-Bus property tests. > > * test/lisp/net/dbus-tests.el: Add property tests. > (dbus--test-run-property-test) (dbus--test-property) > (dbus-test06-property-types): Test property registration, set, get. If you have one comment for several functions, use only one parenthesis per line like (dbus--test-run-property-test, dbus--test-property) (dbus-test06-property-types): Test property registration, set, get. > +(defsubst dbus--test-run-property-test (selector name value expected) > + "Generate a property test: register, set, get, getall sequence. > +This is a helper function for the macro `dbus--test-property'. > +The argument SELECTOR indicates whether the test should expand to > +'dbus-register-property' (if SELECTOR is `register') or `dbus-register-property' (if SELECTOR is `register') or > + '((:array > + :object-path "/node00" > + :object-path "/node01" > + :object-path "/node0/node02") . > + ("/node00" "/node01" "/node0/node02")) If a cons cell doesn't fit into one line, you shall move the dot "." to the beginning of the next line, like (dbus--test-property "ObjectArray" '((:array :object-path "/node00" :object-path "/node01" :object-path "/node0/node02") . ("/node00" "/node01" "/node0/node02")) I bet the dot "." has the font-lock-warning-face (red foreground color) in your buffer. Admittedly, it doesn't look prominent :-( Move the cursor over the misplaced dot; there shall be a help message about. > + ;; Cleanup. > + (message "cleanup") > + (dbus-unregister-service :session dbus--test-service))) I don't believe we need this message. We see that we're done :-) > From 3efb1b38d75572b14ac0526dbd79769d6fa89d10 Mon Sep 17 00:00:00 2001 > From: Hugh Daschbach > Date: Mon, 21 Sep 2020 17:12:49 -0700 > Subject: [PATCH 2/2] Add D-Bus Introspection tests. > > * lisp/net/dbus.el (new defconst): D-Bus deprecation name. > > * test/lisp/net/dbus-tests.el (dbus--tests-dir) > (dbus--test-introspect) (dbus--test-examine-interface) > (dbus--test-validate-annotations) (dbus--test-validate-property) > (dbus--test-validate-m-or-s) (dbus--test-validate-signal) > (dbus--test-validate-method) (dbus-test07-introspection): new tests. That's not true. All but the last functions are new defuns, not new tests. And please start the explanation with a capital letter, like "New te= st." > +(defconst dbus-annotation-deprecated (concat dbus-interface-dbus ".Depre= cated") > + "An annotation value indicating a deprecated interface, method, signal= , or property.") The docstring line does not fit 80 chars. What about "An annotation indicating a deprecated interface, method, signal, or proper= ty." > +(defvar dbus--tests-dir > + (file-truename > + (expand-file-name "dbus-tests" > + (file-name-directory (or load-file-name > + buffer-file-name)))) > + "Directory containing test data files.") As said, it must be "dbus-resources". > +(ert-deftest dbus-test07-introspection () > + :tags '(:expensive-test) > + "Register an Introspection interface then query it." :tags must be after the docstring. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 23:02:48 2020 Received: (at 43252) by debbugs.gnu.org; 24 Sep 2020 03:02:48 +0000 Received: from localhost ([127.0.0.1]:38305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLHWo-0003V4-W4 for submit@debbugs.gnu.org; Wed, 23 Sep 2020 23:02:48 -0400 Received: from mail1.ccss.com ([159.203.255.73]:34330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLHWm-0003Ul-PU for 43252@debbugs.gnu.org; Wed, 23 Sep 2020 23:02:38 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id CD2D3BF8EB; Wed, 23 Sep 2020 20:02:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id E836BBF8E7; Wed, 23 Sep 2020 20:02:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id B2D04176073A; Wed, 23 Sep 2020 20:02:28 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NORN4TYQaJDS; Wed, 23 Sep 2020 20:02:25 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 344431760652; Wed, 23 Sep 2020 20:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1600916545; bh=r+2UVaDaehjPJHO1BUqwRPCUVOKFxwYRg8SOdkOy2aw=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=L6k0CGVij5IklPshGz0VKSadstxc2nQ+LTPDNcq4D5dDjgCHOZNJDOUTuo8W4kCOO kENMNXRRuacX33QxReqJIi6wjgJyvMfOs7qTiOIp143b1Mp5TfY3+2iJq9nllyreo8 Sb0bXtQMeLAxwdRoHWuypZOz9dV5XEDyDm2htWK6fLDSwG0DBL4wnEDyOTJ9go2jhv xtu5TxNNytAL6xuT6vG3APdu8W/dBzioFDcfpUCIMdr+0jhb04N0YiKRKvKAFPTmXZ ZC/SejWajIPVtfax1hHCh0cfOdc/cxRgtON0QU+lsa4EisZdhuKs0GBfWdpKBq9tp1 yAkIbOAJP4g6g== References: <87v9gqquct.fsf@ccss.com> <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> <87eemt67eg.fsf@gmx.de> <87wo0l8908.fsf@ccss.com> <87wo0kielj.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87wo0kielj.fsf@gmx.de> Date: Wed, 23 Sep 2020 20:02:24 -0700 Message-ID: <87r1qr98sf.fsf@ccss.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; format=flowed Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > Oops, I'm mistaken here. The directory shall be called > dbus-resources, > see .../test/file-organization.org. Sorry. No worries. Done. > I'd vote for the latter, with the first argument :session > preceding > the other arguments in the same line. Like > > (let* ((property > (dbus-introspect-get-property > :session dbus--test-service > dbus--test-path interface property-name))) > ...) I think I've addressed this. I reformatted a few tests that were similarly indented. > If you have one comment for several functions, use only one > parenthesis > per line like > > (dbus--test-run-property-test, dbus--test-property) > (dbus-test06-property-types): Test property registration, set, > get. Done. I think. > `dbus-register-property' (if SELECTOR is `register') or Done. Apologies for not picking up the quoting issue the first time you mentioned it. > I bet the dot "." has the font-lock-warning-face (red foreground > color) > in your buffer. Admittedly, it doesn't look prominent :-( > > Move the cursor over the misplaced dot; there shall be a help > message about. Done. > I don't believe we need this message. We see that we're done :-) Gone. >> * lisp/net/dbus.el (new defconst): D-Bus deprecation name. >> >> * test/lisp/net/dbus-tests.el (dbus--tests-dir) >> (dbus--test-introspect) (dbus--test-examine-interface) >> (dbus--test-validate-annotations) >> (dbus--test-validate-property) >> (dbus--test-validate-m-or-s) (dbus--test-validate-signal) >> (dbus--test-validate-method) (dbus-test07-introspection): new >> tests. I think I understand the ChangeLog format. Additional corrections welcome. > The docstring line does not fit 80 chars. What about > > "An annotation indicating a deprecated interface, method, > signal, or property." Done. >> +(ert-deftest dbus-test07-introspection () >> + :tags '(:expensive-test) >> + "Register an Introspection interface then query it." > > :tags must be after the docstring. Corrected. >> Cheers, >> Hugh > > Best regards, Michael. I think I've addressed all the issues you pointed out. Let me know if there's something that still doesn't look right. Thanks Hugh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-D-Bus-property-tests.patch Content-Description: Property tests. >From 64dcf1a657a7610709072676905f0157178511eb Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Tue, 22 Sep 2020 19:36:20 -0700 Subject: [PATCH 1/2] Add D-Bus property tests. * test/lisp/net/dbus-tests.el: Add property tests. (dbus--test-run-property-test, dbus--test-property): New defuns. (dbus-test06-property-types): New test for property registration, set, get. --- test/lisp/net/dbus-tests.el | 398 ++++++++++++++++++++++++++++++++++++ 1 file changed, 398 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 2f20fcc1e67..2e0c061a556 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -1005,6 +1005,404 @@ dbus-test06-register-property-emits-signal ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(defsubst dbus--test-run-property-test (selector name value expected) + "Generate a property test: register, set, get, getall sequence. +This is a helper function for the macro `dbus--test-property'. +The argument SELECTOR indicates whether the test should expand to +`dbus-register-property' (if SELECTOR is `register') or +`dbus-set-property' (if SELECTOR is `set'). +The argument NAME is the property name. +The argument VALUE is the value to register or set. +The argument EXPECTED is a transformed VALUE representing the +form `dbus-get-property' should return." + (cond + ((eq selector 'register) + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface name + :readwrite value) + `((:property :session ,dbus--test-interface ,name) + (,dbus--test-service ,dbus--test-path))))) + + ((eq selector 'set) + (should + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface name + value) + expected))) + + (t (signal 'wrong-type-argument "Selector should be 'register or 'set."))) + + (should + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface name) + expected)) + + (let ((result + (dbus-get-all-properties + :session dbus--test-service dbus--test-path dbus--test-interface))) + (should (equal (cdr (assoc name result)) expected))) + + (let ((result + (dbus-get-all-managed-objects :session dbus--test-service "/")) + result1) + (should (setq result1 (cadr (assoc dbus--test-path result)))) + (should (setq result1 (cadr (assoc dbus--test-interface result1)))) + (should (equal (cdr (assoc name result1)) expected)))) + + +(defsubst dbus--test-property (name &rest value-list) + "Test a D-Bus property named by string argument NAME. + +The argument VALUE-LIST is a sequence of pairs, where each pair +represents a value form and an expected returned value form. The +first pair in VALUES is used for `dbus-register-property'. +Subsequent pairs of the list are tested with `dbus-set-property'." + (let ((values (car value-list))) + (dbus--test-run-property-test + 'register name (car values) (cdr values))) + (dolist (values (cdr value-list)) + (dbus--test-run-property-test + 'set name (car values) (cdr values)))) + +(ert-deftest dbus-test06-property-types () + "Check property access and mutation for an own service." + (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 + (progn + (dbus--test-property + "ByteArray" + '((:array :byte 1 :byte 2 :byte 3) . (1 2 3)) + '((:array :byte 4 :byte 5 :byte 6) . (4 5 6))) + + (dbus--test-property + "StringArray" + '((:array "one" "two" :string "three") . ("one" "two" "three")) + '((:array :string "four" :string "five" "six") . ("four" "five" "six"))) + + (dbus--test-property + "ObjectArray" + '((:array + :object-path "/node00" + :object-path "/node01" + :object-path "/node0/node02") + . ("/node00" "/node01" "/node0/node02")) + '((:array + :object-path "/node10" + :object-path "/node11" + :object-path "/node0/node12") + . ("/node10" "/node11" "/node0/node12"))) + + (dbus--test-property + "Dictionary" + '((:array + :dict-entry (:string "four" (:variant :string "value of four")) + :dict-entry ("five" (:variant :object-path "/node0")) + :dict-entry ("six" (:variant (:array :byte 4 :byte 5 :byte 6)))) + . (("four" + ("value of four")) + ("five" + ("/node0")) + ("six" + ((4 5 6))))) + '((:array + :dict-entry (:string "key0" (:variant (:array :byte 7 :byte 8 :byte 9))) + :dict-entry ("key1" (:variant :string "value")) + :dict-entry ("key2" (:variant :object-path "/node0/node1"))) + . (("key0" + ((7 8 9))) + ("key1" + ("value")) + ("key2" + ("/node0/node1"))))) + + (dbus--test-property ; Syntax emphasizing :dict compound type + "Dictionary" + '((:array + (:dict-entry :string "seven" (:variant :string "value of seven")) + (:dict-entry "eight" (:variant :object-path "/node8")) + (:dict-entry "nine" (:variant (:array :byte 9 :byte 27 :byte 81)))) + . (("seven" + ("value of seven")) + ("eight" + ("/node8")) + ("nine" + ((9 27 81))))) + '((:array + (:dict-entry :string "key4" (:variant (:array :byte 7 :byte 49 :byte 125))) + (:dict-entry "key5" (:variant :string "obsolete")) + (:dict-entry "key6" (:variant :object-path "/node6/node7"))) + . (("key4" + ((7 49 125))) + ("key5" + ("obsolete")) + ("key6" + ("/node6/node7"))))) + + (dbus--test-property + "ByteDictionary" + '((:array + (:dict-entry :byte 8 (:variant :string "byte-eight")) + (:dict-entry :byte 16 (:variant :object-path "/byte/sixteen")) + (:dict-entry :byte 48 (:variant (:array :byte 8 :byte 9 :byte 10)))) + . ((8 ("byte-eight")) + (16 ("/byte/sixteen")) + (48 ((8 9 10)))))) + + (dbus--test-property + "Variant" + '((:variant "Variant string") . ("Variant string")) + '((:variant :byte 42) . (42)) + '((:variant :uint32 1000000) . (1000000)) + '((:variant :object-path "/variant/path") . ("/variant/path")) + '((:variant :signature "a{sa{sv}}") . ("a{sa{sv}}")) + '((:variant (:struct 42 "string" (:object-path "/structure/path") (:variant "last"))) + . ((42 "string" ("/structure/path") ("last"))))) + + ;; Test that :read prevents writes + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "StringArray" :read '(:array "one" "two" :string "three")) + `((:property :session ,dbus--test-interface "StringArray") + (,dbus--test-service ,dbus--test-path)))) + + (should-error ; Cannot set property with :read access + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface + "StringArray" '(:array "seven" "eight" :string "nine")) + :type 'dbus-error) + + (should ; Property value preserved on error + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "StringArray") + '("one" "two" "three"))) + + (should ; Verify property has registered value + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "StringArray") + '("one" "two" "three"))) + + ;; Test mismatched types in array + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "MixedArray" :readwrite + '(:array + :object-path "/node00" + :string "/node01" + :object-path "/node0/node02")) + :type 'wrong-type-argument) + + ;; Test in-range integer values + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue" :readwrite :byte 255) + `((:property :session ,dbus--test-interface "ByteValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue") + 255)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ShortValue" :readwrite :int16 32767) + `((:property :session ,dbus--test-interface "ShortValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ShortValue") + 32767)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UShortValue" :readwrite :uint16 65535) + `((:property :session ,dbus--test-interface "UShortValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UShortValue") + 65535)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "IntValue" :readwrite :int32 2147483647) + `((:property :session ,dbus--test-interface "IntValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "IntValue") + 2147483647)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UIntValue" :readwrite :uint32 4294967295) + `((:property :session ,dbus--test-interface "UIntValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UIntValue") + 4294967295)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "LongValue" :readwrite :int64 9223372036854775807) + `((:property :session ,dbus--test-interface "LongValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "LongValue") + 9223372036854775807)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ULongValue" :readwrite :uint64 18446744073709551615) + `((:property :session ,dbus--test-interface "ULongValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ULongValue") + 18446744073709551615)) + + ;; Test integer overflow + (should + (= + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue" :byte 520) + 8)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue") + 8)) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ShortValue" :readwrite :int16 32800) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UShortValue" :readwrite :uint16 65600) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "IntValue" :readwrite :int32 2147483700) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UIntValue" :readwrite :uint32 4294967300) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "LongValue" :readwrite :int64 9223372036854775900) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ULongValue" :readwrite :uint64 18446744073709551700) + :type 'args-out-of-range) + + ;; dbus-set-property may change property type + (should + (= + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue" 1024) + 1024)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue") + 1024)) + + + (should ; Another change property type + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue" :boolean t) + t)) + + (should + (eq + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue") + t)) + + ;; Test invalid type specification + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "InvalidType" :readwrite :keyword 128) + :type 'wrong-type-argument)) + + ;; Cleanup. + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Add-D-Bus-Introspection-tests.patch Content-Description: Introspection tests. >From 86f5834893efb1bc5fe907ce22d4b81260a2c553 Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Mon, 21 Sep 2020 17:12:49 -0700 Subject: [PATCH 2/2] Add D-Bus Introspection tests. * lisp/net/dbus.el (dbus-annotation-deprecated): New defconst. * test/lisp/net/dbus-tests.el (dbus--tests-dir): New defvar. (dbus--test-introspect, dbus--test-validate-interface) (dbus--test-validate-annotations, dbus--test-validate-property) (dbus--test-validate-m-or-s, dbus--test-validate-signal) (dbus--test-validate-method): New defuns. (dbus-test07-introspection): New test. * test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml: New test data. --- lisp/net/dbus.el | 3 + .../dbus-resources/org.gnu.Emacs.TestDBus.xml | 49 +++ test/lisp/net/dbus-tests.el | 285 +++++++++++++++++- 3 files changed, 336 insertions(+), 1 deletion(-) create mode 100644 test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 86db7cbf18a..7d45c859f12 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -153,6 +153,9 @@ dbus-interface-local ;; ;; +(defconst dbus-annotation-deprecated (concat dbus-interface-dbus ".Deprecated") + "An annotation indicating a deprecated interface, method, signal, or property.") + ;;; Default D-Bus errors. diff --git a/test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml b/test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml new file mode 100644 index 00000000000..620f10510f2 --- /dev/null +++ b/test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 2e0c061a556..b764e8dc8db 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -44,6 +44,13 @@ dbus--test-path (defconst dbus--test-interface "org.gnu.Emacs.TestDBus.Interface" "Test interface.") +(defvar dbus--tests-dir + (file-truename + (expand-file-name "dbus-resources" + (file-name-directory (or load-file-name + buffer-file-name)))) + "Directory containing introspection test data file.") + (defun dbus--test-availability (bus) "Test availability of D-Bus BUS." (should (dbus-list-names bus)) @@ -1056,7 +1063,6 @@ dbus--test-run-property-test (defsubst dbus--test-property (name &rest value-list) "Test a D-Bus property named by string argument NAME. - The argument VALUE-LIST is a sequence of pairs, where each pair represents a value form and an expected returned value form. The first pair in VALUES is used for `dbus-register-property'. @@ -1403,6 +1409,283 @@ dbus-test06-property-types ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(defun dbus--test-introspect () + "Return test introspection string." + (with-temp-buffer + (insert-file (expand-file-name "org.gnu.Emacs.TestDBus.xml" dbus--tests-dir)) + (buffer-string))) + +(defsubst dbus--test-validate-interface + (iface-name expected-properties expected-methods expected-signals + expected-annotations) + "Validate an interface definition for `dbus-test07-introspection'. +The argument IFACE-NAME is a string naming the interface to validate. +The arguments EXPECTED-PROPERTIES, EXPECTED-METHODS, EXPECTED-SIGNALS, and +EXPECTED-ANNOTATIONS represent the names of the interface's properties, +methods, signals, and annotations, respectively." + + (let ((interface + (dbus-introspect-get-interface + :session dbus--test-service dbus--test-path iface-name))) + (pcase-let ((`(interface ((name . ,name)) . ,rest) interface)) + (should + (string-equal name iface-name)) + (should + (string-equal name (dbus-introspect-get-attribute interface "name"))) + + (let (properties methods signals annotations) + (mapc (lambda (x) + (let ((name (dbus-introspect-get-attribute x "name"))) + (cond + ((eq 'property (car x)) (push name properties)) + ((eq 'method (car x)) (push name methods)) + ((eq 'signal (car x)) (push name signals)) + ((eq 'annotation (car x)) (push name annotations))))) + rest) + + (should + (equal + (nreverse properties) + expected-properties)) + (should + (equal + (nreverse methods) + expected-methods)) + (should + (equal + (nreverse signals) + expected-signals)) + (should + (equal + (nreverse annotations) + expected-annotations)))))) + +(defsubst dbus--test-validate-annotations (annotations expected-annotations) + "Validate a list of D-Bus ANNOTATIONS. +Ensure each string in EXPECTED-ANNOTATIONS names an element of ANNOTATIONS. +And ensure each ANNOTATIONS has a value attribute marked \"true\"." + (mapc + (lambda (annotation) + (let ((name (dbus-introspect-get-attribute annotation "name")) + (value (dbus-introspect-get-attribute annotation "value"))) + (should + (member name expected-annotations)) + (should + (equal value "true")))) + annotations)) + +(defsubst dbus--test-validate-property + (interface property-name expected-annotations &rest expected-args) + "Validate a property definition for `dbus-test07-introspection'. + +The argument INTERFACE is a string naming the interface owning PROPERTY-NAME. +The argument PROPERTY-NAME is a string naming the property to validate. +The arguments EXPECTED-ANNOTATIONS is a list of strings matching +the annotation names defined for the method or signal. +The argument EXPECTED-ARGS is a list of expected arguments for the property." + (let* ((property + (dbus-introspect-get-property + :session dbus--test-service dbus--test-path interface property-name)) + (name (dbus-introspect-get-attribute property "name")) + (type (dbus-introspect-get-attribute property "type")) + (access (dbus-introspect-get-attribute property "access")) + (expected (assoc-string name expected-args))) + (should expected) + + (should + (string-equal name property-name)) + + (should + (string-equal + (nth 0 expected) + name)) + + (should + (string-equal + (nth 1 expected) + type)) + + (should + (string-equal + (nth 2 expected) + access)))) + +(defsubst dbus--test-validate-m-or-s (tree expected-annotations expected-args) + "Validate a method or signal definition for `dbus-test07-introspection'. +The argument TREE is an sexp returned from either `dbus-introspect-get-method' +or `dbus-introspect-get-signal' +The arguments EXPECTED-ANNOTATIONS is a list of strings matching +the annotation names defined for the method or signal. +The argument EXPECTED-ARGS is a list of expected arguments for +the method or signal." + (let (args annotations) + (mapc (lambda (elem) + (let ((name (dbus-introspect-get-attribute elem "name"))) + (cond + ((eq 'arg (car elem)) (push elem args)) + ((eq 'annotation (car elem)) (push elem annotations))))) + tree) + (should + (equal + (nreverse args) + expected-args)) + (dbus--test-validate-annotations annotations expected-annotations))) + +(defsubst dbus--test-validate-signal + (interface signal-name expected-annotations &rest expected-args) + "Validate a signal definition for `dbus-test07-introspection'. + +The argument INTERFACE is a string naming the interface owning SIGNAL-NAME. +The argument SIGNAL-NAME is a string naming the signal to validate. +The arguments EXPECTED-ANNOTATIONS is a list of strings matching +the annotation names defined for the signal. +The argument EXPECTED-ARGS is a list of expected arguments for the signal." + (let ((signal + (dbus-introspect-get-signal + :session dbus--test-service dbus--test-path interface signal-name))) + (pcase-let ((`(signal ((name . ,name)) . ,rest) signal)) + (should + (string-equal name signal-name)) + (should + (string-equal name (dbus-introspect-get-attribute signal "name"))) + (dbus--test-validate-m-or-s rest expected-annotations expected-args)))) + + +(defsubst dbus--test-validate-method + (interface method-name expected-annotations &rest expected-args) + "Validate a method definition for `dbus-test07-introspection'. + +The argument INTERFACE is a string naming the interface owning METHOD-NAME. +The argument METHOD-NAME is a string naming the method to validate. +The arguments EXPECTED-ANNOTATIONS is a list of strings matching +the annotation names defined for the method. +The argument EXPECTED-ARGS is a list of expected arguments for the method." + (let ((method + (dbus-introspect-get-method + :session dbus--test-service dbus--test-path interface method-name))) + (pcase-let ((`(method ((name . ,name)) . ,rest) method)) + (should + (string-equal name method-name)) + (should + (string-equal name (dbus-introspect-get-attribute method "name"))) + (dbus--test-validate-m-or-s rest expected-annotations expected-args)))) + +(ert-deftest dbus-test07-introspection () + "Register an Introspection interface then query it." + :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) + + ;; Prepare introspection response + (dbus-register-method + :session dbus--test-service dbus--test-path dbus-interface-introspectable + "Introspect" 'dbus--test-introspect) + + (unwind-protect + (progn + ;; dbus-introspect-get-node-names + (should + (equal + (dbus-introspect-get-node-names + :session dbus--test-service dbus--test-path) + '("node0" "node1"))) + + ;; dbus-introspect-get-all-nodes + (should + (equal + (dbus-introspect-get-all-nodes + :session dbus--test-service dbus--test-path) + (list dbus--test-path + (concat dbus--test-path "/node0") + (concat dbus--test-path "/node1")))) + + ;; dbus-introspect-get-interface-names + (let ((interfaces + (dbus-introspect-get-interface-names + :session dbus--test-service dbus--test-path))) + + (should + (equal + interfaces + `(,dbus-interface-introspectable + ,dbus-interface-properties + ,dbus--test-interface))) + + (dbus--test-validate-interface + dbus-interface-introspectable nil '("Introspect") nil nil) + + ;; dbus-introspect-get-interface via `dbus--test-validate-interface' + (dbus--test-validate-interface + dbus-interface-properties nil + '("Get" "Set" "GetAll") '("PropertiesChanged") nil) + + (dbus--test-validate-interface + dbus--test-interface '("Connected" "Player") + '("Connect" "DeprecatedMethod0" "DeprecatedMethod1") nil + `(,dbus-annotation-deprecated))) + + ;; dbus-introspect-get-method-names + (let ((methods + (dbus-introspect-get-method-names + :session dbus--test-service dbus--test-path + dbus--test-interface))) + (should + (equal + methods + '("Connect" "DeprecatedMethod0" "DeprecatedMethod1"))) + + ;; dbus-introspect-get-method via 'dbus--test-validate-method + (dbus--test-validate-method + dbus--test-interface "Connect" nil + '(arg ((name . "uuid") (type . "s") (direction . "in"))) + '(arg ((name . "mode") (type . "y") (direction . "in"))) + '(arg ((name . "options") (type . "a{sv}") (direction . "in"))) + '(arg ((name . "interface") (type . "s") (direction . "out")))) + + (dbus--test-validate-method + dbus--test-interface "DeprecatedMethod0" + `(,dbus-annotation-deprecated)) + + (dbus--test-validate-method + dbus--test-interface "DeprecatedMethod1" + `(,dbus-annotation-deprecated))) + + ;; dbus-introspect-get-signal-names + (let ((signals + (dbus-introspect-get-signal-names + :session dbus--test-service dbus--test-path + dbus-interface-properties))) + (should + (equal + signals + '("PropertiesChanged"))) + + ;; dbus-introspect-get-signal via 'dbus--test-validate-signal + (dbus--test-validate-signal + dbus-interface-properties "PropertiesChanged" nil + '(arg ((name . "interface") (type . "s"))) + '(arg ((name . "changed_properties") (type . "a{sv}"))) + '(arg ((name . "invalidated_properties") (type . "as"))))) + + ;; dbus-intropct-get-property-names + (let ((properties + (dbus-introspect-get-property-names + :session dbus--test-service dbus--test-path + dbus--test-interface))) + (should + (equal + properties + '("Connected" "Player"))) + + ;; dbus-introspect-get-property via 'dbus--test-validate-property + (dbus--test-validate-property + dbus--test-interface "Connected" nil + '("Connected" "b" "read") + '("Player" "o" "read")))) + + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 24 04:48:55 2020 Received: (at 43252) by debbugs.gnu.org; 24 Sep 2020 08:48:55 +0000 Received: from localhost ([127.0.0.1]:38570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLMvu-0007vp-Vj for submit@debbugs.gnu.org; Thu, 24 Sep 2020 04:48:55 -0400 Received: from mout.gmx.net ([212.227.17.22]:41817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLMvt-0007vd-HH for 43252@debbugs.gnu.org; Thu, 24 Sep 2020 04:48:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600937325; bh=IvwJCoHvvubX6njbRkXN36foUn+9G+Sv86cKkFhpg2w=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Qv0Lblc7fmtTJ6vobR3tUEWdd23KR0d6TNcHlbm5UylSLEWYcYVwhK7giiS/zoRYm AO7CS27zzN7ceUJUaVvseaxjH2h1MmVp7AUXpPiektMtc0ePSPRq/Org2akartwh8o lj58yN5A2IFAXRbfnZUyjKZ2nF6zX66CpIx261m8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.158.242]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N5G9t-1kTRPw1V1p-011DXC; Thu, 24 Sep 2020 10:48:41 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.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> <87eemt67eg.fsf@gmx.de> <87wo0l8908.fsf@ccss.com> <87wo0kielj.fsf@gmx.de> <87r1qr98sf.fsf@ccss.com> Date: Thu, 24 Sep 2020 10:48:40 +0200 In-Reply-To: <87r1qr98sf.fsf@ccss.com> (Hugh Daschbach's message of "Wed, 23 Sep 2020 20:02:24 -0700") Message-ID: <87r1qrimqf.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:5dGaqZvjIa/4PHNXPT+QeEhCkB8pKXTAoM5wzXzV9JIjZnqz4dx H/zWS6qi9pATEiVFoOnD84P0JJYU1B9xrb/1/Hfw//0Lnz4zNEV9sbrwJtIa16xWdkYpW7u bKlvP8dFpIXWZsJAN3chViRSTVfMo3LaWaeQhfyGOlIkfKLG1t5fKHHdyo6OmIk7gz+AlJu un/aY7IPblOybsCwrTx5Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:OBV9bqCZ6s0=:xYsx9kKFuxKSOK/99GZFrC vR4EQ+AECXGMS+h3bM+dxtOP2mgGhlZiJ8C40XhozIECqAXjyQAF46ix08ThJROSnqDV1BFk+ M06ud7UXxkewjff6NEBqW54FrNLg9OPKEMdGBMuZcmI5KAH25NjBQqpyorkuUIAIU3tZef7jS qf9dOcVUclnerytMJ4QfoO14YR7I4pSxoOpd5s/uDZWeSpSpgrdiMT/e6HMZuZ2n3MpJM94as 3V8/v1Hwv8U1WjQTDXJw0qMHpKnIU06n6BwE6JO4bZl6fcoDbXDwnW76R+fFdRgek593YHyHh 58A1NZNx1A7/L0LCSm7ATnHkUe6W3D+2UfOiNqzw1KUEA8Jj51WXta5aPCtoGK20bAr/FyMVj FE5bYKJz/QeFI2uYKDgV/TaDtnbswfosGlkNtpc+lQEZDANqULq+6zMPVKgwzDLFnH011O5Bb PPB4KwHCpN8g09FoM4SFSdu7UkJpqCwJvx/GxqqFivHv8kSW06mhsQIRni5RCcOEonpmloMcC 315sUdQTq+co2qJfi0a/N4UzX4QNBWfI0L9gGg8pVGd/l9a4/1O0+0qeRI06XF3gGurESe8iw aCylP5bTFNajXgfO/dDJ0DZpC+KILMyolnw4qDPrPtMvcnOZGMegN8pA7Oj6MwdhzWB21pQoK zRh/Zt7fWxEQ54RlioS2n6Ub2SeGxs1lsZSKTfwh2mHaK5kuxHmiRLK8/K+OQmkMkWdCjZFUj QOsV1H//cg43mNMPkYiEoflRrarsy/tuk0LhXEvhjCzT9zOOo1rNgJPUYgWzIaFN7t6CjRP48 ujn6KBb2zlpvxgecpmJEqkkQ4sCqvdUbj4cE829y/eSssyexX+lO+gk5S8hL7aLWpIncteWTs zc3VOVB1hmWMgDtjOhoj5yy6gmj0BQqn9DrJoX8iMjmuDcj3VGbzdNC2RzrqKMBrpOEpohVk9 GkmSFMyxX3Gj8vXnhakSwC4w6rfhjWDbKqekZM9gS7eRAkXQyZJItyw67lLbZ3+IXT6utCYuJ pbu06ayeegb97kxeXgipNQ30c71pfVZTis4UCiy2419N6zKo3GOKe+V4dHGw/FdbpK2crwgWP OI607RJDSzcA6py01KvPGDtiZs+hQRFvjcjqXLYZ9UfYW8zlxs53hLuIquu3bvAXvfMvUEJ8k TzRdp8tiMhW9QaGAhRFnRD+DxCPc4G7n7EJvzMtc0huczX2qr5V+jjgSAFZuU0IUN5NYLiAf5 m5e9515PB/vP6jelVTnEMmZEwz6NQ9OKTxXrpDw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, > I think I've addressed all the issues you pointed out. Let me know if > there's something that still doesn't look right. I've roughly scanned the patches, they look almost OK. Let's wait now for appearing your name on the copyright file. Anyway, here's my nit of the day: > * test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml: New test data. This shall be dbus-resources. > Thanks > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 00:16:34 2020 Received: (at 43252) by debbugs.gnu.org; 25 Sep 2020 04:16:34 +0000 Received: from localhost ([127.0.0.1]:42311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLf9u-0007Ty-Ce for submit@debbugs.gnu.org; Fri, 25 Sep 2020 00:16:34 -0400 Received: from mail1.ccss.com ([159.203.255.73]:36450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLf9r-0007Tk-J7 for 43252@debbugs.gnu.org; Fri, 25 Sep 2020 00:16:33 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id ECA55BF8F6; Thu, 24 Sep 2020 21:16:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id 5AFF3BF8F4; Thu, 24 Sep 2020 21:16:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 319B2176129B; Thu, 24 Sep 2020 21:16:25 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5u_B0dURsv7c; Thu, 24 Sep 2020 21:16:19 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 448D517606BF; Thu, 24 Sep 2020 21:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1601007379; bh=YR5pJMK8IHd8yYa9ZeO3kdmbNTnp7KxnFcdO/pbx774=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=VAutfeH/sBZsdVXj/8TvosA84+2Spfa3RQi1xSBliySUwReRr3ZKXKlFUhc3xFpEH MEsbEUhCN0Qd3Ss2X3pYovVsrEJLQC4F655z7p62Cs8qeTJ9EFMYkl/6Lxnz883tTD BNGtjQeviiON6xPPJTfwJVF+ljJNeRXu5PyVmd6MDNHwfnmoTQTFmVRWBg9uIKE63Y RWJeXDWy3V7KIWKfaHusSliaLiYeepiGuId/T4DwhkeCsgjFV7Q52C2D69QvBE6jgB +pVQHj4xUpd76aRUEJk8le+x7R+85jmLnkQiJRejdhljY+y3Nbe4nidn8Wgdvm1Nz4 EvaEqUVQm+1/g== References: <87v9gqquct.fsf@ccss.com> <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> <87eemt67eg.fsf@gmx.de> <87wo0l8908.fsf@ccss.com> <87wo0kielj.fsf@gmx.de> <87r1qr98sf.fsf@ccss.com> <87r1qrimqf.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87r1qrimqf.fsf@gmx.de> Date: Thu, 24 Sep 2020 21:16:18 -0700 Message-ID: <87o8lu8p9p.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > >> I think I've addressed all the issues you pointed out. Let me know if >> there's something that still doesn't look right. > > I've roughly scanned the patches, they look almost OK. Let's wait now > for appearing your name on the copyright file. > > Anyway, here's my nit of the day: > >> * test/lisp/net/dbus-tests/org.gnu.Emacs.TestDBus.xml: New test data. > > This shall be dbus-resources. Thanks. Fixed. Will wait for the paperwork to clear. Then will rebase and send you a final copy of the patches. >> Thanks >> Hugh > > Best regards, Michael. I've taken a brief look at performance of the introspection tests. The long pole seems to be ERT, rather than the tests themselves. Running the profiler while running ert showed The cpu profiler report for running dbus-test07-introspection breaks down something like: - GC - 30% - dbus-* - 30% - ert-* - 40% So I pulled introspection tests out into a separate file, redefined `should', and reran dbus-test07-introspection. It completed almost instantly. I wrapped the body of dbus-test07-introspection in a dotimes form with 50 iterations. That completes in roughly 1.1 seconds. Comparing runtime and GC cycles for a single run, running with ERT: 2 gcs in 2.228295 sec running w/o ERT: 1 gcs in 0.036733 sec Those numbers come from: (let ((start (current-time)) (gcs gcs-done)) ;; test program call (message "%d gcs in %02f sec" (- gcs-done gcs) (float-time (time-since start)))) I'm not well versed in chasing Emacs performance issues, bit this looks to me more like testing than introspection overhead. Any suggestions? Cheers, Hugh From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 21:27:53 2020 Received: (at 43252) by debbugs.gnu.org; 26 Sep 2020 01:27:53 +0000 Received: from localhost ([127.0.0.1]:45537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLz0C-0007ND-Qs for submit@debbugs.gnu.org; Fri, 25 Sep 2020 21:27:53 -0400 Received: from mail1.ccss.com ([159.203.255.73]:38466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLz0B-0007N0-5Z for 43252@debbugs.gnu.org; Fri, 25 Sep 2020 21:27:52 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 76F79BF903; Fri, 25 Sep 2020 18:27:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id E8260BF8FE; Fri, 25 Sep 2020 18:27:44 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id BC77D17606B6; Fri, 25 Sep 2020 18:27:44 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eaoSsp2MLo_g; Fri, 25 Sep 2020 18:27:39 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 1CA171760580; Fri, 25 Sep 2020 18:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1601083659; bh=JHJxpYIwh5Lrl6WZQvKtS57SZnV1N6Psh+v5oW2JY84=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=UCj9ZKSMWO3b4/b1BK80/JavXmSXzMhGTOsFP+VY3DzPDsWgLJit65ggKe/kQO6x6 8FLj2kc6osF6lPsjXM34dxw7Dz7a14mmRm2sMsFXuu6g/241+7QhA0vOxiocVsitmd NiQZ2aAXdXDO4d5mD/VevCHMu4sM3xzeMAYjb7tISEqFqcSFwaXgkxlDz5TIRRWCpL y3ubx/1aiOfIabz6AjgrjEJI9rfznzORsx4PbU2BHYDQrKbsmgxiTUJxos6GgdYCOx QVZTUEICex65sqBhsm31dMSfEYgNySFD3CIuo7p7mTYkleHFgGVniRABM8CEv9A2mM mqYX9KA1f6vlA== References: <87v9gqquct.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> <87eemt67eg.fsf@gmx.de> <87wo0l8908.fsf@ccss.com> <87wo0kielj.fsf@gmx.de> <87r1qr98sf.fsf@ccss.com> <87r1qrimqf.fsf@gmx.de> <87o8lu8p9p.fsf@ccss.com> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87o8lu8p9p.fsf@ccss.com> Date: Fri, 25 Sep 2020 18:27:38 -0700 Message-ID: <87lfgx8gz9.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hugh Daschbach writes: > I've taken a brief look at performance of the introspection tests. The > long pole seems to be ERT, rather than the tests themselves. > ... > I'm not well versed in chasing Emacs performance issues, bit this looks > to me more like testing than introspection overhead. Any > suggestions? Wrong again. Digging further, I find that my performance tests were in error. Fixing that, elp helped me find that the performance hit came from mishandling incoming introspection requests in =E2=80=98dbus--test-introspe= ct=E2=80=99. I hadn=E2=80=99t registered =E2=80=98dbus--test-introspect=E2=80=99 for the= two subnodes exposed in the xml file. So introspecting those nodes timed out. Each timeout cost a second. I=E2=80=99ve fixed this for the next patch set. The change was simple enou= gh. I think that can wait until the paperwork clears, unless you want an earlier look. Cheers, Hugh From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 05:51:54 2020 Received: (at 43252) by debbugs.gnu.org; 26 Sep 2020 09:51:54 +0000 Received: from localhost ([127.0.0.1]:45833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM6ry-0004ga-D5 for submit@debbugs.gnu.org; Sat, 26 Sep 2020 05:51:54 -0400 Received: from mout.gmx.net ([212.227.15.19]:35649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM6rv-0004gJ-Sl for 43252@debbugs.gnu.org; Sat, 26 Sep 2020 05:51:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601113904; bh=Uf638HKbwLMIE2e9MVqHvMGP5weOfCzxb6D6gVa6K7I=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=IdviALAGDWjd6MCJIXitrT104rtBIeLHuGI8PvGbsNCO6ex0iUXmomrrSBaG2KOi5 lTLpPAxAOBW7MzkhPM+cV0hndr1qKsTM6zi4WMV2pcxCEO+FyOLkE58dNlblKeWElY eMCgnz6CpSMgdzfCAooeNDTFgy+K2JmNOrfb4Z9Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.91.238.161]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MUGe1-1juzE43AcV-00RM2Q; Sat, 26 Sep 2020 11:51:43 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <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> <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> Date: Sat, 26 Sep 2020 11:51:42 +0200 In-Reply-To: <87lfgx8gz9.fsf@ccss.com> (Hugh Daschbach's message of "Fri, 25 Sep 2020 18:27:38 -0700") Message-ID: <87lfgw987l.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:SR0aqF6WVVCeMZt0lbnWBzlsG7839qWwwqFITCXpbSLfJf+QdbB SRi/wR77nowNahO0TZ3SWJ7N3r7o1qJZQlFD1b46Eqy61CLCzrhEHOpfUcLIksEejcDmpv9 VZZjf3Y48pn1h3q1X2AAW73Wm2ZklVcoH/ZVe6E0TLGhLU5dsfI5Xh/bAcGzuOwjcgB2q9e NKUk1lqwNAE5WwdaHbg3w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Z6IWB/+/oRE=:PDQ8qSQBu1PvDnv5ce/F88 PMuwChudK0tvFScOcwTWU4zjsrK0Xbch0Ii82J/xka9R2xbRDgZA5TN7qA/fWJOJybR6euuOW 7Ycp9LbH8k06fZMBxhwtJZOoPdU8rFVqlriO5hotGMUDB2LtmHTMBPcP5h5SyefgRsY9QojOG 46KDa2z9qZL1LUSESzs/JQTqxKK18GgvqSZqUvIDtqZMnYJ67KNMzyMUq85TwiIi+J/VzHe4+ vhpPGf4eWu1bVKRoYV623inutj3EaezY+IRohIoo3m3uSW39y4p65vsCwZ5lAhpzcpMNPNJSx ZjbXKmnqgSnlJ6z0FLGBeRt/3vlgKPvAP2/6KaJ6xlrAPW70Sm1RLmy7lCewNiBWsNWWY1iyV Qxa25JZkHYvzlWN7y6TH5xYxj78pyRIF+DDRiZO7PZxPJHXafCYpI5MiBpPeXjv0V36tGgoUg NJvGWWPmM0ZIQXU3yG8BVker/nRUGM5JmE9DlfYRUC8R1G9kUCmKTSvUHXynRGIS1Wmv/VTSM gvXYLMIRWdZCcjb0zoaTmVTSb+oHlE97O5nNguEr3x+nLNm7shGpTufTXGp3+5K+zF1l+3+Tq myZNUMfXga9Llwsvz7rh8i/doWdEB5Lq3JyISHo456Q4Vc+NDHFnqDkSFF9fiFELwi+3CWqTi DC0CIiwyUgL/YfH96vFFquLbto9z2lAv6FqTx20yZlPlqOqPfzQibLj7usfmFbXdIqDrKHdCA mIYdZsfq6oO6lZ4yRlqLgDJWf1bkeb30KjO4G7eOktLS1Fm2LoUyQFQcXwZf3R2P5mIwIShlt e2AwoRFXxrjgXECmweh1X6uzrF2rhIOazFvc52ExKGS5DazZIvL94aNuZ8uvFa5SbfZwdoBd9 rCaqRpWMjTq4b1js4Iyw6jLlJlYc9P2WJmQUkTYo5yEpXj+x3Y58H9XCZUE0s9bmPTe+Xc3+Q kYoUv4b0EeX65RBIgtQz+FfYsnNT8hL/coj2eLr1pfSj9z7sZR1dB5vWTqEECgJGXKol1uGLM thjJM/c6ARjeMGNp1sgolgGYA19YGAwlo1ZoJNk3tJ/YEFS9ZoYCmA8q9lNKh4ycPZ9bVX+1v kxxkyKC7Z1RLvzJE6f5EKVdYu31VZWSsHKwAUCJZ4waiU9+sZ9ehSCxjLRE+MtC4sF5TysuE+ f1SAvYHOkYsM+VLgI4X/o3CL7ESYCImH0NvbDTO/MndwXjPkc+VgLoM7+i/D4ApEUvftkBQjD trULVRQTXtINAefokW2+uzVw3QnpWHBkOIRV81g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hugh Daschbach writes: Hi Hugh, > Fixing that, elp helped me find that the performance hit came from > mishandling incoming introspection requests in =E2=80=98dbus--test-intros= pect=E2=80=99. Good to know. Introspection isn't to punish :-) > I hadn=E2=80=99t registered =E2=80=98dbus--test-introspect=E2=80=99 for t= he two subnodes exposed > in the xml file. So introspecting those nodes timed out. Each timeout > cost a second. OK. But maybe you add also one or two tests to check this error functionali= ty. > I=E2=80=99ve fixed this for the next patch set. The change was simple en= ough. > I think that can wait until the paperwork clears, unless you want an > earlier look. Sure, this can wait. Btw, I have just pushed a larger patch to master. It implements a first shot on the org.freedesktop.DBus.Monitoring.BecomeMonitor functionality. If you want to see how it works, just call (dbus-register-monitor :session) . There will be a new buffer *D-Bus Monitor*, which shows you D-Bus messages similar to what the UNIX command "dbus-monitor --session" does. The point is that you can register your own handler to the monitor; if you don't declare an own handler, the default handler `dbus-monitor-handler' is taken. As said, it is just a first shot. Proper documentation is missing, and not all arguments of `dbus-register-monitor' seem to work as expected. But you might see which direction it will go; any feedback is appreciated. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 27 23:00:55 2020 Received: (at 43252) by debbugs.gnu.org; 28 Sep 2020 03:00:55 +0000 Received: from localhost ([127.0.0.1]:50862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMjPL-0008Vy-98 for submit@debbugs.gnu.org; Sun, 27 Sep 2020 23:00:55 -0400 Received: from mail1.ccss.com ([159.203.255.73]:42738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMjPK-0008Vm-5E for 43252@debbugs.gnu.org; Sun, 27 Sep 2020 23:00:54 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 6A3FDBF89E; Sun, 27 Sep 2020 20:00:48 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id AF8E1BF87D; Sun, 27 Sep 2020 20:00:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 7E4AE1761278; Sun, 27 Sep 2020 20:00:47 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YBRINoVanC8I; Sun, 27 Sep 2020 20:00:41 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id A7343176125E; Sun, 27 Sep 2020 20:00:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1601262041; bh=b+m+Zhi8W2PJFo+8BKYpwTwxHOe04JyQDHZEptGJqX0=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=Mvl04BG9FxQYM1xXnWIIB6yjvo8F+ZiwnRNGM5HPFaNnPTxO8JcQzVUxwyPKHDVIO eExX/xRZNJcbJW089To/UalT54TYwFMLAcdnq5XVbT17hQIO/F3zAtWvXEnibqvSAU 53rkyRHs+J+LaaKCnvm0GNpTbDlJ4rfwnR/WfRmRxYDg8X/6N1pNlun6UTPWhvkv0c 67OKseDkVyjOfeOhLgC3/V8KbeGkGMDu05UB8MYBoGoxjuFtF2UKL+hheK4+iFNpFc QW0CVvnoJPDCSqyfFwMaFTsEJS6buCjcyCV4QBWZSJ9CUeygI9oaA7VgbLS/dI/SqQ oKYefN9t0u8fA== References: <87v9gqquct.fsf@ccss.com> <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> <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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87lfgw987l.fsf@gmx.de> Date: Sun, 27 Sep 2020 20:00:17 -0700 Message-ID: <87imby8v26.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Hugh Daschbach writes: > >> in the xml file. So introspecting those nodes timed out. Each timeout >> cost a second. > > OK. But maybe you add also one or two tests to check this error functiona= lity. Done. dbus-test07-introspection now has a test that no timeout occurred. It is no longer tagged :expensive-test. A new dbus-test07-timeout tests both implicit (dbus-introspect-*) and explicit (dbus-call-method) timeouts. It is tagged :expensive-test. >> I=E2=80=99ve fixed this for the next patch set. The change was simple e= nough. > Btw, I have just pushed a larger patch to master. It implements a first > shot on the org.freedesktop.DBus.Monitoring.BecomeMonitor > functionality. If you want to see how it works, just call > (dbus-register-monitor :session) . There will be a new buffer *D-Bus > Monitor*, which shows you D-Bus messages similar to what the UNIX > command "dbus-monitor --session" does. The point is that you can > register your own handler to the monitor; if you don't declare an own > handler, the default handler `dbus-monitor-handler' is taken. > > As said, it is just a first shot. Proper documentation is missing, and > not all arguments of `dbus-register-monitor' seem to work as > expected. But you might see which direction it will go; any feedback is > appreciated. Impressive. This is a great source of proper signature syntax. Not to mention a most useful debugging tool. Nice. Timestamps (perhaps optional) would be useful, I think. Cheers, Hugh From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 08:56:12 2020 Received: (at 43252) by debbugs.gnu.org; 28 Sep 2020 12:56:12 +0000 Received: from localhost ([127.0.0.1]:51882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMshQ-0002k7-2j for submit@debbugs.gnu.org; Mon, 28 Sep 2020 08:56:12 -0400 Received: from mout.gmx.net ([212.227.17.22]:36151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMshL-0002jk-1S for 43252@debbugs.gnu.org; Mon, 28 Sep 2020 08:56:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601297758; bh=/oT0N/uOhLzBwZX86U1nfgwLb4hUrmpAqq4QIFdm2uM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=aJ4RpUCiaQ42JFWLJ4KxVgzZXdX1i343XKZaVLyABeGWJieQ0rY/ry0hr3VmHehC7 lxKd3/2sGTT9o3FhwFXhTICjye1jw3DWekZMe+LaCSyybLf/5HPYXckOFNPTNfkDwm /XDina/SHfNwI1/aaeX0XmSggQb3g6pXZVk8qz68= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.119.114]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MOiHf-1k4MKn07wt-00Q9vX; Mon, 28 Sep 2020 14:55:58 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.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> <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> Date: Mon, 28 Sep 2020 14:55:56 +0200 In-Reply-To: <87imby8v26.fsf@ccss.com> (Hugh Daschbach's message of "Sun, 27 Sep 2020 20:00:17 -0700") Message-ID: <87zh5arrfn.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:oa8yhUPJLjFEiFtMJvm7JB2i9kjhnz79HjNfgvmBMgqRWB0poNV rPEGhbnKmW6tvpBHqAfcouIMJVAivzzTRL6VLUmkCCEuMdmxCKFtwX3UPzQ2Cs6SKXT8ys2 GvegB9PHJLIQtz/su7pjV7QssH4f32xHf1o4Q3N6DX5eyyoBCV4TiZEgoUznJW8W0109SwQ ojcpbHmcPJfe8pwgkjucg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:B6KErhnL1m4=:5QsSvxhq6WdQVtUybuqP+U M9N+ILyLjUYYHtazobUDtMmzYGkQt71b5LS8nnTpbV8l1Em7M0RzyZw4uEiXGMRD6G0h8hg+5 +/6qMQT1pQlmHEdGBGgfZgueV370Qn+b7qjOkxaYQM03m/ZeTNsvzT7YnVBQSS7pPUMMlscZX S05Bx4u62vi/z8PUPsLwxgJW69iuswzvENh0EDaYC3JeFnX3VZ0srW9LwnIxn//eKDY+1O0aY 4bK3K/WDtRW2qQcDkO5LxR9/4a1MruWSgo7tNIoBeSHYW2IpDd3KCeRGykRpC2TSxbYUJLIc6 W0pWY9YgVLbShamyTgfjkh/XXqa9oImTOfMkDLRVPzqxR3ECghxQ/1xa8BB8rCZsd7NtYhVh0 Ux01ooSXy3evG1Hz03bATYU2BpOCjUpEWaQepKCs73Lamjcd1AdVcpa/GtxciRK1J3/Eq+spS VsebxvmcYs6GqEeZedWWd1gdfiePQkALM3x2vgg/tQ05wy08t83DXAKdvumiXv1qN5RGh0+kz AwfkM4odRSvdbycybM+UQP65wOlLzfK8B5yb1FTuua4DTUZ1aQek5+SoowQIhNAd2XcXd6XBM E8N5bShboFdMSBxTWt9OR4Ud18hixVBSOzatxpf/0YAb/zcB+Y+X3YEt6PLdvbhRHtebQrVJe XjzfQAVhEHnaWRwizVEnmTgVJXiOLktjT6wDETxZW680ZEPk8h4DsesdP5MzccEuzcLViBoAL dyVxjwPdYzSYnLCjNQCsAvOH8STloEEiZ990O4UV9NWhJ/Win7vOvZIuw/xl5Q5df+mWNaU6H WJZnN+qA/Z7Iet3mjjOpyhnRq4fSeq4BaaL2BY5+6kgDUwELS5QZA+X9RMqKSboghi6lKDj5D i/am9KOalG9cZ5zrVfc2ZSISAmXNZQZWFadOK4m7vYXy+i34hOG1kg7GuBaLz3v4P7WDNfwCB /ytHQg1UGnW/kcxXibQ1LoruCnOeSr4XAGI6I532L4ZKOpqZ9n8rVo2mL4FvTD3FtdwpgosKo lGdRc0vesH2893sw/p6oJ14AqvNI5O8C8VVEkHFVNGMWjaav86et2o8Pg9a3rwlSVQNS/w8IC J4Usldfuy/ihxdaYjuC3ne0wnKi0woFM6K9dciFwkQ7sIZ3NqUJ77qqrc8QUYdamYCEWzbypx 4UKuJHydG7pZ6gprYxvwpKL1GeRXgb71nDoKDV7PX6gj/OxICDGlpv7PesdsFA/b7Gav1JERR 7JXcgCyX2IEcNrkqq0iTiEXQnMZVtyardS2Eo8g== X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hugh Daschbach writes: Hi Hugh, > A new dbus-test07-timeout tests both implicit (dbus-introspect-*) and > explicit (dbus-call-method) timeouts. It is tagged :expensive-test. I like the idea of having test groups (identified by test). This makes it more easy to select only tests I'm interested in. 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. > 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. 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. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 19:18:16 2020 Received: (at 43252) by debbugs.gnu.org; 28 Sep 2020 23:18:16 +0000 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 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 Received: by mail1.ccss.com (Postfix, from userid 114) id F0B93BF8D0; Mon, 28 Sep 2020 16:18:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 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) 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) 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) 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== 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> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87zh5arrfn.fsf@gmx.de> Date: Mon, 28 Sep 2020 16:17:53 -0700 Message-ID: <87ft718p9a.fsf@ccss.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= 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 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 29 08:22:27 2020 Received: (at 43252) by debbugs.gnu.org; 29 Sep 2020 12:22:27 +0000 Received: from localhost ([127.0.0.1]:55134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNEeJ-00060g-0e for submit@debbugs.gnu.org; Tue, 29 Sep 2020 08:22:27 -0400 Received: from mout.gmx.net ([212.227.15.18]:55117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNEeH-00060N-4p for 43252@debbugs.gnu.org; Tue, 29 Sep 2020 08:22:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601382137; bh=5RbTxU6Qc9qjeSrh3Sss/pJiSVQ7xfia8cxVU9uPBVM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=R2zgvmCCnLyh01ozG9H10JloS838jcMer5kPDXhy0EeahlsSIweCDZmRt5p3lJmLp u2gd2PeWb1EQC0N+44NK/MqTxU/CPGa7v0BN8C2b/gn5IyAFQm/f4oLJfRuBKxXjl3 JStSNbZX+5uRojh2pBNndO3aCUA3LrtFAR7/Jq8U= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.50.145]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M1Ycr-1kOcM62B7z-00335s; Tue, 29 Sep 2020 14:22:17 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.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> <87ft718p9a.fsf@ccss.com> Date: Tue, 29 Sep 2020 14:22:16 +0200 In-Reply-To: <87ft718p9a.fsf@ccss.com> (Hugh Daschbach's message of "Mon, 28 Sep 2020 16:17:53 -0700") Message-ID: <87k0wchix3.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:IxSr4u62MJ5zYSqcykyKzvPx6H4b4OB4uO0J617sG4cq0jiyGzt mTC4LWmUu1TvfFmXSIjZ842KYZ0x+huSwdyUpwizVGcEuh8SJsOc/8aOr8QB7H0zTlMt1Nn 6T0oTp2rld+ZwFz738GjMrGvEoNlI5voW6sMgw6YLCNd/bfstkZHKdiNIwv8VE8754dVFn0 i5PY9DS6mwHnzZoVVGU3g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4mo3KHri6V0=:LiP2II03HzpiRXg1yre4fw 3FgjIlUfAzuUGbziF6+3I2Lj+LegzHJY/p3OXRv9EThi4rOqG/oSUyYVVHSzYwJFrk7rNEgxq GsZ4Tx8aOAIwF1A5n+V7CtTWo9B/h/GjvFmcKCcShe3D8ebEAhPkbqFZMhJkpDYPtME1aJLAD 7uGlyduWGgGawwGskTNiWH9I0zNuQtKvgS0+nmb1VU6WmPKPKeoQdzc/xlLULG6tujABQYlsz AI6S2J39L9ZVflXcZKQXpYimQyFC3gVhwbh3R41l5SMMu3fRhuLkvYQhjpjAyPwsGmhfrU1DF sOl1Eu88sYB6+yjqtpG5cwnfIFSHgIxfgtAnMWynr72xpJwsyd9Aq24+mJyb8sRNK/YsbRTSZ qItw84/WBtWpkiykYXBMqZMiWY2qPWrmKQ27i6ZcKhlKQ29Iwsx1Zcrnq5PaKCLTrBjZeHKdH jd1LhLS9DFlDtLCcf9gKtuZtAlKpF7Xz1diuIprzpJFSmVT8g7R3u75Z1uZVpP+VZrMpAPJNm nPVmFqZFAms61Cl/KDArysetclnKtatfynWhY9zc2yXOyolCMa5muGMc8C3fd27ICD3tXKqAx OolFJn7xyIbCvLT+68j7gdkhUiny6LZ5xD702UFldO23fiiN1UXZCufMtqWKU6E/dvdx3A/V0 yU3NqEx2mQ2yJPynZOfhJ7nel9TWgLEhyaTrv6Ghh64n19Bg59UWDIrN8XF3CM9yRdggnY79f Fr5p5BeVcRp18QMotmJJBotu3lQ7/XBZSOPt2sq8d7Eis96k7oXZ0igFJuh2yi0kUl9mNQZJO 2VSxOo0jO4O7oVQ+mjPtGxD5PbT/9iF5KMv/3kPc1czsmc6+nnt/lsIOphI/7LIjm26IMgTfY 5B2CPC4zSgGJoWyDInQawQGPEQ6kLZs+nVZx7rJUMypsht8YnrgWoQDSJikZvgJHXbVbNcXLP AztWQGqPEtzfUZ02Oxy9C8ft1xqWKpULiiwrx1VdmBVp5kPyUA4Sgk2O4MGDDhF/ffWxuyKVV 8HadtqyhVLdQZquo+Pp8rJczCAdOv6e8co8t3Riy/w6yAMky7yiglg+QH8PvBAp+9w+Wa1qPB 64G2eNn6TJAT+0z90HwOe/BAPuwhffPjdJUXowamCy5gC/JbtdIba0BJokjmY9+fKfWAgwjjj w6OHsXF57RLRC9/rF4lQyjavAiP15+XQfkmTiw5WzJzXTEWbrvk6EbzlBZ/3cFya3yBaqP92d kZ/G6s1SfaTdL4TBaUWDY/ulwSWIsJ3VkiRzKNQ== X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. Thanks. LGTM. > Cheers, > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 29 17:51:26 2020 Received: (at 43252) by debbugs.gnu.org; 29 Sep 2020 21:51:26 +0000 Received: from localhost ([127.0.0.1]:57404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNNWv-0001Vp-9q for submit@debbugs.gnu.org; Tue, 29 Sep 2020 17:51:26 -0400 Received: from mail1.ccss.com ([159.203.255.73]:47914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNNWr-0001VX-88 for 43252@debbugs.gnu.org; Tue, 29 Sep 2020 17:51:24 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 6F3EABF8A3; Tue, 29 Sep 2020 14:51:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id E3FA0BF89B; Tue, 29 Sep 2020 14:51:12 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id B923917606DC; Tue, 29 Sep 2020 14:51:12 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QcoAMxlnrEX4; Tue, 29 Sep 2020 14:51:04 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 7FB7B1760445; Tue, 29 Sep 2020 14:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1601416264; bh=pjiv7bR9Mf8BKtoZKz2lf8Mski+f0ppGgMrqvrmbmWE=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=VNu/ZuUnNfZTh7P1PBE6q2NMCEZqQFsm2YXWI2W6eZw1ky8RouhSd8cJhSQBjMbq0 dEu6bOWASYDhurzYy4mgNg4Yy6VFW6R6weije3810TtMN2cLX54nFkFacYuXDIBial 8QO1Nbe9VTj8QkbmQwuH94w2RssoM4O4tnGkw7UxcmPOVVChipISnCl/AY4VThHaoj 0NjwoW903Aks9YlP82NW03XE4Gilb+TFeZ19zEjX4NfBsnZLyFxNALecl8DEdVDAXt Bcq+4s1IzkaBfOdGH3KrFe48WjzbY0/aJs9MMd/8soioUFAlRYzBNyk8NHXOmCoybL O6J1hpO//lXRQ== References: <87v9gqquct.fsf@ccss.com> <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> <87ft718p9a.fsf@ccss.com> <87k0wchix3.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <87k0wchix3.fsf@gmx.de> Date: Tue, 29 Sep 2020 14:51:04 -0700 Message-ID: <87a6x88d6f.fsf@ccss.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Michael Albinus writes: > Hugh Daschbach writes: > > Hi Hugh, > > Thanks. LGTM. Thanks. I received the FSF signed copyright document. So we should be clear for submission. I've attached the four patches that we've been discussing: three for bug#43252 and on for bug#43251. Thanks for your patience and guidance. Hugh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-D-Bus-property-tests.patch Content-Description: Property tests. >From dab1113aa7ae964d888d0e3b00466d55292f035d Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Tue, 22 Sep 2020 19:36:20 -0700 Subject: [PATCH 1/4] Add D-Bus property tests. * test/lisp/net/dbus-tests.el: Add property tests. (dbus--test-run-property-test, dbus--test-property): New defuns. (dbus-test06-property-types): New test for property registration, set, get. --- test/lisp/net/dbus-tests.el | 396 ++++++++++++++++++++++++++++++++++++ 1 file changed, 396 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index b853542a1f0..fcbb378b44f 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -1018,6 +1018,402 @@ dbus-test06-register-property-emits-signal ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(defsubst dbus--test-run-property-test (selector name value expected) + "Generate a property test: register, set, get, getall sequence. +This is a helper function for the macro `dbus--test-property'. +The argument SELECTOR indicates whether the test should expand to +`dbus-register-property' (if SELECTOR is `register') or +`dbus-set-property' (if SELECTOR is `set'). +The argument NAME is the property name. +The argument VALUE is the value to register or set. +The argument EXPECTED is a transformed VALUE representing the +form `dbus-get-property' should return." + (cond + ((eq selector 'register) + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface name + :readwrite value) + `((:property :session ,dbus--test-interface ,name) + (,dbus--test-service ,dbus--test-path))))) + + ((eq selector 'set) + (should + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface name + value) + expected))) + + (t (signal 'wrong-type-argument "Selector should be 'register or 'set."))) + + (should + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface name) + expected)) + + (let ((result + (dbus-get-all-properties + :session dbus--test-service dbus--test-path dbus--test-interface))) + (should (equal (cdr (assoc name result)) expected))) + + (let ((result + (dbus-get-all-managed-objects :session dbus--test-service "/")) + result1) + (should (setq result1 (cadr (assoc dbus--test-path result)))) + (should (setq result1 (cadr (assoc dbus--test-interface result1)))) + (should (equal (cdr (assoc name result1)) expected)))) + + +(defsubst dbus--test-property (name &rest value-list) + "Test a D-Bus property named by string argument NAME. +The argument VALUE-LIST is a sequence of pairs, where each pair +represents a value form and an expected returned value form. The +first pair in VALUES is used for `dbus-register-property'. +Subsequent pairs of the list are tested with `dbus-set-property'." + (let ((values (car value-list))) + (dbus--test-run-property-test + 'register name (car values) (cdr values))) + (dolist (values (cdr value-list)) + (dbus--test-run-property-test + 'set name (car values) (cdr values)))) + +(ert-deftest dbus-test06-property-types () + "Check property access and mutation for an own service." + (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 + (progn + (dbus--test-property + "ByteArray" + '((:array :byte 1 :byte 2 :byte 3) . (1 2 3)) + '((:array :byte 4 :byte 5 :byte 6) . (4 5 6))) + + (dbus--test-property + "StringArray" + '((:array "one" "two" :string "three") . ("one" "two" "three")) + '((:array :string "four" :string "five" "six") . ("four" "five" "six"))) + + (dbus--test-property + "ObjectArray" + '((:array + :object-path "/node00" + :object-path "/node01" + :object-path "/node0/node02") + . ("/node00" "/node01" "/node0/node02")) + '((:array + :object-path "/node10" + :object-path "/node11" + :object-path "/node0/node12") + . ("/node10" "/node11" "/node0/node12"))) + + (dbus--test-property + "Dictionary" + '((:array + :dict-entry (:string "four" (:variant :string "value of four")) + :dict-entry ("five" (:variant :object-path "/node0")) + :dict-entry ("six" (:variant (:array :byte 4 :byte 5 :byte 6)))) + . (("four" + ("value of four")) + ("five" + ("/node0")) + ("six" + ((4 5 6))))) + '((:array + :dict-entry (:string "key0" (:variant (:array :byte 7 :byte 8 :byte 9))) + :dict-entry ("key1" (:variant :string "value")) + :dict-entry ("key2" (:variant :object-path "/node0/node1"))) + . (("key0" + ((7 8 9))) + ("key1" + ("value")) + ("key2" + ("/node0/node1"))))) + + (dbus--test-property ; Syntax emphasizing :dict compound type. + "Dictionary" + '((:array + (:dict-entry :string "seven" (:variant :string "value of seven")) + (:dict-entry "eight" (:variant :object-path "/node8")) + (:dict-entry "nine" (:variant (:array :byte 9 :byte 27 :byte 81)))) + . (("seven" + ("value of seven")) + ("eight" + ("/node8")) + ("nine" + ((9 27 81))))) + '((:array + (:dict-entry :string "key4" (:variant (:array :byte 7 :byte 49 :byte 125))) + (:dict-entry "key5" (:variant :string "obsolete")) + (:dict-entry "key6" (:variant :object-path "/node6/node7"))) + . (("key4" + ((7 49 125))) + ("key5" + ("obsolete")) + ("key6" + ("/node6/node7"))))) + + (dbus--test-property + "ByteDictionary" + '((:array + (:dict-entry :byte 8 (:variant :string "byte-eight")) + (:dict-entry :byte 16 (:variant :object-path "/byte/sixteen")) + (:dict-entry :byte 48 (:variant (:array :byte 8 :byte 9 :byte 10)))) + . ((8 ("byte-eight")) + (16 ("/byte/sixteen")) + (48 ((8 9 10)))))) + + (dbus--test-property + "Variant" + '((:variant "Variant string") . ("Variant string")) + '((:variant :byte 42) . (42)) + '((:variant :uint32 1000000) . (1000000)) + '((:variant :object-path "/variant/path") . ("/variant/path")) + '((:variant :signature "a{sa{sv}}") . ("a{sa{sv}}")) + '((:variant (:struct 42 "string" (:object-path "/structure/path") (:variant "last"))) + . ((42 "string" ("/structure/path") ("last"))))) + + ;; Test that :read prevents writes. + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "StringArray" :read '(:array "one" "two" :string "three")) + `((:property :session ,dbus--test-interface "StringArray") + (,dbus--test-service ,dbus--test-path)))) + + (should-error ; Cannot set property with :read access. + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface + "StringArray" '(:array "seven" "eight" :string "nine")) + :type 'dbus-error) + + (should ; Property value preserved on error. + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "StringArray") + '("one" "two" "three"))) + + (should ; Verify property has registered value. + (equal + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "StringArray") + '("one" "two" "three"))) + + ;; Test mismatched types in array. + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "MixedArray" :readwrite + '(:array + :object-path "/node00" + :string "/node01" + :object-path "/node0/node02")) + :type 'wrong-type-argument) + + ;; Test in-range integer values. + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue" :readwrite :byte 255) + `((:property :session ,dbus--test-interface "ByteValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue") + 255)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ShortValue" :readwrite :int16 32767) + `((:property :session ,dbus--test-interface "ShortValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ShortValue") + 32767)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UShortValue" :readwrite :uint16 65535) + `((:property :session ,dbus--test-interface "UShortValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UShortValue") + 65535)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "IntValue" :readwrite :int32 2147483647) + `((:property :session ,dbus--test-interface "IntValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path + dbus--test-interface "IntValue") + 2147483647)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UIntValue" :readwrite :uint32 4294967295) + `((:property :session ,dbus--test-interface "UIntValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UIntValue") + 4294967295)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "LongValue" :readwrite :int64 9223372036854775807) + `((:property :session ,dbus--test-interface "LongValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "LongValue") + 9223372036854775807)) + + (should + (equal + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ULongValue" :readwrite :uint64 18446744073709551615) + `((:property :session ,dbus--test-interface "ULongValue") + (,dbus--test-service ,dbus--test-path)))) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ULongValue") + 18446744073709551615)) + + ;; Test integer overflow. + (should + (= + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue" :byte 520) + 8)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue") + 8)) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ShortValue" :readwrite :int16 32800) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UShortValue" :readwrite :uint16 65600) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "IntValue" :readwrite :int32 2147483700) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "UIntValue" :readwrite :uint32 4294967300) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "LongValue" :readwrite :int64 9223372036854775900) + :type 'args-out-of-range) + + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ULongValue" :readwrite :uint64 18446744073709551700) + :type 'args-out-of-range) + + ;; dbus-set-property may change property type. + (should + (= + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue" 1024) + 1024)) + + (should + (= + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue") + 1024)) + + + (should ; Another change property type test. + (equal + (dbus-set-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue" :boolean t) + t)) + + (should + (eq + (dbus-get-property + :session dbus--test-service dbus--test-path dbus--test-interface + "ByteValue") + t)) + + ;; Test invalid type specification. + (should-error + (dbus-register-property + :session dbus--test-service dbus--test-path dbus--test-interface + "InvalidType" :readwrite :keyword 128) + :type 'wrong-type-argument)) + + ;; Cleanup. + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Add-D-Bus-Introspection-tests.patch Content-Description: Introspection tests. >From 1c250268d4e72ec5ff26f29e99ce138e9d22aaf3 Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Tue, 22 Sep 2020 19:36:20 -0700 Subject: [PATCH 2/4] Add D-Bus Introspection tests. * lisp/net/dbus.el (dbus-annotation-deprecated): New defconst. * test/lisp/net/dbus-tests.el (dbus--tests-dir): New defvar. (dbus--test-introspect, dbus--test-validate-interface) (dbus--test-validate-annotations, dbus--test-validate-property) (dbus--test-validate-m-or-s, dbus--test-validate-signal) (dbus--test-validate-method): New defuns. (dbus-test07-introspection): New test. * test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml: New test data. --- lisp/net/dbus.el | 3 + .../dbus-resources/org.gnu.Emacs.TestDBus.xml | 49 +++ test/lisp/net/dbus-tests.el | 295 ++++++++++++++++++ 3 files changed, 347 insertions(+) create mode 100644 test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index fec9d3c7ab8..09ccc001bdb 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -165,6 +165,9 @@ dbus-interface-local ;; ;; +(defconst dbus-annotation-deprecated (concat dbus-interface-dbus ".Deprecated") + "An annotation indicating a deprecated interface, method, signal, or property.") + ;;; Default D-Bus errors. diff --git a/test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml b/test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml new file mode 100644 index 00000000000..620f10510f2 --- /dev/null +++ b/test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index fcbb378b44f..28dcdd95c00 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -46,6 +46,13 @@ dbus--test-path (defconst dbus--test-interface "org.gnu.Emacs.TestDBus.Interface" "Test interface.") +(defvar dbus--tests-dir + (file-truename + (expand-file-name "dbus-resources" + (file-name-directory (or load-file-name + buffer-file-name)))) + "Directory containing introspection test data file.") + (defun dbus--test-availability (bus) "Test availability of D-Bus BUS." (should (dbus-list-names bus)) @@ -1414,6 +1421,294 @@ dbus-test06-property-types ;; Cleanup. (dbus-unregister-service :session dbus--test-service))) +(defun dbus--test-introspect () + "Return test introspection string." + (when (string-equal dbus--test-path (dbus-event-path-name last-input-event)) + (with-temp-buffer + (insert-file (expand-file-name "org.gnu.Emacs.TestDBus.xml" dbus--tests-dir)) + (buffer-string)))) + +(defsubst dbus--test-validate-interface + (iface-name expected-properties expected-methods expected-signals + expected-annotations) + "Validate an interface definition for `dbus-test07-introspection'. +The argument IFACE-NAME is a string naming the interface to validate. +The arguments EXPECTED-PROPERTIES, EXPECTED-METHODS, EXPECTED-SIGNALS, and +EXPECTED-ANNOTATIONS represent the names of the interface's properties, +methods, signals, and annotations, respectively." + + (let ((interface + (dbus-introspect-get-interface + :session dbus--test-service dbus--test-path iface-name))) + (pcase-let ((`(interface ((name . ,name)) . ,rest) interface)) + (should + (string-equal name iface-name)) + (should + (string-equal name (dbus-introspect-get-attribute interface "name"))) + + (let (properties methods signals annotations) + (mapc (lambda (x) + (let ((name (dbus-introspect-get-attribute x "name"))) + (cond + ((eq 'property (car x)) (push name properties)) + ((eq 'method (car x)) (push name methods)) + ((eq 'signal (car x)) (push name signals)) + ((eq 'annotation (car x)) (push name annotations))))) + rest) + + (should + (equal + (nreverse properties) + expected-properties)) + (should + (equal + (nreverse methods) + expected-methods)) + (should + (equal + (nreverse signals) + expected-signals)) + (should + (equal + (nreverse annotations) + expected-annotations)))))) + +(defsubst dbus--test-validate-annotations (annotations expected-annotations) + "Validate a list of D-Bus ANNOTATIONS. +Ensure each string in EXPECTED-ANNOTATIONS names an element of ANNOTATIONS. +And ensure each ANNOTATIONS has a value attribute marked \"true\"." + (mapc + (lambda (annotation) + (let ((name (dbus-introspect-get-attribute annotation "name")) + (value (dbus-introspect-get-attribute annotation "value"))) + (should + (member name expected-annotations)) + (should + (equal value "true")))) + annotations)) + +(defsubst dbus--test-validate-property + (interface property-name expected-annotations &rest expected-args) + "Validate a property definition for `dbus-test07-introspection'. + +The argument INTERFACE is a string naming the interface owning PROPERTY-NAME. +The argument PROPERTY-NAME is a string naming the property to validate. +The arguments EXPECTED-ANNOTATIONS is a list of strings matching +the annotation names defined for the method or signal. +The argument EXPECTED-ARGS is a list of expected arguments for the property." + (let* ((property + (dbus-introspect-get-property + :session dbus--test-service dbus--test-path interface property-name)) + (name (dbus-introspect-get-attribute property "name")) + (type (dbus-introspect-get-attribute property "type")) + (access (dbus-introspect-get-attribute property "access")) + (expected (assoc-string name expected-args))) + (should expected) + + (should + (string-equal name property-name)) + + (should + (string-equal + (nth 0 expected) + name)) + + (should + (string-equal + (nth 1 expected) + type)) + + (should + (string-equal + (nth 2 expected) + access)))) + +(defsubst dbus--test-validate-m-or-s (tree expected-annotations expected-args) + "Validate a method or signal definition for `dbus-test07-introspection'. +The argument TREE is an sexp returned from either `dbus-introspect-get-method' +or `dbus-introspect-get-signal' +The arguments EXPECTED-ANNOTATIONS is a list of strings matching +the annotation names defined for the method or signal. +The argument EXPECTED-ARGS is a list of expected arguments for +the method or signal." + (let (args annotations) + (mapc (lambda (elem) + (let ((name (dbus-introspect-get-attribute elem "name"))) + (cond + ((eq 'arg (car elem)) (push elem args)) + ((eq 'annotation (car elem)) (push elem annotations))))) + tree) + (should + (equal + (nreverse args) + expected-args)) + (dbus--test-validate-annotations annotations expected-annotations))) + +(defsubst dbus--test-validate-signal + (interface signal-name expected-annotations &rest expected-args) + "Validate a signal definition for `dbus-test07-introspection'. + +The argument INTERFACE is a string naming the interface owning SIGNAL-NAME. +The argument SIGNAL-NAME is a string naming the signal to validate. +The arguments EXPECTED-ANNOTATIONS is a list of strings matching +the annotation names defined for the signal. +The argument EXPECTED-ARGS is a list of expected arguments for the signal." + (let ((signal + (dbus-introspect-get-signal + :session dbus--test-service dbus--test-path interface signal-name))) + (pcase-let ((`(signal ((name . ,name)) . ,rest) signal)) + (should + (string-equal name signal-name)) + (should + (string-equal name (dbus-introspect-get-attribute signal "name"))) + (dbus--test-validate-m-or-s rest expected-annotations expected-args)))) + + +(defsubst dbus--test-validate-method + (interface method-name expected-annotations &rest expected-args) + "Validate a method definition for `dbus-test07-introspection'. + +The argument INTERFACE is a string naming the interface owning METHOD-NAME. +The argument METHOD-NAME is a string naming the method to validate. +The arguments EXPECTED-ANNOTATIONS is a list of strings matching +the annotation names defined for the method. +The argument EXPECTED-ARGS is a list of expected arguments for the method." + (let ((method + (dbus-introspect-get-method + :session dbus--test-service dbus--test-path interface method-name))) + (pcase-let ((`(method ((name . ,name)) . ,rest) method)) + (should + (string-equal name method-name)) + (should + (string-equal name (dbus-introspect-get-attribute method "name"))) + (dbus--test-validate-m-or-s rest expected-annotations expected-args)))) + +(ert-deftest dbus-test07-introspection () + "Register an Introspection interface then query it." + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + (dbus-register-service :session dbus--test-service) + + ;; Prepare introspection response. + (dbus-register-method + :session dbus--test-service dbus--test-path dbus-interface-introspectable + "Introspect" 'dbus--test-introspect) + (dbus-register-method + :session dbus--test-service (concat dbus--test-path "/node0") + dbus-interface-introspectable + "Introspect" 'dbus--test-introspect) + (dbus-register-method + :session dbus--test-service (concat dbus--test-path "/node1") + dbus-interface-introspectable + "Introspect" 'dbus--test-introspect) + (unwind-protect + (let ((start (current-time))) + ;; dbus-introspect-get-node-names + (should + (equal + (dbus-introspect-get-node-names + :session dbus--test-service dbus--test-path) + '("node0" "node1"))) + + ;; dbus-introspect-get-all-nodes + (should + (equal + (dbus-introspect-get-all-nodes + :session dbus--test-service dbus--test-path) + (list dbus--test-path + (concat dbus--test-path "/node0") + (concat dbus--test-path "/node1")))) + + ;; dbus-introspect-get-interface-names + (let ((interfaces + (dbus-introspect-get-interface-names + :session dbus--test-service dbus--test-path))) + + (should + (equal + interfaces + `(,dbus-interface-introspectable + ,dbus-interface-properties + ,dbus--test-interface))) + + (dbus--test-validate-interface + dbus-interface-introspectable nil '("Introspect") nil nil) + + ;; dbus-introspect-get-interface via `dbus--test-validate-interface' + (dbus--test-validate-interface + dbus-interface-properties nil + '("Get" "Set" "GetAll") '("PropertiesChanged") nil) + + (dbus--test-validate-interface + dbus--test-interface '("Connected" "Player") + '("Connect" "DeprecatedMethod0" "DeprecatedMethod1") nil + `(,dbus-annotation-deprecated))) + + ;; dbus-introspect-get-method-names + (let ((methods + (dbus-introspect-get-method-names + :session dbus--test-service dbus--test-path + dbus--test-interface))) + (should + (equal + methods + '("Connect" "DeprecatedMethod0" "DeprecatedMethod1"))) + + ;; dbus-introspect-get-method via 'dbus--test-validate-method + (dbus--test-validate-method + dbus--test-interface "Connect" nil + '(arg ((name . "uuid") (type . "s") (direction . "in"))) + '(arg ((name . "mode") (type . "y") (direction . "in"))) + '(arg ((name . "options") (type . "a{sv}") (direction . "in"))) + '(arg ((name . "interface") (type . "s") (direction . "out")))) + + (dbus--test-validate-method + dbus--test-interface "DeprecatedMethod0" + `(,dbus-annotation-deprecated)) + + (dbus--test-validate-method + dbus--test-interface "DeprecatedMethod1" + `(,dbus-annotation-deprecated))) + + ;; dbus-introspect-get-signal-names + (let ((signals + (dbus-introspect-get-signal-names + :session dbus--test-service dbus--test-path + dbus-interface-properties))) + (should + (equal + signals + '("PropertiesChanged"))) + + ;; dbus-introspect-get-signal via 'dbus--test-validate-signal + (dbus--test-validate-signal + dbus-interface-properties "PropertiesChanged" nil + '(arg ((name . "interface") (type . "s"))) + '(arg ((name . "changed_properties") (type . "a{sv}"))) + '(arg ((name . "invalidated_properties") (type . "as"))))) + + ;; dbus-intropct-get-property-names + (let ((properties + (dbus-introspect-get-property-names + :session dbus--test-service dbus--test-path + dbus--test-interface))) + (should + (equal + properties + '("Connected" "Player"))) + + ;; dbus-introspect-get-property via 'dbus--test-validate-property + (dbus--test-validate-property + dbus--test-interface "Connected" nil + '("Connected" "b" "read") + '("Player" "o" "read"))) + + ;; Elapsed time over a second suggests timeouts. + (should + (< 0.0 (float-time (time-since start)) 1.0))) + + (dbus-unregister-service :session dbus--test-service))) + (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") -- 2.28.0 --=-=-= 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-Add-D-Bus-method-call-reentry-test.patch Content-Description: Call method reentry test. >From 3dc9e44e2f10530ef2b20cc9f8c3851606905d5e 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 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 308f22eb6cc..339eaa7405d 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -581,6 +581,40 @@ 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." + ;; Simulate application registration (Bug#43251) + (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 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 30 05:34:32 2020 Received: (at 43252) by debbugs.gnu.org; 30 Sep 2020 09:34:32 +0000 Received: from localhost ([127.0.0.1]:58238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNYVM-0006VM-Gr for submit@debbugs.gnu.org; Wed, 30 Sep 2020 05:34:32 -0400 Received: from mout.gmx.net ([212.227.15.15]:45113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNYVJ-0006V4-0p for 43252@debbugs.gnu.org; Wed, 30 Sep 2020 05:34:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601458461; bh=ykZnszZx/TBQPg5W8FsZvFkjXIz1sopoC3ueu5R/JZw=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=TuyP57VJtRf2pigkyMom2otA5zb2V8Baps9BLlk+Ht3c+WXRpD+BAbulCM91ITvEr A8cFoSUS/n0Bk0bz7qXZNeyHa3H4DUefiHd8WiNiY1KXQAQ1+ZfcRABgbkttkPvqkD 515LrR4QP92GNyilwXBYaZn+fi4e+t7L+NCBi3SY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.159.134]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MPokD-1k2IUJ439v-00Mt95; Wed, 30 Sep 2020 11:34:21 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.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> <87ft718p9a.fsf@ccss.com> <87k0wchix3.fsf@gmx.de> <87a6x88d6f.fsf@ccss.com> Date: Wed, 30 Sep 2020 11:34:19 +0200 In-Reply-To: <87a6x88d6f.fsf@ccss.com> (Hugh Daschbach's message of "Tue, 29 Sep 2020 14:51:04 -0700") Message-ID: <878screhgk.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:KoXwcCLrJBugb3CmFqohlY6ZiEl3zg5mE18pCDAftlxv37Vouwl sl11AuhVVJbrfekPFC7+VOBS73Blwbv7YZGj7wQ4NMjMEL1Uy3agttxeWUkjcoCrcLw0L3K 3dmwixco/YLcWiNk2u7WD10uhLtNUh5Vztn63i307jmS+twiYVmNTrIYJtCa3b8TtyeKbDa QnuacGq7Shl/mWQqfding== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:JiHFw4AZQ8o=:iwn1pp52hIJNXm6w1ufEaG nQzdc33yNFn9vs7hqJhkuTqpW49KxTd7F4s80dLI5XyvafUAt/uUaoJI8+Z3paJEeDpMcQBW6 /zYIP8kVixe8wcvzNqal8oABRogqMI5vUQBI7v82nmG32HI3ww4aTBDULgFf97wnBgsuv6OS9 b2m5aCvjOCYGM5sEWE/EVcAHZCMVvNgEAkKFTXhLOAqH83xPfZ0NHjYE40etXh02zZUkU1IRn rm3zxF23AwlsECfV4ph9RlTwbbeLcxaR4r2OCNFDaefYHYKukRfPq4hHBBiyxi9nt4Myoy7Jy mjT8DIHPZ96Y3FvQo73nOhBmG/JE5Tlzd6J3cWyIFQvjxYDFZ8ZjGNhVjCCuDgzq8pumionZx JSL+kcLMKLp1TCWCDqsSiN29JF+jerl0Dp2vvLWHtumwUeMetkK2lFZCmFMJO3pcYmhRkpA52 La0kwCp2n4HVDU7VOFJeb4PWXUPjVwp31FLGpkstB0rpM121XAKHMzP5bADwSADJiHLuKWke4 qGYsuTEEsULaPOmfighUzUI+fyre+0veHJV0WjcllDsT2TJqGXKRSTUOUy5t9ZcumPRDlearu N36PiiHIA8dYrHaxPxBZ8G4UI+0oCB7wVg4uPzdyaLs1raF9ZxdsP/SsipWBooB/gSa6ZclQv ToQ6+t7ZqJSFaqOuqmNa0SIkYy0Sx+4cuu1Yy0rCjvrVjS/NURjEsDXOVIoblIFKlwS8OsCjg z7SBB6mUZLwe91DNcClntYnDHoydsWo39ZgU4jPdqrndj4sPNTgIleluExZ1jZm+D7mugM7z5 uHElFz2aG/7Iq1e2vCop0V2dHqoT4H9ZM5zWkE/zNLLhN0j4jVnZXQKKFxxahBOCXeB15iZ6d ebir6voCcCGPswprQeqSXhYSh2d9t53ukMsJYpUeom8NgEupNNJxxvf4nY1ULA/bq6C8KuK4z /viZW2yNTHGIvKmlcW9FJM3fA5HixEpDbb9lp7aOf1DjSGJFI1o0FF5MQ3/cA/ScM5G1FfhRL l9/TS2W4evik+u5A4TkdR1MC1zNZLMeWMTbbWo72rrhb8Yt25NO3fQjrju8eswKz+Q/joXH7w MYKobdmL9ZqvkJWVrXHRu++2OuZpSS7jgTTHQNOU2iwS5LhBuomYb5cQiXZDZ0kRnJelrUXEh YWfO9QmBJ3yNpxnXRVSSrK9lyr3vceN1BVVSSe7T+7cqCeyFO0aXSBZox6I7HccZI/aKpJcMS upkUmVA0xmEbS3iqiT23or9G6XJA0vkAHiIrAVQ== X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hugh Daschbach writes: Hi Hugh, > Thanks. I received the FSF signed copyright document. So we should be > clear for submission. Yep. You're also on file now. > I've attached the four patches that we've been discussing: three for > bug#43252 and on for bug#43251. Thanks a lot! I've pushed them to master. If you have further submissions, just tell me. I will submit them in your name then. If you plan for regular submissions to Emacs, you might ask the Emacs maintainers (Eli Zaretskii, Lars Ingebrigtsen or John Wiegley) for write access on the git repo. > Thanks for your patience and guidance. > > Hugh Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 30 06:42:32 2020 Received: (at 43252) by debbugs.gnu.org; 30 Sep 2020 10:42:32 +0000 Received: from localhost ([127.0.0.1]:58337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNZZA-00020X-J8 for submit@debbugs.gnu.org; Wed, 30 Sep 2020 06:42:32 -0400 Received: from mout.gmx.net ([212.227.15.15]:58553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNZZ8-00020J-PY for 43252@debbugs.gnu.org; Wed, 30 Sep 2020 06:42:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601462542; bh=Zyk9esxt/2fpT7gLOvMbq0rl13nTFVIz04U8E7cQhoE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=dwexp7QJRz2xbQQog1NxCQxk+7YTmiHwrHQW2EdIVQALQYSDbQ34iNAXkN+75Ofri mZ3dedmlAcUOL0vEhLTJ/MIiiG7V+n4XkjS40sTOMx8MU5T2UDSqhjcTYMeuu1E7j/ KLDBBDklLUufZNw7QOsR07+TCyxe0laOy90sURNs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.159.134]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MsHns-1ki09v3IuA-00tivN; Wed, 30 Sep 2020 12:42:21 +0200 From: Michael Albinus To: Hugh Daschbach Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides References: <87v9gqquct.fsf@ccss.com> <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> <87ft718p9a.fsf@ccss.com> <87k0wchix3.fsf@gmx.de> <87a6x88d6f.fsf@ccss.com> <878screhgk.fsf@gmx.de> Date: Wed, 30 Sep 2020 12:42:20 +0200 In-Reply-To: <878screhgk.fsf@gmx.de> (Michael Albinus's message of "Wed, 30 Sep 2020 11:34:19 +0200") Message-ID: <878scrlf5f.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:fzDZQjhA3VvgzNzfi/UQbnU/XqPPGQFdcCmrVh+/L/pULzq+sYs U18TO+ptUDJeWWEdfVslGO95olnZq7gNNV5a5U+OVHgSbDjFbAw3VY+H0q/MzPxSaTFDxoy 5RoXZG1tOBcgKr8heWB86Bt4mKnbkxWox0BEFRqdYR9zjNpKZVqmHpTcUyeKD1Foc7kKkY8 WqrMHESQzGg2D/TZYU99g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:vcsqhtKh66o=:1MTRXxsqraCUclBQdF+z2s e++jUatBjfBuGQZfkJFM2L11JfzawH3JTvstvyAjBBM9Cb8Zo15RPplbUafBjz8z2PE6qjfoH QVINZqgqch2oWsap+Tp+y2M+2C7+FmIT1c7HEuQzdzTPSEIh9mw67CMJ0+D6tp9FFLZQlhq4h Zrm+qnfk4GwxzRSZBnKwdCFmbgAKu9uO/owGdWWDOfyqaim6a2GMdLDMzmwk8UcgmY+0/VKaT IAY/KvykhiLFJdMNJkd3V8r/7AvqBbfq+nz7ZKw0eRmNS4zLQZZT/VH9hrEW7mH585sHsgfiy 5NQGMXXtLJMBtXdtyPZYAoGqnhgg0iIG5wevGip85IBKD8W9swM5yiNUsc+6tV7cGEIfQIPf8 PL2uAvas9bZkw/M0EMIg/eVgnUF6lhcExomJajG5ZJD8J1rW36gZFxsxdXjmwUCgXT12Rotnk EBx5WSk7PLzE3cf3NOeBFdSPpri/xcaaQQncz1sCwXH4S4HcAMvzH+YwhBZnJFD6sbs7zGo/r nin/tAmShKfb9GAMrTVEM6U3/F844BNZDqDuLxpKfJj3FI9r4rO5fbHllF95/dVgXpGfVNvMv vKdibUphqBGvRQl2Ez++XGogVdG3puSTqhaZ3ranwx6mXckMrM2PGMTRq1RHFMKV7fC6qdyNt ae9G5emUBRdicGfL8Kj7Qt6p51W0ze0DZ+UFUW4Zg5UNhd2Oh032j3vG927MW+SwwVKqfp6zQ pduK/OmFmAt3/grUYvH/EZq5YUx7VGXtVRZAsiNXY8dDI06C3dblN48Bg3VIgI+SEddbDWK1f kln++oTSG47nUxeH0G0fHJal5m8/RzRhgETZQK9i77YjquXRhandPwH+pWO8WabGvFDy6kaE8 bJu44Rr1QpdQeufs76yaixCkaLKaO3JiOfY6RVEuk0DlgL1RDnhPwxzijvwO13Hs+7v1pRqa6 OCB3mEyefDMtRfUiVreh+gnSOFKzj1QpSFx0l4cBOYA3PZwxNUK4WGx1tsRruPGpdhyjgKIsv 8R31pA9BFc+RjUWAGbm6NjIIxgXdb4izxOp6YmrvHt0xatGF5w5x2MItN6ORLfyZQl6jdssRl xVlzz6cBDiZ7+RZsQFHbEzTPHU1VT3GpclcM+CH4p4Ev/6+Kdk4cTkp3v44RV9YbaMEYtIc8w 790QrDA6bE1XZxAz6iw1UgPSopkIiQ0RU6EP+4XdrFjt594BkyjKccU8dUhWi3pbS+Wx8wh4Y QGHvYOFkHVV9MoTHNAcJ4kfGx/xyXX05LHFgzWg== X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Michael Albinus writes: Hi Hugh, >> I've attached the four patches that we've been discussing: three for >> bug#43252 and on for bug#43251. > > Thanks a lot! I've pushed them to master. PS: I've pushed also a minor code cleanup, mainly triggered by compiler warnings. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 30 12:39:52 2020 Received: (at 43252) by debbugs.gnu.org; 30 Sep 2020 16:39:52 +0000 Received: from localhost ([127.0.0.1]:32900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNf8y-0007Q0-Hn for submit@debbugs.gnu.org; Wed, 30 Sep 2020 12:39:52 -0400 Received: from mail1.ccss.com ([159.203.255.73]:49562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNf8x-0007Pm-0z for 43252@debbugs.gnu.org; Wed, 30 Sep 2020 12:39:51 -0400 Received: by mail1.ccss.com (Postfix, from userid 114) id 44B77BF89B; Wed, 30 Sep 2020 09:39:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id BEAC3BF757; Wed, 30 Sep 2020 09:39:44 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 9693417606A9; Wed, 30 Sep 2020 09:39:44 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J4Pbd2qp7Rds; Wed, 30 Sep 2020 09:39:38 -0700 (PDT) Received: from klaatu (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id CB47B1760573; Wed, 30 Sep 2020 09:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1601483978; bh=uMqJuD/sOerdeEYu8+q/++VwXCEQUZcwLoKolOtvMcw=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=a/OkMGy8VMJ4NurdgXn+Wa5COVI7QPE0Yf2bPMnfDHxQi6nI+ISYU05TyfjrNPoGT TJhzGTUmRjwfbiiK+3LMW26d4bEKBhqeqlmF2vkTmfSQVDg3p++3xKx43txeZzlBv5 VTj0KR0pGDzAnm57r8QQ36jY9CwHVpILKTuuOh/KrQTLS0AHM4/6lgGyvw1GY3VA8u 5787UvBRaPyNKQvW7WCUId+3Ww6smnNSE6oGSN0jJ8XigmlF2Uy1MALROcnrAkF3fT gIgPp1xqGahIYutKXEMIhf1NxBSqPYv7nmXyLuwuU6LfBM0HyYzxCfo83A81gt7NYg bNBfjaZUFchQA== References: <87v9gqquct.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> <87ft718p9a.fsf@ccss.com> <87k0wchix3.fsf@gmx.de> <87a6x88d6f.fsf@ccss.com> <878screhgk.fsf@gmx.de> <878scrlf5f.fsf@gmx.de> User-agent: mu4e 1.5.5; emacs 27.1 From: Hugh Daschbach To: Michael Albinus Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides In-reply-to: <878scrlf5f.fsf@gmx.de> Date: Wed, 30 Sep 2020 09:39:38 -0700 Message-ID: <877dsb8bhx.fsf@ccss.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43252 Cc: 43252@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Michael Albinus writes: > > Hi Hugh, > >> >> Thanks a lot! I've pushed them to master. > > PS: I've pushed also a minor code cleanup, mainly triggered by compiler warnings. Thank you. I've reviewed your changes. I appreciate the stylistic changes. And will add a compile step to my list workflow. Thanks again. Hugh From unknown Sat Jun 14 18:52:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Oct 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator