From nobody Tue Feb 10 06:58:13 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=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1651613243; cv=none; d=zohomail.com; s=zohoarc; b=lqPVh2wRZJpbSdJ45fP5/0/JP6UOUQY/pknAwd4qu0PfGjlAmaX5DluI0jrgRCdNSGewWHiwNaieDxR+Q+p2fyBcS3rOUlBCKThMlEEdbOEPXw8yH+uUmRgENaP4vkx+N25zKB4cNX0BPrFiPAtsqnkUTb92CnG4WsoHM3v2vJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651613243; 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=9m1Y+nOorLPIX/35eqXi8Mnicnq6DPaZ0KxNncP/Vgw=; b=i1ihHtXT2HMM0zyWZiPpOhOjOry84eJb+lI9e7/0Lzd06Zh+wJF3g5xNj4cEBdIM65le4XprCv07vIPYYRsXlxdI/bNcrBRnC/T7NnLSCcYHOG7vttMCiC16//nv/l9QTmvWhMhDkCcgH7WcgRFM9HTQQe2y87QkF9dhzIJkVus= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651613243136867.8760486755725; Tue, 3 May 2022 14:27:23 -0700 (PDT) Received: from localhost ([::1]:41158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nm03F-0008ML-SI for importer@patchew.org; Tue, 03 May 2022 17:27:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlyvO-0001jJ-I4 for qemu-devel@nongnu.org; Tue, 03 May 2022 16:15:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:31618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlyvL-0003Ei-SY for qemu-devel@nongnu.org; Tue, 03 May 2022 16:15:10 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-219-letgppWKO1aA-vWQj55NYw-1; Tue, 03 May 2022 11:35:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5F850ADE88D; Tue, 3 May 2022 13:01:29 +0000 (UTC) Received: from localhost (unknown [10.39.208.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D7844010121; Tue, 3 May 2022 13:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651608907; 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=9m1Y+nOorLPIX/35eqXi8Mnicnq6DPaZ0KxNncP/Vgw=; b=SNw0I7gsrHS/RUMx+S6nTkVIL9DI/XQsIugifCQ5CCWFgCacDRY2iDTkIRjBZGfbfI1h9N 9RcpnkLQq8eXTiWLH4v/0FKB6yTNzueFrufOoRRgN+QIK/ejLM9IEQTkBmpKJTLs99P/a9 JhRaaY1w9MQPxVUcVPIJjYUC8QLeqC0= X-MC-Unique: letgppWKO1aA-vWQj55NYw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Peter Maydell , Richard Henderson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 10/23] tests: replace pipe() with g_unix_open_pipe(CLOEXEC) Date: Tue, 3 May 2022 17:00:10 +0400 Message-Id: <20220503130023.180544-11-marcandre.lureau@redhat.com> In-Reply-To: <20220503130023.180544-1-marcandre.lureau@redhat.com> References: <20220503130023.180544-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-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 @redhat.com) X-ZM-MESSAGEID: 1651613244079100001 From: Marc-Andr=C3=A9 Lureau Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- tests/qtest/ivshmem-test.c | 5 +++-- tests/unit/test-io-channel-file.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index bfc91d1719d2..e23a97fa8ef4 100644 --- a/tests/qtest/ivshmem-test.c +++ b/tests/qtest/ivshmem-test.c @@ -304,6 +304,7 @@ static void setup_vm_with_server(IVState *s, int nvecto= rs) =20 static void test_ivshmem_server(void) { + g_autoptr(GError) err =3D NULL; IVState state1, state2, *s1, *s2; ServerThread thread; IvshmemServer server; @@ -320,8 +321,8 @@ static void test_ivshmem_server(void) g_assert_cmpint(ret, =3D=3D, 0); =20 thread.server =3D &server; - ret =3D pipe(thread.pipe); - g_assert_cmpint(ret, =3D=3D, 0); + g_unix_open_pipe(thread.pipe, FD_CLOEXEC, &err); + g_assert_no_error(err); thread.thread =3D g_thread_new("ivshmem-server", server_thread, &threa= d); g_assert(thread.thread !=3D NULL); =20 diff --git a/tests/unit/test-io-channel-file.c b/tests/unit/test-io-channel= -file.c index 29038e67b64d..1977006ce922 100644 --- a/tests/unit/test-io-channel-file.c +++ b/tests/unit/test-io-channel-file.c @@ -109,7 +109,7 @@ static void test_io_channel_pipe(bool async) QIOChannelTest *test; int fd[2]; =20 - if (pipe(fd) < 0) { + if (!g_unix_open_pipe(fd, FD_CLOEXEC, NULL)) { perror("pipe"); abort(); } --=20 2.36.0.44.g0f828332d5ac