Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11189710ybi; Thu, 25 Jul 2019 11:33:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNU2C1+Y+XTmkrQuC3kafIGruwdmF26TEjQa5FOyMnEkz9CThNbpAr71suL7LfEcW6oN75 X-Received: by 2002:a63:20d:: with SMTP id 13mr76599193pgc.253.1564079584534; Thu, 25 Jul 2019 11:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564079584; cv=none; d=google.com; s=arc-20160816; b=nVgDaGz3W1oOSoBY1HKK9rs3sY0NbOwpTw5OiGlGAZH/H93dT6Vcc4AoLQFzgNyk0w /IE2xhanGlDnbNbakwdVT1x5D3vxd+o5s+vBSqRrQfUiFD9xpcw5rpEqmTJLGozXlnso a0uAfjFyEjinoEdqiW5bULJJnNc6hrghKdz7/vBAyYqY8p/eeV8VjBbFL38do6OzWqTY 6uEoDcV77elDxoEMTxrk3tSuScrFf9eNai7TX/8tHAi86zN0yK98E8JWAwZXyilhf/MG A23H4zqNOc+iqKYfW/GvZp6cv3L/rdfbmJVmVKUm/Zi0OWnEfCL8mcj1T4wcfavtyuJo eZIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=UkoLpj10ANTc3xEccnd6UH6Xmu+hZ7ijwzM3uBHPvnA=; b=io/Wf/LpTeA2d6AxMwvy573B3bu3LiAXt/rn7AcxuyJfX6KcHq+VAwqtrX4pOqdqA4 mRM4/Vp1/jv4DyPSKSd66bT6pEHXYSFiZUNR44fofYIiMiPZUcskd+XdO9lrAzyr19TO xXLs6b1w1JTa1af4VVsRnvklVQT72GNE9OUZS0DQIUEc7OBTPus52wq6TkbjatP4QIhl ZfnJzLFva2V4kBFrYYTZTNcpzFQokzEMhzqhEdUfuCKsrLuAA4dr/XX9XsFoo795K+uK z7mW22XnEWqIrGUZdz9TKyK7awqfDDkKW6FbBlCgaIwwnBdO9ovKkVHZ6JZoad2gQaZy lZYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184si20346912pga.23.2019.07.25.11.32.49; Thu, 25 Jul 2019 11:33:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726103AbfGYSb6 (ORCPT + 99 others); Thu, 25 Jul 2019 14:31:58 -0400 Received: from mga07.intel.com ([134.134.136.100]:57903 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbfGYSb5 (ORCPT ); Thu, 25 Jul 2019 14:31:57 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 11:31:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,307,1559545200"; d="scan'208";a="178049375" Received: from ingas-nuc1.sea.intel.com ([10.254.183.90]) by FMSMGA003.fm.intel.com with ESMTP; 25 Jul 2019 11:31:47 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ] test/test-mesh: Initialize required properties Date: Thu, 25 Jul 2019 11:31:45 -0700 Message-Id: <20190725183145.23604-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This initialized required "Models" and "VendorModels" properties wheher the actual models exist or not, according to the mesh-api.txt. In case when an element does not contain either SIG defined models or vendor defineed models, the corresponding properties should contain empty arrays. --- test/test-mesh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/test-mesh b/test/test-mesh index 6e9196366..3c5ded7b3 100755 --- a/test/test-mesh +++ b/test/test-mesh @@ -537,10 +537,8 @@ class Element(dbus.service.Object): sig_models = self._get_sig_models() props = {'Index' : dbus.Byte(self.index)} - if len(sig_models) != 0: - props['Models'] = dbus.Array(sig_models, signature='q') - if len(vendor_models) != 0: - props['VendorModels'] = dbus.Array(vendor_models, + props['Models'] = dbus.Array(sig_models, signature='q') + props['VendorModels'] = dbus.Array(vendor_models, signature='(qq)') #print(props) return { MESH_ELEMENT_IFACE: props } -- 2.21.0