Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5879967ioo; Wed, 1 Jun 2022 14:50:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTsUxF6Hwg0c4Z47R/uLzzwhq9la482spvh11VxK9CezpuDnMYLaNMBWTwMjWliU+MZJUG X-Received: by 2002:a63:cc53:0:b0:372:7d69:49fb with SMTP id q19-20020a63cc53000000b003727d6949fbmr1260499pgi.21.1654120246370; Wed, 01 Jun 2022 14:50:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654120246; cv=none; d=google.com; s=arc-20160816; b=xz0UxIC736qIpfWZLGKWCrP70HCEujG53Loay1jMmIUNszE6NVuyECNkTMFYVhyCnS CIupjq7Zua3ZGAs9RcgnikOjk1oDUhNnLNMPXIo/hpmsVntGL4ERqMYCvAHDNW1Gdwbd G2Q6xsGbzsMFgYIjacQvE0uRajSjGZ0++JvDyLdBreTS4PVZFP9NpZEch9SghrE6Ctg7 56z157Mvowpu2faoWyCFjM6tq3xa7EPPPJ56VSAZo5RC+MpSfAEwmqeHfHaqN2dzBbaZ RpU4JHhqZzLu1HGYVUAjpdSbMTL8gNQFDQnfh8KYBaPeQYCxU09YwI1sa7YNWnfyDEtr Dcsw== 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 :message-id:date:subject:to:from:dkim-signature; bh=RIxGrmNBg/91TDmPlkpGK2bw1iCjCrFVedNSq1scBaI=; b=GmjVZ8XRvyS0M8K18KYmqS1dOXlAZq2JduAmXWZOd+nuwk5k2RmS3313w7wNW/pxDM zZ2ICKLLrIuGjYv3/5UuL4/hRvgOXw11d+nEoy4V9NLp3wkjyUo5kY1T5d037TJoHOFR a5sEg3zEgGW/GI9T1O5kEcmywpFgMcK6zPqhQOf+f06f5hIaoEapgaJl3CpwYNI1RlLE z+0EtAeGXppJuvP1KzW2wQjvlJysZi0QvtAfCPbnjdt98OJzMgkNezwNxuYuVt4JwDCW HffFRZxX81gWh72zifLzFoAuqrpUfu0/nhgzimJefr5JB4O341Fqw6QCii3a5jLQUhrg n0GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LFXdACnq; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b16-20020a170902d51000b0015870834b16si4092714plg.549.2022.06.01.14.50.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:50:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LFXdACnq; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8C9F65C646; Wed, 1 Jun 2022 14:12:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231299AbiFAVMe (ORCPT + 99 others); Wed, 1 Jun 2022 17:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231172AbiFAVMc (ORCPT ); Wed, 1 Jun 2022 17:12:32 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE8BE5BD23 for ; Wed, 1 Jun 2022 14:12:31 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id u18so2879719plb.3 for ; Wed, 01 Jun 2022 14:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=RIxGrmNBg/91TDmPlkpGK2bw1iCjCrFVedNSq1scBaI=; b=LFXdACnqMruRzM00aJcydRM7c63GV9bT16zujKOZmXNWTtolLTkIayq9UebFPVOUTV t2jU0GBoZ66k9OfwcsK9RPHjXiTeT+XlFVjArjSX6pDnRudLVJnZISOoEukRHLkK775h 6jP2rE+bgix2lWrP5/44plgSCgr0wURmJ41BLxas60jTEaC2zlnqhyx2vnUFQKHmdrqf GAVDDPYS8CeJcIsa6P7BRu2U30f/Q6e7C3OZkqCbsO8BY70RRnrJRNMcBqh9IX0xuR0J 7lnI92MY0TGyzlY2Zv8wZ08PNy/BMDsRRrEvhs1n2DmKHsPzpPOT89/WMCXeFwqx50A0 +nug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=RIxGrmNBg/91TDmPlkpGK2bw1iCjCrFVedNSq1scBaI=; b=NPMBhcdiDBnUQ2RTLF2NL58Cjj1BVOWYUx5yvSiBQxCFkUyd1JHtMSy4JjjMA5N8SO r7lMWi3bLkINZAQL8wn7AAY9NvNoSJbkMc731cPACocHQmDarlyh5L49FSGPFzQRLc31 /aD7h05ROZDSC+Je9ZmtfA3Sa9FzrIQ+Drp9TnuSGv8gyC/2BooaMb86nkDk+2Z9PnNb o6i/7xBLFhFAmVucF8322347lvNWJ/pL6H6V+RreH/K4xUSncH35rEoiS4vlx7ibcj/p oFeFDBD1RTekvhTyesfAwEBsM+W7rEVyEj/6mZEVarhCJv7fRsqO/zViK7n8z572yvKu K5YA== X-Gm-Message-State: AOAM5314HYmDdrEIc0yIZWQvUsgwm+zynLKYuhb/DNG/yhakpb0Coa7V het4rZRQ0na3zctksWobVeGUMgnsCVI= X-Received: by 2002:a17:903:1252:b0:154:ca85:59a0 with SMTP id u18-20020a170903125200b00154ca8559a0mr1308138plh.169.1654117951199; Wed, 01 Jun 2022 14:12:31 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id iq18-20020a17090afb5200b001e31f4cc977sm1740065pjb.56.2022.06.01.14.12.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:12:30 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] test-runner: Fix not waiting for system_bus_socket Date: Wed, 1 Jun 2022 14:12:30 -0700 Message-Id: <20220601211230.1355268-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This makes test-runner wait for system_bus_socket to be available before continuing otherwise the likes of bluetoothd would likely fail to start. --- tools/test-runner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test-runner.c b/tools/test-runner.c index 1f1a8c36f..945a16a77 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -452,13 +452,13 @@ static pid_t start_dbus_daemon(void) if (!stat("/run/dbus/system_bus_socket", &st)) { printf("Found D-Bus daemon socket\n"); - break; + return pid; } - usleep(25 * 1000); + sleep(1); } - return pid; + return -1; } static const char *daemon_table[] = { -- 2.35.1