Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1525516pxk; Fri, 18 Sep 2020 15:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbSTCrAnK6IffOxf4uz6tBvVLq8g+dhPi8havdDXF/NE4DI6WCNSKaj1CyR1o3V2NmbUXB X-Received: by 2002:a17:906:6158:: with SMTP id p24mr37838215ejl.35.1600467297529; Fri, 18 Sep 2020 15:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600467297; cv=none; d=google.com; s=arc-20160816; b=h0sPuS+UK9ARziBgiEHk2zK71EIpDcCBQ+fdrYTPfsYlk0pdJ8E8+AzGzAc+vLZXKr UGCv0jBjBAaqb4tBMNiQf1ws2lomW81TFoA8J8qokj/dVLIGN7ipxUBF+h2w/RVSkkJX Ac1Bp0PU/NnBGcoe3TCgns0OvUP95DQfxtsCxzinvyPgEoDFieM/IyEjwlCf2EoJ380U 0kqAcF8Rj1sB+MwBhIC3VvNGKCbhnuvu4EnQ1Y+a16aqZeFB+xwaPhP2+rZjl5AVa2Ud eNuynl0jYyNj4/UBSgYPQat1X5jTbF5PCLCdQ9+Y3NBkNgKaR6fsMOlw/xJ3WTvWkm2X LfuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5nZKXAmQXOCYqMZ4lcdAaR9zafR1QMAlp0o9MGm/Juk=; b=RYKedWt+oUmBe4mguvpbqoXzJ5SYfltWl6vEprj7s/G5UcE68IvTwQGN15gAMmk7vj zvHuYwD6lQCCDl1KJa7E4Kv6Ubn29cpmgQUv//AbbEYPPXqns0YE+TLJtpDftG2emj4i s96IGUL5pSrLanTaoc5XYmogMTOjKSs8kwZqKINP8HlQFxwGddbQyviE1jFi+BuU1q+f N1eukoHgZHUJNZGPo9ssGDrcDi/FheeOEEWSlAodcpjaH8U8Yk+tvU4ESsmRaPopRZqJ 3+jO9/aR3eKEMTQrru3iitc2wXcmq6FSV6CEbcTYik6KR0z+Kx/L4z8uJ7/MS0Vkp6dM 7Tmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y5yyVV10; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si3121375ejv.525.2020.09.18.15.14.33; Fri, 18 Sep 2020 15:14:57 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y5yyVV10; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726174AbgIRWMY (ORCPT + 99 others); Fri, 18 Sep 2020 18:12:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbgIRWMX (ORCPT ); Fri, 18 Sep 2020 18:12:23 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF577C0613CE for ; Fri, 18 Sep 2020 15:12:23 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id x14so8840930oic.9 for ; Fri, 18 Sep 2020 15:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5nZKXAmQXOCYqMZ4lcdAaR9zafR1QMAlp0o9MGm/Juk=; b=Y5yyVV10zFxt7f0jQANZ2WHjs4d+K8ewhV4sY31a0fhwF1SAfvyHbnUse3CcLd412D PgBPs1pyNWhzcErZ8msrRiYjEOlCRX9X/CTKH4r5iBjMk9DaDTd0tzIgr3n8jJRNhH9x Mbkgtt7vLrxwzT/+VFuQRpWolCXF1/IZXYyzIJwOsLBDRheQqCdVsWt8gJ8L4HvtujSI E+0RhWvlY1lAlNPhQtS2MQJTg68XffCuyZUVB1rXWvETESOi1yqNDw4qo3VbzvGYZnTF MbJvW0ee49hIVTaqK/a7T5U4SrJarq/YUdv/8bdjhdDYlMKRXEFrzxETefoN2zWgiFwQ F4Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5nZKXAmQXOCYqMZ4lcdAaR9zafR1QMAlp0o9MGm/Juk=; b=VhgbpZqz4xpJz3BHBHS4Km2ctaPwFjeW02zJuI/T3vaxEFQZCRu7rMxowcm37eWfgH zqCf+qK2Vbb9wVb+42Dq94ZXJUAUGZhqOVVPDtLxVvzWsuXBxytKGaUvuYPgJOhunDyb 7Q187+Zdp5O22L1ScZxRpBQyGA97MAENkDadPw7EG7Ai0y1CBBuv8AOJMdaIx8A3FR4r TAWDDav9m0H1Bv9tgwgNAA1AGtBvljN7mvUGMyVrEtpXUP4Yw5CF8vB6VrvoWqkAEZ2/ MHlhp7680Vg0roEhgORMC3i1I5oRTL49+UYUcd2AmRuQtMrGPBesKZXCGa8i+1UZwX3Z SYZw== X-Gm-Message-State: AOAM533uPInjVYM8Ud5QTRWD2l/UGG+Ha+NcPnlr8CUzM3DQUkhOmYZM uA47WQpxRqyc5hh9qZUMXQM+LEt6UqkjQfoi83Y= X-Received: by 2002:aca:3e08:: with SMTP id l8mr10147892oia.152.1600467143139; Fri, 18 Sep 2020 15:12:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Fri, 18 Sep 2020 15:12:12 -0700 Message-ID: Subject: Re: Modifying Makefile.am to facilitate test-adv-monitor and future unit tests. To: Miao-chen Chou Cc: Bluetooth Kernel Mailing List , Marcel Holtmann , Luiz Augusto von Dentz , Alain Michaud , Manish Mandlik , Howard Chung , Abhishek Pandit-Subedi Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Miao, On Fri, Sep 18, 2020 at 12:44 PM Miao-chen Chou wrote: > > Hi Luiz and Marcel, > > Unlike the rest of the existing unit tests in BlueZ, the logic blocks > tested in test-adv-monitor require dependencies of not only > src/adv_monitor.c but also all the dependency tree of > src/adv_monitor.c. The current convention in Makefile.am is to add all > the extra dependencies one by one. However, the maintenance cost is > high and not suitable in the case of test-adv-monitor. Therefore, we'd > like to propose changes in Makefile.am to make the source of > bluetoothd as a static library and link it for bluetoothd target and > the unit test target. It would be great if you can provide feedback on > this idea before the implementation. Thanks in advance! Then we should have had the code move to src/shared for unit testing, but how exactly are you planning to do that? For testing the kernel interface it normally done via a dedicated tester, but that again can be done with shared library. > Regards, > Miao -- Luiz Augusto von Dentz