From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hugh Daschbach Newsgroups: gmane.emacs.bugs Subject: bug#43936: 28.0.50; D-Bus PropertiesChanged signal lacks interface argument. Date: Sun, 11 Oct 2020 17:45:42 -0700 Message-ID: <87tuv05l1l.fsf@klaatu.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29505"; mail-complaints-to="usenet@ciao.gmane.io" To: 43936@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 12 02:47:34 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRlzy-0007Xf-9F for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Oct 2020 02:47:34 +0200 Original-Received: from localhost ([::1]:50266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRlzw-0006dc-Iw for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Oct 2020 20:47:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRlzS-0006dP-Sb for bug-gnu-emacs@gnu.org; Sun, 11 Oct 2020 20:47:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRlzS-0004IX-JJ for bug-gnu-emacs@gnu.org; Sun, 11 Oct 2020 20:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kRlzS-0007wB-Gt for bug-gnu-emacs@gnu.org; Sun, 11 Oct 2020 20:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Hugh Daschbach Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Oct 2020 00:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43936 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160246357130448 (code B ref -1); Mon, 12 Oct 2020 00:47:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Oct 2020 00:46:11 +0000 Original-Received: from localhost ([127.0.0.1]:41240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRlyd-0007v1-FC for submit@debbugs.gnu.org; Sun, 11 Oct 2020 20:46:11 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRlyb-0007ut-Rv for submit@debbugs.gnu.org; Sun, 11 Oct 2020 20:46:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRlyb-0006YC-JR for bug-gnu-emacs@gnu.org; Sun, 11 Oct 2020 20:46:09 -0400 Original-Received: from mail1.ccss.com ([159.203.255.73]:33072) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRlyZ-0004GK-Db for bug-gnu-emacs@gnu.org; Sun, 11 Oct 2020 20:46:09 -0400 Original-Received: by mail1.ccss.com (Postfix, from userid 114) id 6EFF3BF79B; Sun, 11 Oct 2020 17:46:05 -0700 (PDT) Original-Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id BE41DBF788 for ; Sun, 11 Oct 2020 17:46:04 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id 92E7A1760699 for ; Sun, 11 Oct 2020 17:46:04 -0700 (PDT) Original-Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xjDUdfYMU5I9 for ; Sun, 11 Oct 2020 17:45:58 -0700 (PDT) Original-Received: from klaatu.ccss.com (klaatu.lan [192.168.42.3]) by ccss.com (Postfix) with ESMTP id EE0E21760443 for ; Sun, 11 Oct 2020 17:45:57 -0700 (PDT) Original-Received: from klaatu (localhost.localdomain [127.0.0.1]) by klaatu.ccss.com (Postfix) with ESMTP id CB1E219866A6 for ; Sun, 11 Oct 2020 17:45:57 -0700 (PDT) Received-SPF: permerror 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/10/11 20:46:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190292 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The D-Bus specification (https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfac= es-properties) defines three arguments for org.freedesktop.DBus.Properties.PropertiesChanged. Currently, in dbus.el, only two are provided. The attached patch adds the interface parameter to the test =E2=80=98dbus-test06-register-property-emits-signal=E2=80=99 and to the sources of the signal: =E2=80=98dbus-register-property=E2=80=99 = and =E2=80=98dbus-property-handler=E2=80=99. Thanks, Hugh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-interface-arg-to-PropertiesChanged-signal.patch Content-Description: Add interface argument to PropertiesChanged signal and test. >From 176a110fc57f0c3bc505d80abe329fec4318195c Mon Sep 17 00:00:00 2001 From: Hugh Daschbach Date: Sun, 11 Oct 2020 14:48:19 -0700 Subject: [PATCH] Add interface arg to PropertiesChanged signal. * test/lisp/net/dbus-tests.el (dbus-test06-register-property-emits-signal): Fix test. * lisp/net/dbus.el (dbus-register-property, dbus-property-handler): Fix signal generation. --- lisp/net/dbus.el | 2 ++ test/lisp/net/dbus-tests.el | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 77ba5266dcb..bb2420e1f49 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -1740,6 +1740,7 @@ dbus-register-property (when emits-signal (dbus-send-signal bus service path dbus-interface-properties "PropertiesChanged" + interface ;; changed_properties. (if (eq access :write) '(:array: :signature "{sv}") @@ -1818,6 +1819,7 @@ dbus-property-handler (when (nth 1 object) (dbus-send-signal bus service path dbus-interface-properties "PropertiesChanged" + interface ;; changed_properties. (if (eq :write (car object)) '(:array: :signature "{sv}") diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index cd2e166c103..f75f107dfb6 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -1118,10 +1118,10 @@ dbus-test06-register-property-emits-signal (with-timeout (1 (dbus--test-timeout-handler)) (while (null dbus--test-signal-received) (read-event nil nil 0.1))) - ;; It returns two arguments, "changed_properties" (an array of - ;; dict entries) and "invalidated_properties" (an array of - ;; strings). - (should (equal dbus--test-signal-received `(((,property ("foo"))) ()))) + ;; It returns three arguments, interface (a string), + ;; "changed_properties" (an array of dict entries) and + ;; "invalidated_properties" (an array of strings). + (should (equal dbus--test-signal-received `(,dbus--test-interface ((,property ("foo"))) ()))) (should (equal @@ -1144,7 +1144,8 @@ dbus-test06-register-property-emits-signal (read-event nil nil 0.1))) (should (equal - dbus--test-signal-received `(((,property ((1 2 3)))) ()))) + dbus--test-signal-received + `(,dbus--test-interface ((,property ((1 2 3)))) ()))) (should (equal -- 2.28.0 --=-=-= Content-Type: text/plain In GNU Emacs 28.0.50 (build 20, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.3, Xaw3d scroll bars) of 2020-10-11 built on klaatu Repository revision: 0f79544368c0dc343edcd97c3c7992aeab415b68 Repository branch: submission Windowing system distributor 'The X.Org Foundation', version 11.0.12009000 System Description: Artix Linux Configured using: 'configure --with-x-toolkit=lucid' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ERT-Results Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs password-cache json map text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date cl-extra vc-git diff-mode easy-mmode bug-reference dbus-tests dbus cl-seq cl-macs pcase xml subr-x seq byte-opt gv bytecomp byte-compile cconv ert pp ewoc debug backtrace help-mode easymenu find-func cl-loaddefs cl-lib 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 button loaddefs faces cus-face macroexp files window 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 cairo x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 124593 10066) (symbols 48 10063 1) (strings 32 26290 1920) (string-bytes 1 818696) (vectors 16 15108) (vector-slots 8 197378 10992) (floats 8 91 209) (intervals 56 413 0) (buffers 992 13)) --=-=-=--