From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id CA56A5A026D for ; Sat, 8 Apr 2023 01:13:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680909200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CCX3A5zICmZ+mBgCpIiipqF0+i7Wp1rTSuyTlLhQLEc=; b=E0OlpPDjGIMjXDOae041bHNjQyRozzwlmwku+25G51v/GAo9kzrvqlNZSjebswgY3HgoB6 qcP3wrpdIDqcfVovK6WH7qbx1YmYbSvu0wyowTRs/65VkVNm63BQZw8/X+SNHzezVMDPfO /gGaGZU71H5YbVqsmhPHuzYjHRHbAIY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-297-kuLwycD5O4yLMscJK5TmzA-1; Fri, 07 Apr 2023 19:13:17 -0400 X-MC-Unique: kuLwycD5O4yLMscJK5TmzA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2BCEC3C0F18F; Fri, 7 Apr 2023 23:13:17 +0000 (UTC) Received: from maya.cloud.tilaa.com (unknown [10.33.32.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC6DBC158BA; Fri, 7 Apr 2023 23:13:16 +0000 (UTC) Date: Sat, 8 Apr 2023 01:13:14 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] test: Remove race between commands run in the same context Message-ID: <20230408011314.3ed17f28@elisabeth> In-Reply-To: <20230405015642.406952-1-david@gibson.dropbear.id.au> References: <20230405015642.406952-1-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: WJCWOLZJOTQU3LSOTONL37KGRLIIC3FJ X-Message-ID-Hash: WJCWOLZJOTQU3LSOTONL37KGRLIIC3FJ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 5 Apr 2023 11:56:42 +1000 David Gibson wrote: > context_run() has a race condition if two commands are run in close > proximity (generally involving at least one in the background). Because we > always use the same name for the temporary fifo files, if another command > is issued while the fifos for the first still exist, mkfifo will fail, > typically causing the entire test script to jam. > > Create unique names for the temporary fifos to avoid this problem. > > Signed-off-by: David Gibson Also applied. -- Stefano