From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Rro1HZ7MZGCvEwAAWB0awg (envelope-from ) for ; Wed, 31 Mar 2021 15:25:18 -0400 Received: by simark.ca (Postfix, from userid 112) id 672921EE1B; Wed, 31 Mar 2021 15:25:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CDAB41EE0E for ; Wed, 31 Mar 2021 15:25:17 -0400 (EDT) Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4F9bqx1YsKzSVT; Wed, 31 Mar 2021 15:25:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1617218717; bh=aBOHwWilF5C2QBc1PBMZQ/PS3yKFLPFrfnP3efQ/mdM=; h=Date:To:Cc:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=DaeNrWNoRbaBVuuHs2bx3mi4ODwNTlfur8WZqm7IoUQsygUBtytj2YSsL/eTcy0Dm iVx4FyHnPt+acDpDfPb3Gv02T54I3A/e5nC8Bk8f3sZMJqQCgCiiAXjJsleJVinhMj NbmXCphpK2EEP1tA4lBFvuu6LHe8A5TIzDFwicug/2BFv2ozc1r1/8ebn7alnXHTaY 3yZyXMdVyTwTE4IZGwho0kC/IAEmgXRxpdqjkfTe/RTmHj8CcbF1gE5hhddanVmN8D jGPemNDWT7DkMTg9kof1QZp9KK8ODpsm9EBqy/uhukQLgh2IMt90sJrMdcCg52YSEG 4dbNybQ2CyY6g== Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by lists.lttng.org (Postfix) with ESMTPS id 4F9bqw1CqLzS9l for ; Wed, 31 Mar 2021 15:25:15 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id BC8042F9225 for ; Wed, 31 Mar 2021 15:25:09 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jEEKciAXKItv; Wed, 31 Mar 2021 15:25:09 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 5EC5A2F9224; Wed, 31 Mar 2021 15:25:09 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 5EC5A2F9224 X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id q89vdVgjKM8x; Wed, 31 Mar 2021 15:25:09 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 56D062F9221; Wed, 31 Mar 2021 15:25:09 -0400 (EDT) Date: Wed, 31 Mar 2021 15:25:09 -0400 (EDT) To: Anders Wallin Cc: lttng-dev Message-ID: <592114658.48857.1617218709305.JavaMail.zimbra@efficios.com> In-Reply-To: <20210331185624.406960-1-wallinux@gmail.com> References: <20210331185624.406960-1-wallinux@gmail.com> MIME-Version: 1.0 X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3996 (ZimbraWebClient - GC88 (Linux)/8.8.15_GA_4007) Thread-Topic: test code assumes that child process is schedule to run before parent Thread-Index: spuxQjDmJT+MtLON4NHXbqnjWToiIA== Subject: Re: [lttng-dev] [PATCH lttng-tools] Fix: test code assumes that child process is schedule to run before parent X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jonathan Rajotte-Julien via lttng-dev Reply-To: Jonathan Rajotte-Julien Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" > # > # SPDX-License-Identifier: GPL-2.0-only > > -TEST_DESC="LTTng - Event traker test" > +TEST_DESC="LTTng - Event tracker test" > > CURDIR=$(dirname "$0")/ > TESTDIR="$CURDIR/../../.." > @@ -42,6 +42,8 @@ function prepare_ust_app > > $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT -a "$AFTER_FIRST_PATH" -b > "$BEFORE_LAST_PATH" & > CHILD_PID=$! > + # voluntary context switch to start $TESTAPP_BIN > + sleep 0.1 A wait on the $AFTER_FIRST_PATH file would be probably more deterministic than a sleep here. while [ ! -f "${AFTER_FIRST_PATH}" ]; do sleep 0.1 done I would also expect something similar for the `prepare_kernel_app` function considering the same race is most probably present and simply not triggered by a chance of luck. Seems like gen-kernel-test-events does not expose the same sync capabilities here, please use gen-ust-events as an example of how it is done. Let us know how your testing goes. Thanks _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev