From nobody Mon Feb 9 10:38:30 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com ARC-Seal: i=1; a=rsa-sha256; t=1644493267; cv=none; d=zohomail.com; s=zohoarc; b=dakKcsmBaqPfjOam0CWEiqYIJzlzR7Kf8FEh4lJfabzyy6e6eARXZnP8iARNt5ADotb/pPnL2smHatjBny8ggOn5MQMX3DGtW7/r/4W6OdhsKuso5nXsIgEj6TumX3r35TVAkv6vLwTsEss+ioDKrVsKRMV2zL3P6w+m2OZTlcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644493267; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rMf4KtmBn+yyQQHi+FpBQwGipj8F3jW/JGrXe3xFgzc=; b=Yv9dk586e4n0E9YPZHjLBi4nJkaqR/ha9b0cvVawQ5xhRkWvDBgPOCD+o0xRCIwfSd2IIEu2lUq1rBMeP6uZmdu+iTr/Npvk50AbLtz5ea2t8xq61eRMkDMgGwg8cN4IqbcVZeZrQ71Ls1G/zkbjfpva3wz/xmFGt6C/uOC8y3s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644493267810582.3828330764125; Thu, 10 Feb 2022 03:41:07 -0800 (PST) Received: from localhost ([::1]:43550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nI7ow-00050G-Ot for importer@patchew.org; Thu, 10 Feb 2022 06:41:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <5279f88ced3f628b475f7b9e1cb3b5f4c0377b8c@lizzy.crudebyte.com>) id 1nI7kB-0007eh-UY for qemu-devel@nongnu.org; Thu, 10 Feb 2022 06:36:14 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:46401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <5279f88ced3f628b475f7b9e1cb3b5f4c0377b8c@lizzy.crudebyte.com>) id 1nI7jp-0003Sk-GD for qemu-devel@nongnu.org; Thu, 10 Feb 2022 06:36:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Content-Transfer-Encoding:Content-Type: MIME-Version:Subject:Date:From:References:In-Reply-To:Message-Id:Content-ID: Content-Description; bh=rMf4KtmBn+yyQQHi+FpBQwGipj8F3jW/JGrXe3xFgzc=; b=CXo1H zFIpz08LUZc9lINYj1BTXeeZHsVTReRkvoV1IWj1kIHLdUjUCPGJx8lKdxJXM43fNLZGqU3gm0dt4 y7vcc3QfUbmAh0aaJFpfZHSg0d3QXBK56VCR4UKe8Ee6OWzP8/5MHV0/9UatU0CH2tgMnPv+/AezX VaWjIUaJ8/hbV0C5lLCYz2s2cMzb4YuGuEJiVW6m1kn7a3MmFFIudU2RVwUSBD67oeW7nWwnwhvhT AMmjIHmnl9mW6JUJr9jdoz6B6L7EUX+PSqyj8kl0azpKaaLrKVKmx8ZPjz5Hwm2JY8LPROnVh0/sq zJbyEB6Yw0bMlq40KuB33guxsD3aw==; Message-Id: <5279f88ced3f628b475f7b9e1cb3b5f4c0377b8c.1644492115.git.qemu_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Thu, 10 Feb 2022 12:21:55 +0100 Subject: [PULL 2/5] tests/9pfs: fix mkdir() being called twice MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, Peter Maydell Cc: Greg Kurz Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=91.194.90.13; envelope-from=5279f88ced3f628b475f7b9e1cb3b5f4c0377b8c@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @crudebyte.com) X-ZM-MESSAGEID: 1644493269664100001 The 9p test cases use mkdtemp() to create a temporary directory for running the 'local' 9p tests with real files/dirs. Unlike mktemp() which only generates a unique file name, mkdtemp() also creates the directory, therefore the subsequent mkdir() was wrong and caused errors on some systems. Signed-off-by: Christian Schoenebeck Fixes: 136b7af2 (tests/9pfs: fix test dir for parallel tests) Reported-by: Daniel P. Berrang=C3=A9 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/832 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Greg Kurz Message-Id: --- tests/qtest/libqos/virtio-9p.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/tests/qtest/libqos/virtio-9p.c b/tests/qtest/libqos/virtio-9p.c index b4e1143288..ef96ef006a 100644 --- a/tests/qtest/libqos/virtio-9p.c +++ b/tests/qtest/libqos/virtio-9p.c @@ -37,31 +37,19 @@ static char *concat_path(const char* a, const char* b) return g_build_filename(a, b, NULL); } =20 -static void init_local_test_path(void) +void virtio_9p_create_local_test_dir(void) { + struct stat st; char *pwd =3D g_get_current_dir(); char *template =3D concat_path(pwd, "qtest-9p-local-XXXXXX"); + local_test_path =3D mkdtemp(template); if (!local_test_path) { g_test_message("mkdtemp('%s') failed: %s", template, strerror(errn= o)); } - g_assert(local_test_path); g_free(pwd); -} - -void virtio_9p_create_local_test_dir(void) -{ - struct stat st; - int res; - - init_local_test_path(); =20 g_assert(local_test_path !=3D NULL); - res =3D mkdir(local_test_path, 0777); - if (res < 0) { - g_test_message("mkdir('%s') failed: %s", local_test_path, - strerror(errno)); - } =20 /* ensure test directory exists now ... */ g_assert(stat(local_test_path, &st) =3D=3D 0); --=20 2.20.1