From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#43252: 27.1; DBus properties lack type hints or overrides Date: Thu, 10 Sep 2020 18:57:30 +0200 Message-ID: <87imclwow5.fsf@gmx.de> 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> 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="32505"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43252@debbugs.gnu.org To: Hugh Daschbach Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 10 18:58:33 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 1kGPu5-0008KJ-48 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Sep 2020 18:58:33 +0200 Original-Received: from localhost ([::1]:60004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGPu3-0003Gi-WF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Sep 2020 12:58:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGPta-0003GT-OL for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2020 12:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGPta-00050l-FP for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2020 12:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kGPta-0002TQ-Dh for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2020 12:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Sep 2020 16:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43252 X-GNU-PR-Package: emacs Original-Received: via spool by 43252-submit@debbugs.gnu.org id=B43252.15997570629472 (code B ref 43252); Thu, 10 Sep 2020 16:58:02 +0000 Original-Received: (at 43252) by debbugs.gnu.org; 10 Sep 2020 16:57:42 +0000 Original-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 Original-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 Original-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 In-Reply-To: <871rj9k78r.fsf@gmx.de> (Michael Albinus's message of "Thu, 10 Sep 2020 16:59:32 +0200") X-Provags-ID: V03:K1:LLtN2VaV+2ilNHW9jSYTZqkykN89QCbFfePMoBwBMJKbpUVb7gx yJ2UYKiIsAMCKrZ8tZ3bnWeSev2e1M421VGxswm4DCjaxtPEFhH7NJeoWHhCXrRNm16/x4T NTP9neG2rqXaBAivHNPclu06pWMdG/2dM3Os4DZqTxVbmGOoEbMC3Vr62eNQdgC5swaathm hyCEZW2rKNbJVJkKpv82Q== 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/KPQ3Rd 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:187748 Archived-At: --=-=-= 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))) --=-=-=--