Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1902951rwd; Sun, 21 May 2023 08:31:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ69tBHoj1HyjJTnQcqH9O9EIdWr8oR8onTSIT3oiHi+ThGBmPSC9e/1dD9g35llvS171X6U X-Received: by 2002:a17:902:ee52:b0:1ae:21a9:d081 with SMTP id 18-20020a170902ee5200b001ae21a9d081mr8258269plo.17.1684683115404; Sun, 21 May 2023 08:31:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684683115; cv=none; d=google.com; s=arc-20160816; b=jAhLivHH6rwVb1LeF3qAUxsRlTrOQq+AN9rbphJp1wu2VHdYG4C1J4DUlqbC4cMnZ2 AY6D1zXiQVn3kZjiB6nfpumoWcxF4HwjKVAkY3FeyUawZm+Sr1hBcZPh7b6vs7qXKfax 0ibTxlWekysOX8/2MoM4ocXmgmQeKImBz7mM3JJ4y/KpgPN6rKlJ+xQAdeYu5h3G/DPl fxUB50S2fqFnguR/6RHmVzk7RqJ7bj2w5hkh53/OMGki03WBPoOfyNlK0hLpjy2oOPF2 qHFhG749T5rjnO2qBgexehH/Eg/nlGYhk8ry7XYcNkBI1aBdCz5KplVfMJ2VVOmBDqD1 XQ4w== 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; bh=Zmv7CuN0lVyEJysSzyCNIQ9xpG19lS3SWvZ8S0zqAJI=; b=IwV7VuiQzP2ln8Yqy4CoJz5VwqfAaYThpnMlQ+rY7kqrrgL4D2eWRgmGRmoSDMMDP0 NoFKch1gdvdRADyfLxYn6k83WUVeLNPInh2JUJxfk90w6BjMHpCnMNC87YMxlFirhLGL ZH9S6clMKJYP7KMg6Xw11uq0ScsiqdsE+u7NZjDUgiQ6w+qeEAf6NZ05mlIuPJxlbnEe Q424ILQEBeLOd/KyoAW47Xvi6w/sC0tB8oZx7fp3WP2OEPSMPy9YpMOPJ7yoeX/O+DLi pK2zj/+DvaUb7zWm0NDnLoCEF5fRdAy8k7dx/ir3BiXNpd9EKVFSSZ8TD8ojpn5WHl3w dBtw== ARC-Authentication-Results: i=1; mx.google.com; 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 c24-20020a170902d91800b001a6dba52e52si3107177plz.390.2023.05.21.08.31.39; Sun, 21 May 2023 08:31:55 -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; 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 S229626AbjEUP1q (ORCPT + 99 others); Sun, 21 May 2023 11:27:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjEUP1p (ORCPT ); Sun, 21 May 2023 11:27:45 -0400 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6001D1 for ; Sun, 21 May 2023 08:27:43 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3B008240101 for ; Sun, 21 May 2023 17:27:41 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QPPbJ55M7z9rxF; Sun, 21 May 2023 17:27:40 +0200 (CEST) From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen Subject: [PATCH BlueZ 2/5] shared/tester: retain test failure status Date: Sun, 21 May 2023 15:27:35 +0000 Message-Id: In-Reply-To: <024df2d86c14fc811701ba27bfa576476bc9c0d6.1684682575.git.pav@iki.fi> References: <024df2d86c14fc811701ba27bfa576476bc9c0d6.1684682575.git.pav@iki.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NEUTRAL,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 a test has called tester_test_failed, consider the test failed, even if the test also called tester_test_passed/abort. This avoids reporting success for misbehaving tests that call the status report functions multiple times. --- src/shared/tester.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/tester.c b/src/shared/tester.c index 34f807556..a1ee5b687 100644 --- a/src/shared/tester.c +++ b/src/shared/tester.c @@ -622,6 +622,9 @@ static void test_result(enum test_result result) test->timeout_id = 0; } + if (test->result == TEST_RESULT_FAILED) + result = TEST_RESULT_FAILED; + test->result = result; switch (result) { case TEST_RESULT_PASSED: -- 2.40.1