Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp665634ybl; Fri, 13 Dec 2019 02:41:28 -0800 (PST) X-Google-Smtp-Source: APXvYqw6fcnSiKo9x2PnuDyhAfbuyTs6qUspu9hTCiPvuCm2N5CdHHvO61xcFWXdkB9tTCwZeUDq X-Received: by 2002:a05:6830:2006:: with SMTP id e6mr13225011otp.367.1576233688541; Fri, 13 Dec 2019 02:41:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576233688; cv=none; d=google.com; s=arc-20160816; b=CLDf9VP8dagfu7B276o8sQKGe9TJaFKJrcHYewLa2papZ7b3SaZhVBaGra5oApsx7N Yjh3+A8R6iFeN4XLF/CiXVURxjl7ZPoWxUuVxVRnXYDv6v04FMHvIyKHmUTUvuPR4SaH 5JUMMg2B1g5qMiwF/mdQyq0e040oB/PdBwK1EsAlkmYG+nEkCDjqInKNhlpazyYZ0ufg iYv4IXeSPi/DBvktFknT/zlSGK01RAbRg3t1XXjgD+ms0z4qkiKyShjIVYAwGZVKFamU yPqWVs6igVjwBaE67TnlaDY9WF3At0qv7QC08RwVkEvsJdv+VM6lAnXDA9R48ofBcUe0 qLsA== 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 :message-id:date:subject:cc:to:from; bh=i6SpHK/qinEvyidoLNO8h+6Cqy/70nqeBrP2mTZdBMQ=; b=nygUyBlaM1AdL/WvKchS5yGvxlZsm1Y3PhTFyGj5OfintnEyfUapOcJNwYi9CyH+v1 4o4kF41NhG/geBKhJg8fdnMYH9MKg7s1dnxV1b4ZeKOrD1N4bFhNiYLkWGx1ib5oAPD3 RJaqGw183fhVS6TDaI2o/4K5EPpGl5hA6XA1DT/e3o9ZzTBmY3tMiRiTsXZE2PUd4aiY wArNVBKrTkqOehQqKUfnFoKdEf+S3EcqTWgMKyIMCCFuTpY0qYcsvW/YKdWaBX/8NiMw SWpg4rfIK1/fiX0sJqQscQ9crGOlZvuv+rbfdMbKMb/AkyQt6kH3BYQ7w7IzjfhzsJpS JIEA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si4854848otk.120.2019.12.13.02.41.16; Fri, 13 Dec 2019 02:41:28 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbfLMKj3 (ORCPT + 99 others); Fri, 13 Dec 2019 05:39:29 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:54275 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbfLMKj3 (ORCPT ); Fri, 13 Dec 2019 05:39:29 -0500 Received: from 1.general.cascardo.us.vpn ([10.172.70.58] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ifiM0-0000S0-7i; Fri, 13 Dec 2019 10:39:24 +0000 From: Thadeu Lima de Souza Cascardo To: "David S. Miller" Cc: Shuah Khan , Jakub Kicinski , Simon Horman , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Pisati , Thadeu Lima de Souza Cascardo Subject: [PATCH] selftests: net: tls: remove recv_rcvbuf test Date: Fri, 13 Dec 2019 07:39:02 -0300 Message-Id: <20191213103903.29777-1-cascardo@canonical.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cc: Jakub Kicinski Fixes: 65190f77424d (selftests/tls: add a test for fragmented messages) Reported-by: Paolo Pisati Signed-off-by: Thadeu Lima de Souza Cascardo --- 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.24.0