Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4752514rwo; Tue, 25 Jul 2023 10:21:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHxR686gBUF6PYgIK82y9nqXL4VA5O0VmfZCLLLhvv9LuN6Wtmgvjx0vE4VuU6n8StfPOzx X-Received: by 2002:a17:902:bcc6:b0:1b9:e972:134d with SMTP id o6-20020a170902bcc600b001b9e972134dmr7880545pls.3.1690305705087; Tue, 25 Jul 2023 10:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690305705; cv=none; d=google.com; s=arc-20160816; b=J/kWykueFRnqV4MQ4j/9feMhEZj9aF5XRHhu7tJfKauoptqzZM0/WQIVM1HjhaBFuV ZrykAH9Kk9l9vgDwn663rBlZIbHekLj5iqlYCxuoyzl/2okS1/fERUsFJKLu0JU4gg76 P9xsXNkudJDCvX/hBuCmYCYvC98Ao6LCYXujbyBpCbs2E4l0wLOeViDvXZQ0qlgi3fBP +aHV42hChh/DinhsM5ibtTolyZjm5C4NQtAsZ5mCURurYRjUjGqCECCoRkz4QsW6Rs93 aGd+TQD3FudSPsY6cqPu/m6SGDuOxWUvnYVwgz8T8O1u3kkHW2t5FUp1AiSQzCnu/wWx 4hFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ywc41/BPTk/JOAzpj2Ndsq/haHQiohuM6GBycryh5is=; fh=LmSvGF8mKyhe+4SfmYOr3uCnhF0XAFkKvuoevTchCp0=; b=OYC4JiPz9s8Dyx+0ynozioeevMAePH/I17fwzJURTdTfVX8x6pmtGecp+51nkLLS86 KHndZKXxSAqdYT66aiVteiW9SYi8VhyH44noLkK0jRX1k2DULNX/cj4nVUYVbBqCr/4j hczdbUmixauuqQaRz1q0uzrxuNktyzK1GQBB4IpEW0Ft4sdDvAt5SdqgDmC+ggYleYlt sWBTUO2c8lg4hJ/jSn4BAgCirylO+F+4LiFB1OcceXMYpqalV/CExmFD+b5vHApP6Bit vcO5/37nskjSEH9wkrMHeauQxFt5e2nwdRYN1E46iYb2fvB8vQJFffhsEL/1OXvTVa2e VlaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=emCsZIr6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w2-20020a170902e88200b001b7fee7d5f0si12559065plg.25.2023.07.25.10.21.32; Tue, 25 Jul 2023 10:21:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=emCsZIr6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231663AbjGYPmA (ORCPT + 99 others); Tue, 25 Jul 2023 11:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231483AbjGYPl6 (ORCPT ); Tue, 25 Jul 2023 11:41:58 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 556C71FD2 for ; Tue, 25 Jul 2023 08:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690299673; 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=Ywc41/BPTk/JOAzpj2Ndsq/haHQiohuM6GBycryh5is=; b=emCsZIr6jKqZ7vlyZ45ONeGyycQJM+RgbU+DjUId2IW5s96A6Yxu3yxi8wJYk/0a8xuCso OiMtvCYPuRz5CVxqbVphHMnB+9/QrNPG5kusnNLuY5VbqqlV2yKNhiQfdW7tNbTFKmw3z3 GUjQ9julY7wuWF4A3CleEWJy+Vb6qwQ= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-571-58NY2JxlP1-MVUVlCLPmgA-1; Tue, 25 Jul 2023 11:41:12 -0400 X-MC-Unique: 58NY2JxlP1-MVUVlCLPmgA-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4053a03d5b2so73824461cf.1 for ; Tue, 25 Jul 2023 08:41:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690299672; x=1690904472; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ywc41/BPTk/JOAzpj2Ndsq/haHQiohuM6GBycryh5is=; b=fpxTHYr2PpsnML/R/Y+jU+MV3iHAiJlUX5qUGZdCco8gDXHlB2VVfELGzFT0Rxmf3d 7gdZCLEbyTLghYs7VnBWLtwUpINBa1W1fnUD0Hj6Uyh1nO6Mhy0cbGX2f0PxZqe6vtWb oG49IQyRTHeJL+gW+E7YRvDvK2FEBCBpKG9f9xhZv0FMtM9FsF8Q3e/uWh2SY0ImrqwW V0TbpevEvaoqXxYafkvPbgRJ2KKffzbMxP6fkS+VepYdpXh5/fXdzn0lvJ0hiMGahjLV SA2DffqeuVRXkzY0o0kE0U6lHAXlA41FqrQhhsxuG/PYgnGvpzaWpCiZuhWeLGQLqxO6 KibA== X-Gm-Message-State: ABy/qLYr1ik5ESd5EPjws3ozKLDv2PtDe1vT32rl1/tCj8agIOkK3O8f I4ZrmFuZaru/vG4ivpb/9Z82d12JdXMouT1qxaccyuXwK7pmjn276Go057KwHMi029G9rFoo1/G 8DEnChNae+t6RJa2Y3YTwZlP2 X-Received: by 2002:ac8:5f0c:0:b0:405:47aa:742f with SMTP id x12-20020ac85f0c000000b0040547aa742fmr3527173qta.32.1690299671817; Tue, 25 Jul 2023 08:41:11 -0700 (PDT) X-Received: by 2002:ac8:5f0c:0:b0:405:47aa:742f with SMTP id x12-20020ac85f0c000000b0040547aa742fmr3527157qta.32.1690299671554; Tue, 25 Jul 2023 08:41:11 -0700 (PDT) Received: from sgarzare-redhat ([193.207.153.113]) by smtp.gmail.com with ESMTPSA id g1-20020ac870c1000000b00404f8e9902dsm4132859qtp.2.2023.07.25.08.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 08:41:11 -0700 (PDT) Date: Tue, 25 Jul 2023 17:41:05 +0200 From: Stefano Garzarella To: Arseniy Krasnov Cc: Stefan Hajnoczi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, oxffffaa@gmail.com Subject: Re: [RFC PATCH v2 4/4] vsock/test: MSG_PEEK test for SOCK_SEQPACKET Message-ID: References: <20230719192708.1775162-1-AVKrasnov@sberdevices.ru> <20230719192708.1775162-5-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20230719192708.1775162-5-AVKrasnov@sberdevices.ru> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 19, 2023 at 10:27:08PM +0300, Arseniy Krasnov wrote: >This adds MSG_PEEK test for SOCK_SEQPACKET. It works in the same way as >SOCK_STREAM test, except it also tests MSG_TRUNC flag. > >Signed-off-by: Arseniy Krasnov >--- > tools/testing/vsock/vsock_test.c | 58 +++++++++++++++++++++++++++++--- > 1 file changed, 54 insertions(+), 4 deletions(-) > >diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c >index 444a3ff0681f..2ca2cbfa9808 100644 >--- a/tools/testing/vsock/vsock_test.c >+++ b/tools/testing/vsock/vsock_test.c >@@ -257,14 +257,19 @@ static void test_stream_multiconn_server(const struct test_opts *opts) > > #define MSG_PEEK_BUF_LEN 64 > >-static void test_stream_msg_peek_client(const struct test_opts *opts) >+static void __test_msg_peek_client(const struct test_opts *opts, Let's stay with just test_msg_peek_client(), WDYT? >+ bool seqpacket) > { > unsigned char buf[MSG_PEEK_BUF_LEN]; > ssize_t send_size; > int fd; > int i; > >- fd = vsock_stream_connect(opts->peer_cid, 1234); >+ if (seqpacket) >+ fd = vsock_seqpacket_connect(opts->peer_cid, 1234); >+ else >+ fd = vsock_stream_connect(opts->peer_cid, 1234); >+ > if (fd < 0) { > perror("connect"); > exit(EXIT_FAILURE); >@@ -290,7 +295,8 @@ static void test_stream_msg_peek_client(const struct test_opts *opts) > close(fd); > } > >-static void test_stream_msg_peek_server(const struct test_opts *opts) >+static void __test_msg_peek_server(const struct test_opts *opts, Same here. The rest LGTM! Also the whole series should be ready for net-next, right? Stefano