From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB6E6C4332F for ; Mon, 17 Oct 2022 14:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wkEJ90BfF8a+40smYuy8LlojdFqa0z6mbhEv+keFuaY=; b=yOcwHXnjcId7T6 6ljA2qE/NgOdeeZrJYcZzpm3w5d2y9OCZxIW5tQ1HmbftCuyYQYYpMt1gQ1Ibxk2U/rm07O6WyD4X MkSI2QJny3JVRS8dq90gm9UzVAI4ddeh7iWS9jKaKcixpQ1wJaYncJC2pW0z+MnW66x/R0XTbo+Xd 5+8q8PpTlk62NHaE6IU7h+rwEqZYi+BEsZ43PL59XIpCLAgOHeIKm3cRoMkPMh61s9WE6V94O9WEM RDCYz9l5igH70mZm/rS2enlJm4McichqaQz77eDBxiCUr3qnUmURH1/zEW3oiKr8ld9LkvYHo3cYg Gl7skMZLJ14MASaoP1mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okRPR-00CqZ5-Vn; Mon, 17 Oct 2022 14:48:06 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okRPH-00CqIQ-AU for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 14:47:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0A94BB818FE; Mon, 17 Oct 2022 14:47:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17874C433D7; Mon, 17 Oct 2022 14:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666018073; bh=vNP3GDP+dTei/h41iY7XScHfo9eD8dv4mbQThXgHuS0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nJXoBdhCj3bhhKqQ5+OVFIX66OLikQbkOOZwzIoPT7eB10DmDLSdd/vXY2y0iioOb w0dQjTITNerLmZAUeoo9JRsPSSo2TiBRT5SxAZ9lbVS/8KmSlhp9DM1r5PrIFCAnLT g2oCjUeWI7Etdmgi7UPOqr9G8IE13ylM9pdCwFb494EyDS1rY0fMsyURCVGWgwXXB/ EA2WJuxdVXN+pzCEZvCeaYitwhXhZkEgxtykMbIq0h0sseyLYQx7ueUsvY5yWmSDGD w+1m+VHJabx8mvQT98QwNkYZuT6EylqpAaOnOn6m2Oni7glde1WETw/vubzvzGUepK tE1rTlsqIJz6g== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 1/2] kselftest/arm64: Check that all children are producing output in fp-stress Date: Mon, 17 Oct 2022 15:45:52 +0100 Message-Id: <20221017144553.773176-2-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221017144553.773176-1-broonie@kernel.org> References: <20221017144553.773176-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2446; i=broonie@kernel.org; h=from:subject; bh=vNP3GDP+dTei/h41iY7XScHfo9eD8dv4mbQThXgHuS0=; b=owGbwMvMwMWocq27KDak/QLjabUkhmTfrPlKUUdq/7Dt/ZxyfW7MTmmZJ4cnPv1p5r1YuSfmaZBk M+O3TkZjFgZGLgZZMUWWtc8yVqWHS2yd/2j+K5hBrEwgUxi4OAVgIvMj2P/7K6W7Z2a5aEQxNLSfXG Rue3e1m+XVOk0uk9tGBvfNtXnPRV/x6v5cl9W99vmp+CzOxbOY38RX+Pxs79585O6+6UnJsRGyEfO2 il1/bRAefLBeIXxqgOa7Mucnh9a4ySz54/hIam59M4P0hISUR3/+5GfuDXQxPKZ+r992+bZnV6XFLT sPa9202rdIoe/ug/X7j71bcjONLajrNOubVU+a31yM+zZH3rdENVj10aWiK51pbzXvLDmRLpdU5pTF JVaxsrFWN0+1RsHwxa75ySKTUwJO/a+cUBBW9Th+w/qYMo2bTM7q8RG9RhUtatLtyTpPWRdqdUk3v+ fR7Gq/m27Z291+vPZq25ebRfOsAQ== X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221017_074755_700328_166946A4 X-CRM114-Status: GOOD ( 19.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently we don't have an explicit check that when it's been a second since we have seen output produced from the test programs starting up that means all of them are running and we should start both sending signals and timing out. This is not reliable, especially on very heavily loaded systems where the test programs might take longer than a second to run. We do skip sending signals to children that have not produced output yet so we won't cause them to exit unexpectedly by sending a signal but this can create confusion when interpreting output, for example appearing to show the tests running for less time than expected or appearing to show missed signal deliveries. Avoid issues by explicitly checking that we have seen output from all the child processes before we start sending signals or counting test run time. This is especially likely on virtual platforms with large numbers of vector lengths supported since the platforms are slow and there will be a lot of tasks per CPU. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/fp-stress.c | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tools/testing/selftests/arm64/fp/fp-stress.c b/tools/testing/selftests/arm64/fp/fp-stress.c index 4e62a9199f97..35dc07648d52 100644 --- a/tools/testing/selftests/arm64/fp/fp-stress.c +++ b/tools/testing/selftests/arm64/fp/fp-stress.c @@ -403,6 +403,8 @@ int main(int argc, char **argv) int timeout = 10; int cpus, tests, i, j, c; int sve_vl_count, sme_vl_count, fpsimd_per_cpu; + bool all_children_started = false; + int seen_children; int sve_vls[MAX_VLS], sme_vls[MAX_VLS]; struct epoll_event ev; struct sigaction sa; @@ -526,6 +528,27 @@ int main(int argc, char **argv) /* Otherwise epoll_wait() timed out */ + /* + * If the child processes have not produced output they + * aren't actually running the tests yet . + */ + if (!all_children_started) { + seen_children = 0; + + for (i = 0; i < num_children; i++) + if (children[i].output_seen || + children[i].exited) + seen_children++; + + if (seen_children != num_children) { + ksft_print_msg("Waiting for %d children\n", + num_children - seen_children); + continue; + } + + all_children_started = true; + } + for (i = 0; i < num_children; i++) child_tickle(&children[i]); -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel