Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4622022rwb; Mon, 8 Aug 2022 04:32:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR7wVG4NPs3LtCqqFx3Dfy6tCsB4bGk3Q8I7t7tkeJuyLkBJiBTwvH4YA7lW0rCueLdACz2F X-Received: by 2002:a17:903:41cd:b0:16e:e0c0:96d1 with SMTP id u13-20020a17090341cd00b0016ee0c096d1mr18232759ple.169.1659958324253; Mon, 08 Aug 2022 04:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659958324; cv=none; d=google.com; s=arc-20160816; b=oYpzopKbrMR+kw0MzMF5NhXASZMq9TXo7FDM4Ek5CgUZZBHn9Bd9t5ZIvNFb51Avbd YU70jQD2KEAJoC1+CYkNai3cEd2sqo2jP4vdwp6/JiMQBNCzFyWShF7wLxWAzMa0An03 a/oDq4ff6G/yCxG4i6n0Q4iOZA4Qphp4HoBFGl+vXOP26Zazi600qQ9flPycNB7894/C PPXNAcl0OdwtLl7oArvIVpQAQ/DeGMzjmkR8O8ayqob8N0SgD4de1BmM9toe7fG0RvT/ l4kTLoBmWrECZRYMGD2ZCV0UUvZLxx+gM1AMNXs9ZK86EcGqeW/5rRjah1dV723hf5u9 PFjQ== 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=hBe2fpdBGNWzcr6vXOzuBs2kJsMnU68Mt4pMY9LLh1w=; b=xFNd+A+rTZjhGtdFyMA8O3L07MUfCSlk8WtQjSnuEM/d3soaSYjsuq4fewmP4PSyfm ja+R/ehG9qZEE1OV79wACIcJrW5+a+jEG2T/p/2kSG00S+kISgoEhNMDyd0FO/8DtXWt MmP0v6tnxZyOsOD54T1Mf8fJmE9BIXFjzn4HnNVnAZXqXzI0Gbck7Il7YUH6YnKbANsy SPj+S1VZH0+B42yCSWXvF9tLg57qSYI7TIkt1PUmzJYRelp7cgwLl4o3abOR8HtS/C6/ Twdo68m2QAB2SJkI/kDluFs1KdSdL0CHXcm7oPySBfIew1niGUb5ji+xpw+dprhtsMYd Ggjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AUQ8vh58; 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 m6-20020a056a00080600b0052ab2efeec4si11625861pfk.280.2022.08.08.04.31.49; Mon, 08 Aug 2022 04:32:04 -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=AUQ8vh58; 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 S242884AbiHHLKx (ORCPT + 99 others); Mon, 8 Aug 2022 07:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242758AbiHHLKm (ORCPT ); Mon, 8 Aug 2022 07:10:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9AF02117C for ; Mon, 8 Aug 2022 04:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659957040; 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=hBe2fpdBGNWzcr6vXOzuBs2kJsMnU68Mt4pMY9LLh1w=; b=AUQ8vh58bF6brXuQHf/VM/9ltM8yOUOyPqHvMak4v9ejm8LiCMWVByEedyq1yaQSYGx2VH kCRIdm8mCbJLz99riM6fkhA3JDNbW915GxO9wNr76LLneTwR7Rae2m+Fn2nfEbYA2s9F6y ppM8kI1v+KcyF2i0sbp+1+58RFY6/OQ= 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-112-DRBrCSNRNfOJNJmsWSqz9Q-1; Mon, 08 Aug 2022 07:10:39 -0400 X-MC-Unique: DRBrCSNRNfOJNJmsWSqz9Q-1 Received: by mail-qt1-f200.google.com with SMTP id fy18-20020a05622a5a1200b0033e5b56f031so6578007qtb.15 for ; Mon, 08 Aug 2022 04:10:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=hBe2fpdBGNWzcr6vXOzuBs2kJsMnU68Mt4pMY9LLh1w=; b=1v/i19HzSb/u/mCkP+xM0qM0bMjOmIKNQB+XIn2jvCYu5/gmHpxG9nZx6kBe5lr1ZS 1ef3b9fZtaqHk3ryZyagR8bTu8yOdP5yxypsn+GYqWizSm8ZgJwAgao5y/4zpyT/pPWu MlJTuBup0Asx1c4KFSYrrZM+Gn7U3gCfjEi5N68tkAWallQBZjrQtyxt71JPM//9uttN GB+dByb483UsJDsj0jHI+seJaNHUHNgqVbQjLqfg3eTcxMF60S1Xik5YDYnNb/2oieZp 58f9roslzirNSSvZpU/+sRnMUAEWgeSOyTZvKIeZRMLPIN9auboHghGiHMXNiEl41kUY tCqQ== X-Gm-Message-State: ACgBeo2IFCHS90B1oFajkJxG6mwqjGw0VdfsMziDLIQi75TovD9tRtmF a2xTd+/BKaklAqqETY0eVuS1RgDO1J3fr6N1WVL2PXLGESVs7yVc1N6WFbtVXM7+So6th+ZV1B3 Rhguq1CXT1biEDe/O51Fh5XeB X-Received: by 2002:a05:6214:5285:b0:474:69d7:c22b with SMTP id kj5-20020a056214528500b0047469d7c22bmr14912784qvb.97.1659957038980; Mon, 08 Aug 2022 04:10:38 -0700 (PDT) X-Received: by 2002:a05:6214:5285:b0:474:69d7:c22b with SMTP id kj5-20020a056214528500b0047469d7c22bmr14912769qvb.97.1659957038768; Mon, 08 Aug 2022 04:10:38 -0700 (PDT) Received: from sgarzare-redhat (host-79-46-200-178.retail.telecomitalia.it. [79.46.200.178]) by smtp.gmail.com with ESMTPSA id u3-20020a37ab03000000b006b46a78bc0fsm1093912qke.118.2022.08.08.04.10.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 04:10:38 -0700 (PDT) Date: Mon, 8 Aug 2022 13:10:27 +0200 From: Stefano Garzarella To: Arseniy Krasnov Cc: "David S. Miller" , "edumazet@google.com" , Jakub Kicinski , Paolo Abeni , "kys@microsoft.com" , "haiyangz@microsoft.com" , "sthemmin@microsoft.com" , "wei.liu@kernel.org" , Dexuan Cui , Stefan Hajnoczi , Bryan Tan , Vishnu Dasa , VMware PV-Drivers Reviewers , Krasnov Arseniy , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "kvm@vger.kernel.org" , kernel Subject: Re: [RFC PATCH v3 9/9] vsock_test: POLLIN + SO_RCVLOWAT test Message-ID: <20220808111027.nmreeuxa4jgn2e4t@sgarzare-redhat> References: <2ac35e2c-26a8-6f6d-2236-c4692600db9e@sberdevices.ru> <1f50d595-cd37-ad61-f165-5632162dc682@sberdevices.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1f50d595-cd37-ad61-f165-5632162dc682@sberdevices.ru> X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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, Aug 03, 2022 at 02:07:58PM +0000, Arseniy Krasnov wrote: >This adds test to check,that when poll() returns POLLIN,POLLRDNORM bits, >next read call won't block. > >Signed-off-by: Arseniy Krasnov >--- > tools/testing/vsock/vsock_test.c | 107 +++++++++++++++++++++++++++++++ > 1 file changed, 107 insertions(+) > >diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c >index dc577461afc2..920dc5d5d979 100644 >--- a/tools/testing/vsock/vsock_test.c >+++ b/tools/testing/vsock/vsock_test.c >@@ -18,6 +18,7 @@ > #include > #include > #include >+#include > > #include "timeout.h" > #include "control.h" >@@ -596,6 +597,107 @@ static void test_seqpacket_invalid_rec_buffer_server(const struct test_opts *opt > close(fd); > } > >+static void test_stream_poll_rcvlowat_server(const struct test_opts *opts) >+{ >+#define RCVLOWAT_BUF_SIZE 128 Since we use this macro on both server and client functions, I suggest to move this define outside the function. Other than that the test LGTM. I also ran it and everything is fine :-) thanks for adding it! Reviewed-by: Stefano Garzarella