Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp367414rwp; Wed, 12 Jul 2023 14:51:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlFoUn7/+umtStePN3O21bYEC/zKSvbEERuyyfoS8dxQCL2BX1XX7ZoQzCKOFlEHRZalPEK0 X-Received: by 2002:a05:6a20:7da7:b0:132:7d4a:34b5 with SMTP id v39-20020a056a207da700b001327d4a34b5mr5183910pzj.37.1689198698339; Wed, 12 Jul 2023 14:51:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689198698; cv=pass; d=google.com; s=arc-20160816; b=s20pemrtXJOKTBmxZps0ehBEXT0dObb7YO30Mjx/cduFloCrMQCimCvQdNCYYbRRo5 FC5ksWtE03Xk6Z6xhqnpXFi/KazPnLsKrX/xfsr4ZLZ/6A7R6TEEU/qbPOHZewl2k54d s/wF7RVkERezqExTM9WzEHPkbdDUxQOI0NEsc+NaVeFcQqmFlgROwFHQopbzsO0/Phct /CLphOMuIU8Sg30zXSUCi8krOFgYfVy2n19s8ht+Yn7vhOA/ruDUgdxi/XkAGd/uvrY7 /2Mhobnorso4gRod4PWZBMAWZEM0VNBX6uw5BnUHJ2WSW1NYRQHk9ofY2zFOclCiuZli TuJw== 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=5PH9FTE03bzhrvZ8/lmoxEfuHEMIQvOH29LebjZueS8=; fh=raBgKoRsHCwQLc6ReOhmOoEQ+DtSaNc74fugaHBwryI=; b=iRq+kvBRF0HzxzqsTzu85mlSOVVXH2RGAgQM8BMqb4SJXOIKdZN3BAsV66HHBxAzcP ulK98zg/RxtpZZEsaI+o6fr0ofmsSAoBWTPErqpGr7QhDudpCD4s6+KDDtGTHeyN3HXM Ocg27UOA9Pk62kaGow8sHvHE9txUBcz3yfKXR8+UngIjuyvOz+T5IR+T2A99FrdH4BI5 yP0l0ZO5mEbmE5BT0tftyMDbf3NAax+aMUj+bcHIyVQlL9/h1wFHdFL17rFUUNioncZS AAvu0aq96Rlz9fLBbs67Ky8gaqqCcuRpvf/d1hKOQHsNae3SjV0SE9Sj9SVgeuiO4+zH lVYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=rjihywSo; 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 g9-20020a056a0023c900b006828c76a9f1si3936530pfc.74.2023.07.12.14.51.06; Wed, 12 Jul 2023 14:51:38 -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=meesny header.b=rjihywSo; 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 S231298AbjGLVWz (ORCPT + 99 others); Wed, 12 Jul 2023 17:22:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjGLVWy (ORCPT ); Wed, 12 Jul 2023 17:22:54 -0400 Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929441BF3 for ; Wed, 12 Jul 2023 14:22:53 -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 meesny.iki.fi (Postfix) with ESMTPSA id 4R1W1731qWzyfb; Thu, 13 Jul 2023 00:22:51 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1689196971; 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=5PH9FTE03bzhrvZ8/lmoxEfuHEMIQvOH29LebjZueS8=; b=rjihywSonP9bmdHvmFAp1ZzoP0MnHArq56NNB3BR4DtxaHoSIBItAypNqH8z3gm3iui3Ur hIzvupnFH/5ugg6WBH3GFStbRZmKyO1Sx/7Q/3ZxuUvI+lBBs8lLzuTantZaExcfhKi15W JHmPQwrl5fq9UqiihbFllca3twdFvjM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1689196971; 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=5PH9FTE03bzhrvZ8/lmoxEfuHEMIQvOH29LebjZueS8=; b=CY8w48E+tqypv1g6b72zr4l9iNvfGk/y7XDs/W1nxCIjdKiw27j3qaROoQi71UlhTDkF9F XVjlRAFuHnt6cDK28Z+vnjeIENIXkuAy/81vN6yFQipMLfrzaYMeobkkYzKs4ok9KHdOrM +FUwFVTKmHElJj5hUJLWIkUaYrHvO6Q= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pav smtp.mailfrom=pav@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1689196971; a=rsa-sha256; cv=none; b=wnqcAUyQEUMfzSviPzrjkx4HenMz/hX+ovlpwqSpmFWwjGRPSoPBFSbzU45DR6aRc7ENQx D2Ny0IpYCP4G70H6DIVZHK3CZkpFXojQkocW6+Ys1XUUidqnmjpGpiq81pjZHEPqmc2k4i ULhvSbyseU+hyZGbBu/ZG/eedm5uMJw= From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen Subject: [PATCH BlueZ v2 2/2] test-runner: fix behavior when no audio server Date: Thu, 13 Jul 2023 00:22:49 +0300 Message-ID: <696a65e1c6790cd194c863c5b4128df7aa533e0f.1689196901.git.pav@iki.fi> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 119e1cfbc..243eab468 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -277,7 +277,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)))); @@ -1132,7 +1133,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