Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1820390pxb; Fri, 6 Nov 2020 23:07:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoLWbLCZthHYvXN45hwTIktGF6y5akUeP4kzY2ndwA+iY6A+iqz/WAGeYmPQyThH1Lib9i X-Received: by 2002:a50:bf41:: with SMTP id g1mr5705379edk.165.1604732831727; Fri, 06 Nov 2020 23:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604732831; cv=none; d=google.com; s=arc-20160816; b=vBTsHPvCTuRRVaI9DDYpDyaR4CI9OGt0T5/4C8inY4t5igev6B+9MbnO0XxLlqF6Th cUZ1/eK99LoJXLt0IyUmPyPz8TMMHer702Oovb4MhbxZe7f0TAI0XPHEjZzn664IpQ36 deBByBtucvheiR2HTSBMV+G5oR6H+kFNPA2TThmMFx2b3UZiPjoWrHsEqn4j5jlieo9X T/khcGtujm2Qit8EAL0itbTHVIY6Ct1LGuFq76ApirAbkb/lOgs4VVgXQXfg8Yob0GYn KZ/Ve2g8rkANDn6N+QfSP8fB0a5MCSIeoTjv4RBPgQZHhH08ZuD7F/6wPiQbnS7LVN1h HuSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=t4ZV2lKr/Atcrgra8nurM72fjVBq+WNzYD1Mf1KGIfQ=; b=tSwyebi5KDBEiNEA8q7wV8WO8swl9BLmXerVT3DSmrmHXus2RhoXHNGiJJnBGpbXWX NiJ9UB0mXpw7if5cDqCIWgOncYT1hhK738dQbCzgxlyZ3C1fLZNcJv2+dJF8HTNvL54A 8xmCvTNOFhzcMTH7YuLiD4SDdow96jRbK31udSGaXx2/HK0OCYNjVBeiBmhSibvJn0ZN bsxNs2bkZaPU68iAG1c0hKbA6gOZoeT4k9LZ1KB83DEvUQstiaOnAd9YztRNzoLmIcky FZVWjHlcfnWUSOmKEkSaPdb9DrshyPOb1ExXaSlDtxMvktuFPfZF1EZkIpZuc20c39EI CHPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id j13si2465011edj.549.2020.11.06.23.06.47; Fri, 06 Nov 2020 23:07:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 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 S1727822AbgKGHDc (ORCPT + 99 others); Sat, 7 Nov 2020 02:03:32 -0500 Received: from mga17.intel.com ([192.55.52.151]:45628 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727824AbgKGHDb (ORCPT ); Sat, 7 Nov 2020 02:03:31 -0500 IronPort-SDR: BqVMcGsCafbJSSAEoXkIj9+P8yAr6ihIOlrBHuIgFGjzZ2lxZGVnI2L977TE/06iZaA2y3CQuH qZVms5Bn58Ag== X-IronPort-AV: E=McAfee;i="6000,8403,9797"; a="149485518" X-IronPort-AV: E=Sophos;i="5.77,458,1596524400"; d="scan'208";a="149485518" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 23:03:31 -0800 IronPort-SDR: upLVFUf7HTEO/HlFMAD/MZFS72CX9FM4iRjIQmF5GECpAe/1P94yZWE1uWP8XKvMbXuiNLQE84 ehSilGM+hFzQ== X-IronPort-AV: E=Sophos;i="5.77,458,1596524400"; d="scan'208";a="359032035" Received: from ralassax-mobl.amr.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.209.101.141]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 23:03:31 -0800 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: luiz.von.dentz@intel.com, Inga Stotland Subject: [RFC PATCH BlueZ 07/10] tools/bnep-tester: Convert to use ELL library Date: Fri, 6 Nov 2020 23:03:09 -0800 Message-Id: <20201107070312.8561-8-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201107070312.8561-1-inga.stotland@intel.com> References: <20201107070312.8561-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This reworks the source code to use ELL primitives and removes dependecies on GLib. --- Makefile.tools | 4 ++-- tools/bnep-tester.c | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Makefile.tools b/Makefile.tools index 83c30252d..8c79a528d 100644 --- a/Makefile.tools +++ b/Makefile.tools @@ -130,12 +130,12 @@ tools_rfcomm_tester_LDADD = lib/libbluetooth-internal.la \ src/libshared-glib.la $(GLIB_LIBS) tools_bnep_tester_SOURCES = tools/bnep-tester.c monitor/bt.h \ - emulator/hciemu.h emulator/hciemu.c \ + emulator/hciemu.h emulator/hciemu-ell.c \ emulator/btdev.h emulator/btdev.c \ emulator/bthost.h emulator/bthost.c \ emulator/smp.c tools_bnep_tester_LDADD = lib/libbluetooth-internal.la \ - src/libshared-glib.la $(GLIB_LIBS) + src/libshared-ell.la $(ell_ldadd) tools_smp_tester_SOURCES = tools/smp-tester.c monitor/bt.h \ emulator/hciemu.h emulator/hciemu-ell.c \ diff --git a/tools/bnep-tester.c b/tools/bnep-tester.c index 5e4d7fb6d..dab913862 100644 --- a/tools/bnep-tester.c +++ b/tools/bnep-tester.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include "lib/bluetooth.h" #include "lib/bnep.h" @@ -37,7 +37,6 @@ struct test_data { struct hciemu *hciemu; enum hciemu_type hciemu_type; const void *test_data; - unsigned int io_id; uint16_t conn_handle; }; @@ -192,11 +191,6 @@ static void test_post_teardown(const void *test_data) { struct test_data *data = tester_get_data(); - if (data->io_id > 0) { - g_source_remove(data->io_id); - data->io_id = 0; - } - hciemu_unref(data->hciemu); data->hciemu = NULL; } @@ -282,7 +276,6 @@ static void test_basic(const void *test_data) break; \ user->hciemu_type = HCIEMU_TYPE_BREDR; \ user->test_data = data; \ - user->io_id = 0; \ tester_add_full(name, data, \ test_pre_setup, setup, func, NULL, \ test_post_teardown, 2, user, test_data_free); \ -- 2.26.2