Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13476802ybl; Sun, 29 Dec 2019 12:50:30 -0800 (PST) X-Google-Smtp-Source: APXvYqy8yv/4WMuBget5nxIGCGqFfwYsmHQ6tOivR/0OYHHHa6bAwd5KZZYdKwdgiWSd8WDnoHhc X-Received: by 2002:a9d:2965:: with SMTP id d92mr66178708otb.175.1577652630340; Sun, 29 Dec 2019 12:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652630; cv=none; d=google.com; s=arc-20160816; b=eONMCfcM0BZXk/wVDFZkmEXyOIaHj7giKvTjIBi77Ce10tFFbV/1fDG+TPC85loIAI SWx8+N+rOrA6+S2SZpujsng5O7clOpUy75IzpskBqDey+hnoLXYusnKbX9rMp3vG57de qDCzR516y5g8bGVe/GCRYU2nq6Tll9Ls2+13Ign+JPH9E0HxqW7/9O7Z7Se/ec+sfauY 1MfuADc0AvJNLKy3JnSV2HkXqr6Q026dyXFQlwcCnlzyHCA0cmN/9+NJmYj6mPFVduPC 7sdqx0HHjLXhK7VAf5zxacKi3TgcGL7XH0HbQEmJJzYG6SYqnWYCQHsmkUuBdIo6r4X0 K9QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZG/wFbFW0QpxXo8EfLecwo8yTQviABxV7Vz9f5RZj/A=; b=oSlDepWx+Yo/PQM+y6DoBE9Fh/K7FSOUDKQs4Ab5ZxTVMDUVYM8M8ljwW2EFW8J4H7 Jrl+72pjUWx8aKIJIEKu/xo2iRRoMtX9gjr8z71ID9Hzv7AOcF/5EwqTACdIDpoSHGQN gDRS702lIdrGj+x95YQMf8qKXY5IlDP82+lDQxK8xAtJdaYgnvMOvMhzgOZjG538bE2K 7vgg6Fa+KgQB+9UPrhBxcfMeEjnwMQ8vDDsUxhb7WLrCUi0BD+vEBhiBdS4XXwhIvWQJ c8T0Rac7RF8pOcVw2rCIlvgRK4AZ9FSy8qAczqIraq9sgzBP2/SBs2WLyXv0vfTpaOxD 3b4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hZrgJ9GA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7si20629440otr.308.2019.12.29.12.50.19; Sun, 29 Dec 2019 12:50:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hZrgJ9GA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387483AbfL2R6Q (ORCPT + 99 others); Sun, 29 Dec 2019 12:58:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:49128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387469AbfL2R6K (ORCPT ); Sun, 29 Dec 2019 12:58:10 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8F696208C4; Sun, 29 Dec 2019 17:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642290; bh=psl8kJoeKTkFyv9dkoUnqIpetpwk3tdC55aWKYKxqUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hZrgJ9GAXsrk/I5CGO6P/WOV5X18X5asQ8Su8HgvlmTmitKzQWAAREpXi/K7B4YA2 ztZZGIpQXHfhYFSi5MOpok375WX3eMKYkSpRLgghUX1lB0O7StLV22gB9oLawquTqk JsckQ39ymAfYLYgnifpW4P7qcrAHVPnVGP9sStZ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Pisati , Thadeu Lima de Souza Cascardo , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.4 378/434] selftests: net: tls: remove recv_rcvbuf test Date: Sun, 29 Dec 2019 18:27:11 +0100 Message-Id: <20191229172727.211163615@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thadeu Lima de Souza Cascardo [ Upstream commit 6dd504b0fd1039c6e5d391e97cf5c4ee592aefcb ] This test only works when [1] is applied, which was rejected. Basically, the errors are reported and cleared. In this particular case of tls sockets, following reads will block. The test case was originally submitted with the rejected patch, but, then, was included as part of a different patchset, possibly by mistake. [1] https://lore.kernel.org/netdev/20191007035323.4360-2-jakub.kicinski@netronome.com/#t Thanks Paolo Pisati for pointing out the original patchset where this appeared. Fixes: 65190f77424d (selftests/tls: add a test for fragmented messages) Reported-by: Paolo Pisati Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- tools/testing/selftests/net/tls.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index 13e5ef615026..0ea44d975b6c 100644 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@ -722,34 +722,6 @@ TEST_F(tls, recv_lowat) EXPECT_EQ(memcmp(send_mem, recv_mem + 10, 5), 0); } -TEST_F(tls, recv_rcvbuf) -{ - char send_mem[4096]; - char recv_mem[4096]; - int rcv_buf = 1024; - - memset(send_mem, 0x1c, sizeof(send_mem)); - - EXPECT_EQ(setsockopt(self->cfd, SOL_SOCKET, SO_RCVBUF, - &rcv_buf, sizeof(rcv_buf)), 0); - - EXPECT_EQ(send(self->fd, send_mem, 512, 0), 512); - memset(recv_mem, 0, sizeof(recv_mem)); - EXPECT_EQ(recv(self->cfd, recv_mem, sizeof(recv_mem), 0), 512); - EXPECT_EQ(memcmp(send_mem, recv_mem, 512), 0); - - if (self->notls) - return; - - EXPECT_EQ(send(self->fd, send_mem, 4096, 0), 4096); - memset(recv_mem, 0, sizeof(recv_mem)); - EXPECT_EQ(recv(self->cfd, recv_mem, sizeof(recv_mem), 0), -1); - EXPECT_EQ(errno, EMSGSIZE); - - EXPECT_EQ(recv(self->cfd, recv_mem, sizeof(recv_mem), 0), -1); - EXPECT_EQ(errno, EMSGSIZE); -} - TEST_F(tls, bidir) { char const *test_str = "test_read"; -- 2.20.1