Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp76797rwp; Wed, 12 Jul 2023 09:55:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlEIFm80KNtMpq00+YsEnpyYsL0NbKSB/vkJtPQdXA8rhgtJNOnBqBDwBkXaMB9IclPrsMEa X-Received: by 2002:a05:6870:560b:b0:1ad:1984:9620 with SMTP id m11-20020a056870560b00b001ad19849620mr22016840oao.43.1689180942827; Wed, 12 Jul 2023 09:55:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689180942; cv=pass; d=google.com; s=arc-20160816; b=lO8rHOXGcnBCFB/KJafUrIs8o+mGwaXurx3F36DHLQ1oba1olz0MWj6CWOVfLD5Zox FyxvKBrEU32az3eLQJ4TtECIKMkMM/0H3g7L5zVze4F3aGcwn+pNUf/41r37vr/d9p4L Ikp/q1X7A5Zcq8zjdp4uVkQl65Hw2S6bTEZ9rC8CLsVbVoIn5ts1/UzesySp9ScQJv8U NgLt4eR10+CQwWe1SOAzQSkAprzT9Y1FrWmBh6EvnBdzj3JvUdPJwuDcq0Rzx4hmxGhY M1fpdcl0IL/6a2jn4swQ/38kWj2JC/6fPxIDELMTsq/lUWtyoHbq3agTlkRdWSmX+/Kt +UWA== ARC-Message-Signature: i=2; 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 :dkim-signature; bh=Nx8t9C/fg60pCaQqnLs6ZoflL0zQC+OCnWhyH0kALxs=; fh=raBgKoRsHCwQLc6ReOhmOoEQ+DtSaNc74fugaHBwryI=; b=xA5Z8F7P4dGZ4Q5Npo7JesS/AUHI28PPzp0Nvi03fT/nqdarJzpGgOSay6ohUxBC0h aN8vnmVQIJZVoUI1L4FmY9p6qi0pOn9Ag+F8FaxvrIxE01iRNOadJlzM+XW4F7IMgvKQ V56QZ07ln8q6RlYRrSC3gszOIr1lDEKJa3guJkMeGS0za4tBVL8DGgGqGJ4WNuOc9W3g tk6TebLK4xmZWE6oVOm8PP26z2W2Y9Nw+YB4tB1RxM3nixggqYPThIBUrH0+TZboBVgs e4P331U09zySdfOY164nEobpXNGc2JmmtAmNRZrAQSfM0JDEMM/5AVRqNc+vNsywj6Pf v+6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b="bToyYWv/"; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s16-20020a17090aa11000b0025bae7f2b10si11440180pjp.13.2023.07.12.09.55.21; Wed, 12 Jul 2023 09:55:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b="bToyYWv/"; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232812AbjGLQsM (ORCPT + 99 others); Wed, 12 Jul 2023 12:48:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbjGLQsL (ORCPT ); Wed, 12 Jul 2023 12:48:11 -0400 Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [IPv6:2a0b:5c81:1c1::37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA881136 for ; Wed, 12 Jul 2023 09:48:06 -0700 (PDT) Received: from monolith.lan (91-152-120-101.elisa-laajakaista.fi [91.152.120.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pav) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4R1Nw41rLZz49Q9m; Wed, 12 Jul 2023 19:48:04 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1689180484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nx8t9C/fg60pCaQqnLs6ZoflL0zQC+OCnWhyH0kALxs=; b=bToyYWv/Wg8Ov/YbHKiKVnHZEKVUdzZc/GwhR+LDbfgV3Kua6WMI+dZFas2PdD2C9kpVrh h9pG1KreKi3Gl738qgZmLq+Cqs7EHy4ScQNCFo1w8wz9qlFT/EGTkJsf2kSlwwakzyYXGp 2OBzj0wts1v5k/fzUaZVnhJZB9e/WkcWre+BUDfVcG0io1YwEW7XoNz+f5t3qkBeprlTTL Q7QNuIlqxHkGhzrbwxRkASBr6PUS+WMeDG25ozcArUj90fQ57YYfBpHWHE47fQK/Pdxgy5 WJa61whzKgCkkA0PLRBS+xwsHPOljQAUDzNWpDHMg6PnOCccEBCsdvZFxlmLUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1689180484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nx8t9C/fg60pCaQqnLs6ZoflL0zQC+OCnWhyH0kALxs=; b=Aw7ow37YGndkKr6ljlGW8vB7lMtyIF0L0FnLizcszSlxInqHmh2zWtvaTeLEw6hTvneRNs S7oOsBtKtAWSK3ddkmpjqyyTzr/U285i1N/LdYeUvuVBGqjRTkZ2aHt4wuiAyqWmYbGjgY beq4TS/TyuMvgcPRxdVByxpJK2dYjMoRCN093ZLuXlVJ6s0IjcKEj4zPyFVL8nY3MZme8q DFRUheIL4VH/Cze8cnjfqOYBuJk5gQj+49YmN4N/PB5BaVBgmhntEyh/HiNk1eyfvJ96j0 8/O07PxWzSQqzojs4ZIVQefRk7nPIMMaeIPU2COIKtcFY24gpYHGIwCxa0ELFw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pav smtp.mailfrom=pav@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1689180484; a=rsa-sha256; cv=none; b=Dmk+5g/XsbhehGm1YTaCUrlrZ2EjVuQH7ToiMowq688IyoEiM905tYwrPuBOgxPtXPEfGU 0/iSFk4xMsBPBoBO3K/UPRwgOBhaLaN56C0aAXIzITAueUcwT9IjWgdfC0b0tnRa0O6id1 NepcOiO5pzdzo+zlsitEOsAz7NkDkLO6NnCZjIpYbhdZgmLBZNrUbtN1HmMAl1VRdNnaXG CNpJBWImNKVX1tUZme0iTw6+y390d9MKurHjGUUGA43Zn5PrX7V1IVGztBdjGP7mkJurXQ ueM7IjxzZcQNbujDwD4SxPjPQ3tvVJEfylRWPuw29mvRDzyDeujszTHbP1zp/w== From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen Subject: [PATCH BlueZ 2/2] test-runner: fix behavior when no audio server Date: Wed, 12 Jul 2023 19:48:00 +0300 Message-ID: <957b9b9c5c06960a6632ec0a90885388f18db4bf.1689180344.git.pav@iki.fi> X-Mailer: git-send-email 2.41.0 In-Reply-To: <859a1c176765dbb9ea394dde387b8ed072365ca8.1689180344.git.pav@iki.fi> References: <859a1c176765dbb9ea394dde387b8ed072365ca8.1689180344.git.pav@iki.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 If no audio server, don't pass NULL to printf and parse TESTAUDIO correctly. --- tools/test-runner.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/test-runner.c b/tools/test-runner.c index 288901a61..cfb97907f 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -273,7 +273,8 @@ static void start_qemu(void) initcmd, cwd, start_dbus, start_daemon, start_dbus_session, start_monitor, start_emulator, num_devs, - run_auto, audio_server, testargs); + run_auto, audio_server ? audio_server : "", + testargs); argv = alloca(sizeof(qemu_argv) + (sizeof(char *) * (4 + (num_devs * 4)))); @@ -1128,7 +1129,7 @@ static void run_tests(void) const char *start = ptr + 11; const char *end = strchr(start, '\''); - if (end) { + if (end && end != start) { audio_server = strndup(start, end - start); printf("Audio server %s requested\n", audio_server); } -- 2.41.0