From nobody Mon Feb 9 16:01:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634653078872297.8119514437707; Tue, 19 Oct 2021 07:17:58 -0700 (PDT) Received: from localhost ([::1]:56716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcpwC-0002TV-Nl for importer@patchew.org; Tue, 19 Oct 2021 10:17:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcpnP-0008Go-4B for qemu-devel@nongnu.org; Tue, 19 Oct 2021 10:08:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcpnI-0006x8-S5 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 10:08:50 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-_PBTGcHcMUuXAfKoTuPNvw-1; Tue, 19 Oct 2021 10:08:42 -0400 Received: by mail-wr1-f70.google.com with SMTP id a15-20020a056000188f00b00161068d8461so10252029wri.11 for ; Tue, 19 Oct 2021 07:08:42 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id f15sm15162384wrt.38.2021.10.19.07.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 07:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634652524; 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: in-reply-to:in-reply-to:references:references; bh=Yj3JiZzos9wfmafHbbhWyjt5GZKs2MQbtgHmoUqM9p0=; b=Zlu4t8vEdMmmbdl7maqfVTMxYjFaju5c5EVcaJJNijcw50zUkhMztNWbFlzla/qXYJr32K izmYYiCalL0iF1uGQfOCq1w1rb7GGguHjO09jmUfqwz+2KeLxFcxGrlRoyIRKYadZkQOQ+ qiiydLTMNnmIdqoRkYx7cGnkVbad7gk= X-MC-Unique: _PBTGcHcMUuXAfKoTuPNvw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Yj3JiZzos9wfmafHbbhWyjt5GZKs2MQbtgHmoUqM9p0=; b=WMBj4BTispEA9u9YakSiclb4OJR+QVz2wVlHLqO17GMWRHxOPk5pNawjwdDUyljch+ qPWXtrH1GAc4B9EKo0UtbpwfAT+yPr+MjUhwvRgO9U8HK3NVvWKHA+ofhdVyJjEm5ANT x4PGBB1Re/FcXto5Cp7ScLL/EFi4rB6ntfNiOdBDf6pcTbMPwE6t36THNTDgy64ywrbb xBzMlEe5R7Bo04ziHElCWl3K/OQGERjmgJZolM56xsx/8S38mASuxVtUcjjflBunDzeL /EWukRBloKTlcKQg8dR1hHkN4d6xPnVd5CrUS17K6XsQKWZ2h6u/bzqxQ0vb3ewZcwUD fylw== X-Gm-Message-State: AOAM5333vG2y88Agwhl2azW914w3KSZ9RRSFkloAr00lSVslnHCn7mh1 eUb6Co7Id+GdIVUb0tr9M4Kuh3s+PEM5fAvrd9Ne+Gt75eJThK6wveWMATokf14h52PBHLKEwj9 B2gsJ8IuJp3gJYUeF1Ll9EozD9WnDOqVH7WreDSbc8hgApW1tRD1NEAm9L+83 X-Received: by 2002:a1c:2b04:: with SMTP id r4mr6490248wmr.48.1634652521312; Tue, 19 Oct 2021 07:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztb3//ywRJsulbhgbhigY+63A9a2DBu1WHF6nuIYy/65Ha97Sl4OPgAB2MkNZK5eCSDB05Dw== X-Received: by 2002:a1c:2b04:: with SMTP id r4mr6490221wmr.48.1634652521127; Tue, 19 Oct 2021 07:08:41 -0700 (PDT) Date: Tue, 19 Oct 2021 10:08:38 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 30/29] vhost-user-blk-test: pass vhost-user socket fds to QSD Message-ID: <20211019140622.738008-31-mst@redhat.com> References: <20211019140622.738008-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Coiby Xu , Raphael Norwitz , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634653081379100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Hajnoczi qemu-storage-daemon is launched with the vhost-user listen socket path. The path is first unlinked before opening the listen socket. This prevents stale UNIX domain socket files from stopping socket initialization. This behavior is undesirable in vhost-user-blk-test and the cause of a bug: There is a race condition in vhost-user-blk-test when QEMU launches before QSD. It connects to the old socket that QSD unlinks and the vhost-user connection is never serviced, resulting in a hang. Pass the listen socket fd to QSD to maintain listen socket continuity and prevent the lost connection. Fixes: 806952026df41939680abe92b329715b9b4e01cc ("test: new qTest case to t= est the vhost-user-blk-server") Cc: Raphael Norwitz Cc: Michael S. Tsirkin Cc: Thomas Huth Cc: Coiby Xu Signed-off-by: Stefan Hajnoczi Message-Id: <20211019135655.83067-1-stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/vhost-user-blk-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/vhost-user-blk-test.c b/tests/qtest/vhost-user-blk= -test.c index 6f108a1b62..62e670f39b 100644 --- a/tests/qtest/vhost-user-blk-test.c +++ b/tests/qtest/vhost-user-blk-test.c @@ -906,9 +906,9 @@ static void start_vhost_user_blk(GString *cmd_line, int= vus_instances, img_path =3D drive_create(); g_string_append_printf(storage_daemon_command, "--blockdev driver=3Dfile,node-name=3Ddisk%d,filename=3D%s " - "--export type=3Dvhost-user-blk,id=3Ddisk%d,addr.type=3Dunix,a= ddr.path=3D%s," + "--export type=3Dvhost-user-blk,id=3Ddisk%d,addr.type=3Dfd,add= r.str=3D%d," "node-name=3Ddisk%i,writable=3Don,num-queues=3D%d ", - i, img_path, i, sock_path, i, num_queues); + i, img_path, i, fd, i, num_queues); =20 g_string_append_printf(cmd_line, "-chardev socket,id=3Dchar%d,path= =3D%s ", i + 1, sock_path); --=20 MST