Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4280879pxt; Wed, 11 Aug 2021 02:13:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCLhdhmdh7bty/jxWSACHJMZ3cfgh53xeXOM4U1z/q8r7orRGd/FN0Q7ipHZThxtkbr7w8 X-Received: by 2002:a5d:87c6:: with SMTP id q6mr452477ios.143.1628673224183; Wed, 11 Aug 2021 02:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628673224; cv=none; d=google.com; s=arc-20160816; b=HgsFot4zH6jV8sSvLCHRXjeRkEgM8o2erWmoZ2apktA6CvVvfkc5Iq0RwQr2VF7GjP 1UQONWzIGgMwqunrBV8VKJTssKrr9z29k42JA476zwsRht91m89boYC3Yx8+bUHxrfRa Vkre3kLpxZpTH+ruhC3gqeKIfgi02o1/Fj8r6w9EnmkOiNGVGPmEABgqYEUvufcspdnC wwqEbcla1zODcaP7CYIVMJ8aNidB1VFq5hH3OVPRb7SqCKOaACTcG1TB1udFDbF2sjK4 rE950zvBr2g/xKK0ai7c5INiLbuJTYogn1V/eQjWlnBkUiFwcV+/0EmofGKvMtayuzjP uKxw== 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=xXwE7CHo/JY+uapmOrMsy/SWDFuCzkqxTC2MlTmyXRU=; b=zxsJFpfVM4bRWgmg2ZeV4jJrzIsDsapu0Il8hpjuTqVR4tc/sT79XENBH8hNlZDR/V XLupQ69vWQfL5TtAnIXyK6nHtWk9BDn801gWaRdVET/nujnv+6LjF5uPsbJ0O4NCeCDL aF1Hbuzm7Im3pcPZMi/A41cC0HAK2EFrkmY+lLigYt3DpB/VWPXihIwl9TeTGsejI1dF FWYrS3OYWKFOC4FbnLSYwF8stjcLSKxC71eoMU3lUF6nbpOLxBLEprMlWJdTxt61IE8G EuKe2nIN2QuhbBdKxoICKTaT0oMql/pjMelEndsgULvFUB1saNb5J90RXaN3XCFCboX1 +IDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PNqRbR0L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si30311778ild.123.2021.08.11.02.13.32; Wed, 11 Aug 2021 02:13:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PNqRbR0L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S236624AbhHKJNK (ORCPT + 99 others); Wed, 11 Aug 2021 05:13:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32188 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236321AbhHKJNJ (ORCPT ); Wed, 11 Aug 2021 05:13:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628673165; 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=xXwE7CHo/JY+uapmOrMsy/SWDFuCzkqxTC2MlTmyXRU=; b=PNqRbR0LCPP26r8qJyRM55VysXR+ZyvAF8CTULKwFk15qy1NRgy2UoYSCC2s5YBYa9vs6C 9Phodca/oMtaaqWr4kqj1oOs/oRrI5MjMn52c9p8gLUcZ4fwVd+ateECb8aitmXugn9e7B lW5rIlePq0M6sar42bmsQUDYctNx3go= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-375-pbZAGFGJMxWP2HO0ldHkBw-1; Wed, 11 Aug 2021 05:12:44 -0400 X-MC-Unique: pbZAGFGJMxWP2HO0ldHkBw-1 Received: by mail-ed1-f69.google.com with SMTP id b16-20020a0564022790b02903be6352006cso893839ede.15 for ; Wed, 11 Aug 2021 02:12:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xXwE7CHo/JY+uapmOrMsy/SWDFuCzkqxTC2MlTmyXRU=; b=qCLHJsERhFBuyf5vJyvOLXFKDRCf4BpoSsP6lWx06yTb6OuKRSYRfqpm6NIAiL9f/A sJ07chv8gsNFeJeWIN44r5sOp3viwx3WOscPl34ZV/z+IJG/39+SuBFgi4+JZWOR0wBb 6gJ0HQQDSbOXaYlwi/Ia2zRZCQZ73mnzsFG4prwYjP99gxbHhOcH2iGg5iTdT0QytrLy fp+pAn+ZIfRUYlVXUAAOeYMx6Cj81TXBmbnu50Ggan1cMJ4D6ohnrp6nXSrTPthFnJ3L CDhGvbWISPNV0Q4G6MZOP5AlutSoYbIKz7xGt3G18peQXJu3rkQGVuuYCD31uozupIq1 T3WQ== X-Gm-Message-State: AOAM530ergd2m6A55zgvad5j+Zy/mXp7njCAAZo3qOkmUWkXuRGzZjBv LcMMTPKwdaObTAaTN1akgkHL/9AdWIAOXP8gkZccdN8M7J8c0elVSGnahxSQDPGlg6j0DyK9jro Mi0OYxK76nLgVlkFJQumarCRE X-Received: by 2002:a17:906:b1d3:: with SMTP id bv19mr1140417ejb.361.1628673163559; Wed, 11 Aug 2021 02:12:43 -0700 (PDT) X-Received: by 2002:a17:906:b1d3:: with SMTP id bv19mr1140394ejb.361.1628673163432; Wed, 11 Aug 2021 02:12:43 -0700 (PDT) Received: from steredhat (a-nu5-14.tin.it. [212.216.181.13]) by smtp.gmail.com with ESMTPSA id ee11sm8306374edb.26.2021.08.11.02.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 02:12:43 -0700 (PDT) Date: Wed, 11 Aug 2021 11:12:40 +0200 From: Stefano Garzarella To: Arseny Krasnov Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , Norbert Slusarek , Andra Paraschiv , Colin Ian King , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stsp2@yandex.ru, oxffffaa@gmail.com Subject: Re: [RFC PATCH v2 5/5] vsock_test: update message bounds test for MSG_EOR Message-ID: <20210811091240.jbum3572eelgbbpi@steredhat> References: <20210810113901.1214116-1-arseny.krasnov@kaspersky.com> <20210810114119.1215014-1-arseny.krasnov@kaspersky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210810114119.1215014-1-arseny.krasnov@kaspersky.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 10, 2021 at 02:41:16PM +0300, Arseny Krasnov wrote: >Set 'MSG_EOR' in one of message sent, check that 'MSG_EOR' >is visible in corresponding message at receiver. > >Signed-off-by: Arseny Krasnov >--- > tools/testing/vsock/vsock_test.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c >index 67766bfe176f..2a3638c0a008 100644 >--- a/tools/testing/vsock/vsock_test.c >+++ b/tools/testing/vsock/vsock_test.c >@@ -282,6 +282,7 @@ static void test_stream_msg_peek_server(const struct test_opts *opts) > } > > #define MESSAGES_CNT 7 >+#define MSG_EOR_IDX (MESSAGES_CNT / 2) > static void test_seqpacket_msg_bounds_client(const struct test_opts *opts) > { > int fd; >@@ -294,7 +295,7 @@ static void test_seqpacket_msg_bounds_client(const struct test_opts *opts) > > /* Send several messages, one with MSG_EOR flag */ > for (int i = 0; i < MESSAGES_CNT; i++) >- send_byte(fd, 1, 0); >+ send_byte(fd, 1, (i == MSG_EOR_IDX) ? MSG_EOR : 0); > > control_writeln("SENDDONE"); > close(fd); >@@ -324,6 +325,11 @@ static void test_seqpacket_msg_bounds_server(const struct test_opts *opts) > perror("message bound violated"); > exit(EXIT_FAILURE); > } >+ >+ if ((i == MSG_EOR_IDX) ^ !!(msg.msg_flags & MSG_EOR)) { >+ perror("MSG_EOR"); >+ exit(EXIT_FAILURE); >+ } > } > > close(fd); >-- >2.25.1 > Reviewed-by: Stefano Garzarella