Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp532233lqb; Thu, 29 Feb 2024 07:52:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXFKnX0vW6JV2hiA0BnQBPBnJG0iSbWFCbLKmFWgeXbgxLkB8cUGBASuhbWw6u53mXQ9BpQPdpbCNAUoECQ6jWE3FU40wvyxuEGA3cj+Q== X-Google-Smtp-Source: AGHT+IFMIdIENvkqEo6XqBjOOoS84EEt1FmWEusGuOgNqTBpfkaNIXMmDa1FE2C6n6frlvwCiee+ X-Received: by 2002:a05:6a20:d70a:b0:1a0:694c:c467 with SMTP id iz10-20020a056a20d70a00b001a0694cc467mr2732123pzb.14.1709221940022; Thu, 29 Feb 2024 07:52:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709221940; cv=pass; d=google.com; s=arc-20160816; b=id0nLJtaZvQn0aC7ORvdM9Owj3gaMcXhGuSGS6Fyxat88aBe3ny7d4mjLYnyI3cW2Q WfGbnARly/k23W25sHdjNaisn17Gk+mfwpDRU4RYJGIypJI7xrKJpUYAr7lsqGWnPGdq eEO7szsXoA3H5W93aw1/xB8ku8nZJFqENsLZqsGXRD/O4y8SFjvHy/k9K5FRVBY9op4r /vOXbPLvn8DmMqCKPlxbnUl8bOzOi4llgoudsL4QwlcJ85b5no3GxQYJUzElmADZz0Qq yIUtgP816Dm7XP0sLQKSaE98Jal/QF7FGnUJRU2O3TnA7lCJG/zwopncKMdNZjeW4oF1 Y0Nw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mpE9zxVXokTTJPrx2ICAryDAmr1VP9YZa3ltCNVqr6U=; fh=4wYEiQruuLCCy9M8zCRCzndOSlBT9ST74WhBQo8W/Po=; b=TlwBGBLYM++PUy+2/PMASCUJNs8dU9rNPIrsch/0ba0a/HAmUq3ALS0hJ1xq5ypU2F qL8HYH0vps2MMqeVQPZ5qr7r5RjfRCzDsVKxgptko5F5ljIjD4GpGYqlyneBG+8hWq7U eFE1zmX8EC4VhhluwK0Q5pV/DYO7VJj2cwm85eBXLaxJ8BGkAw+SZKORAu6m6Rh+vARt MD9+hAWLBX+WJSaxHp3eiCRHAdvJ8F9g9Ryzpipd43AQxJlSXK3uQChnlCfjF+kBK1ru g1zDopFgC5hTQXcaFOvvTTEK3QwnEr0DlB5HuW1UuV/jNMKbtoTtmhaAzwPdwrnrR4BS 5LFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rk59Y5In; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-86960-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86960-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b2-20020a633402000000b005d79ebbdc0asi1603813pga.334.2024.02.29.07.52.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 07:52:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86960-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rk59Y5In; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-86960-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86960-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AE8E0281F12 for ; Thu, 29 Feb 2024 15:52:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8802A14C597; Thu, 29 Feb 2024 15:49:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rk59Y5In" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D69614C58A; Thu, 29 Feb 2024 15:49:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709221755; cv=none; b=DsY33zl/FfZUCUjvhiz3vFSyxPRJFIV7kfZobJ5FWK4NbQ8OQjhps8uRtpJNc+1r3k3cdmCLMipnypRQqLrC0hf2sn2XpNVirosmUDXUYRO2U3zHeztdt4yDu6P6LnN6/sT4xa6CfbURgOGD04PLCw8uOUIYKQ9kyGrfeC+AJak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709221755; c=relaxed/simple; bh=8dD5To5M8RyoSt5fx2k/nign80MLUb757pypdZrbxBU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LmMWCsoWMpKro/QbjoL4UGleFxjOtQ9y0EHZXeYzBOs/kBQe9CKCc3xA3ej4zb0cwACSKQuH2f2qppiGRDeRSr2+CqUaIcxCRMOko8zx6VPAke9C6zG4uZ+563DrBXLfpO9UGvqArtDiV4eYPSJ2osguprGckQ5zlNiyKZFJ5nU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rk59Y5In; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E050AC433A6; Thu, 29 Feb 2024 15:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709221755; bh=8dD5To5M8RyoSt5fx2k/nign80MLUb757pypdZrbxBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rk59Y5In5W8/9C0yIDoyH0JbDlN2dwGeJKqlXacbXd8ExNoWFVJQ2l8/69uAz3lwm qM+HfBZzGQjdBwhr6cd/NAqrCWGLMbuQ06mtUPGHf5KeZ0htDD0AOJ/7CNWIK3nUOp kHocjCb77QtjLtZ8Z2MIoSY4OKUAvxAS1kp+Lz8QdttrPDuGbeo5qNoWCfmdvT1oiC HuCBvPCmoxVjKtNU9OeIp+XqzYKz6e96nGgeNYwtCv5v1vaxQV7jl0gtzb9xI43f1z +PyB+ARO/9HQfHwVCV2gRDsiEWNcylfLrAJMzQWhlcAyQREcXPDmwV6vQbxzibu+do d5wOSzzZAXOpg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , Simon Horman , "David S . Miller" , Sasha Levin , edumazet@google.com, pabeni@redhat.com, shuah@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH AUTOSEL 6.7 12/26] selftests: tls: use exact comparison in recv_partial Date: Thu, 29 Feb 2024 10:48:31 -0500 Message-ID: <20240229154851.2849367-12-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229154851.2849367-1-sashal@kernel.org> References: <20240229154851.2849367-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.7.6 Content-Transfer-Encoding: 8bit From: Jakub Kicinski [ Upstream commit 49d821064c44cb5ffdf272905236012ea9ce50e3 ] This exact case was fail for async crypto and we weren't catching it. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- tools/testing/selftests/net/tls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index 464853a7f9829..ad993ab3ac181 100644 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@ -988,12 +988,12 @@ TEST_F(tls, recv_partial) memset(recv_mem, 0, sizeof(recv_mem)); EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); - EXPECT_NE(recv(self->cfd, recv_mem, strlen(test_str_first), - MSG_WAITALL), -1); + EXPECT_EQ(recv(self->cfd, recv_mem, strlen(test_str_first), + MSG_WAITALL), strlen(test_str_first)); EXPECT_EQ(memcmp(test_str_first, recv_mem, strlen(test_str_first)), 0); memset(recv_mem, 0, sizeof(recv_mem)); - EXPECT_NE(recv(self->cfd, recv_mem, strlen(test_str_second), - MSG_WAITALL), -1); + EXPECT_EQ(recv(self->cfd, recv_mem, strlen(test_str_second), + MSG_WAITALL), strlen(test_str_second)); EXPECT_EQ(memcmp(test_str_second, recv_mem, strlen(test_str_second)), 0); } -- 2.43.0